Hello reader! You’ve magically stumbled upon this blog and now…you’re trapped!!! Well I am Saransh, your everyday hip hop dancer – cross country runner – engineer mix, and I am one of the lucky students to be placed in the 2014 BlueStamp program. I’ve dedicated 10 years of my life to learn dance. I’ve performed on places like Lincoln center and now, dancing is second nature to me. Along with this, I participate competitively in sports like tennis and cross country. I’ve been able to learn C++ and Robot C as well as basic hardware mechanics through FIRST Robotics. Admittedly, I wasn’t really too experienced with electrical engineering. Like, I didn’t know what a diode was! If your like me, its all okay! This is why we have the glorious Google search engine. Below, I have my intensive project which is an omni-directional robot. If you scroll further, you’ll find my adventures with building an ultrasonic proximity sensor project.
The omni-directional robot is a project that can move in all directions while still facing you using only one analog stick. The other stick is only used for stationary rotations. With this robot there is even fail-safe in the code that can cut the wheels from moving should the robot begin to act funny by using a boolean value as a gate that opens and closes with the square button on the PS2 controller. When I first doing the code for this robot I decided to just put all the values under two logic statements. By having so many values in one statement it made it very hard to track the logic errors that came. I realized I need to break everything down and address some of the directions individually. Specifically, cardinal ones and this made for easier solving for future errors. I also added the right analog stick for stationary rotations.
My robot boasts a bigger wheel size and a vex battery that generates 3 amps of current. These hardware mechanics make a much faster robot because the servos can draw a larger amount of current for better performance and the wheels cover more distance with every spin of its axle. Another great capability of my robot is found on accident by my Brazilian instructor, it can do “wheelies”. I have to drive forward at maximum speed and the abruptly change directions. The law of inertia states that an object in motion wants to stay in motion. The robot still wants go forward but I just commanded the wheels to go back. That forward motion has enough force to prop the back wheel off the ground and make the robot do a balancing act on it’s 2 front wheels. This robot actually has a custom laser cut chassis using Google Sketchup. I made sure that all the wheels were equidistant from each other. That way they would all have the same available degree of rotation.
Another trip, was that I had to mount on electronics to this robot. I was just using an arduino and breadboard connections. Since I was using a breadboard, with wires you can literally take out by just nudging on it, my robot became a fire hazard 2 weeks ago. This is why I added on this thing called a protoboard, which has much more of a permanent connection because I have to solder in my wires. Later, I plan to hopefully get in touch with a 3-D printer and make a case to hide the electronics.
Hey guys, I built my whole chassis today. This took a few long and annoying steps such as making it on Google Sketchup. Google Sketchup is very useful because you can use it to make digital drawings and export it in various files, a key feature in most CAD(Computer Aided Design) software. The reason why I had to export my files is that laser cutter reads only reads certain types of files, like .DWG files. I’ve never really touched CAD before, but it turns out that Google Sketchup is pretty user friendly and also there are many tutorials on advanced techniques all over YouTube. I made the outline of my chassis but then I was informed that you can’t just drill holes into the acrylic. It will apparently crack. We decided to actually laser cut holes. OK! So I went on to the Google Sketchup doc and added the holes. Of course it turns out that the spacing between holes in each row is different except for the 1st and 3rd row. VEX brackets have their holes annoyingly premade like that. So after quite a bit of math I came to where my holes should be so my axle connecting to the motors would be equidistant from the center. The only reason to this is that each wheel should have equal degree of movement. Another gripe is that you can’t laser cut materials that were laser cut before because a human can’t align the material in the same position twice. Luckily, we aligned it accurately enough by starting from the corner of the laser cutter and translating the piece so its in line with the CAD specifications but another problem came about – I forgot to put the holes that would serve for zip ties that would buckle down electronics! I went on Google Sketchup again(last time woo!) and added in these holes. We decided to just use a new piece of acrylic and save the alignment trouble as there is a chance that the laser would go through the motor mount holes and ruin them. I attached the motors and what I plan to do next is to add the breadboard and Arduino to the acrylic and the initial project should be done.
I’m officially talking to a vex motor through a PS2 controller. There are a few things I’ve done to reach this milestone. First, I’ve researched how to wire the PS2 receiver to the Arduino board. Curious inventor had an amazing page on this – Interfacing the PS2 wireless receiver.
Next, I had to download Arduino software and do basic setup which is selecting which Arduino board, and serial monitor I’m using. Then I downloaded a PS2 library off of bill porter’s website and imported the library. Then, it turned out that I didn’t know any of the syntax for the buttons on the PS2 controller! I opened up and looked through an example PS2 program that came with library for the syntax. I downloaded the example code onto my Leonardo board and luckily the PS2 receiver could pick up and print out a line for every button I pressed without any problems. Next, I needed to give the motor a power source. I choose to have it connected to the 5v and ground pin from the Arduino. Then, made a connection to any digital I/O port. After that, I defined the continuous-rotation-servo in my program. First, I had to import the servo library that came with Arduino. Just like how to define a variable you need to place it in the memory. Now usually we would use a datatype but there was no predefined data type for a servo. Instead, we use the class servo that stems from the servo library. The reason why we want to use a class is because we can make and change the functioning capabilities of a class if we want to. The main difference between a regular datatype and a class is where the memory storage is. A class is stored in a dynamic allocation section of the memory, whereas datatypes have predefined memory space no matter how much space the value holds. Then, I told the Arduino that the servo is connected to a physical board somewhere in the program by using .attach function that comes from the servo library. Think about it the Arduino, or any physical programmable circuitry for that matter, won’t “know” that you just attached an active component like a motor unless you define it one way or another in the program. I programmed the servo to run on the values on the y-axis of the left analog stick using the .write function. For some reason, when I just let the motor directly run off the Y-axis it would run if I wasn’t moving the analog stick. That’s weird! Or was it? As a result of the default value being 128, when the analog stick is not in use. Hence, the servo will run unless I factored out this value or change the default to 90 which stops the servo. I choose to just factor out the 128 value by using if statements for a stop action. Now, I have full control over that motor. Lastly, I’m looking to build my chassis with acrylic and fully laser cut it using Computer Design Software.
My starter project was an ultrasonic radar kit produced by Velleman. The ultrasonic radar is basically a sensor that’ll beep to tell you when something is in 70 centimeter range directly in front of it. As the distance between the sensor and object decreases the beeping will increase. Hence, it is an ideal parking sensor.
Here is a video of my project
If you are interested further might I recommend you order it off the link below
It comes with a kit and instructions. It does not include a power source and says it needs 12 volts to power it, but you may use a regular 9 volt battery from your local dollar store. You will also need a good 2 feet of solid wire and you won’t be able to put together the board without some solder and a soldering iron which can all be found online or just at your regular home depot. There are some basic parts that come with a kit – a transistor, capacitors, diodes, resistors, jumper wires, IC chips, and IC sockets. Some special parts are a trim potentiometer & an ultrasonic transducer transmitter and receiver. If you don’t know the functioning capabilities of the basic parts, that is bad. If something doesn’t work, you won’t know what it is or how to even go about the problem. I would highly recommend you check out these links – Basic Components & Trim Potentiometer.
If you stared at the above links as if a pink dinosaur with 7 rainbow colored heads, glasses, and a pointer would come out of the screen to explain those parts, let me help you out. Capacitors and resistors are like yin and yang. Capacitors store electrical energy, and resistors lower or weaken the electrical energy. “Why would I use them?” Well, if an electrical component can’t handle the amount of voltage being passed through it, mitigate the voltage with a resistor! For capacitors my project has capacitors that are drawing electrical energy and storing it. Capacitor 2 is a ceramic capacitor. There are air, mylar, glass, ceramic, and super capacitors each have a different use. Might I recommend you check out this link on all the types of capacitors.
Jumper wires just let current go through them, they don’t add anything to the circuit besides a means of continuing the circuit. IC sockets just hold IC chips on them. For soldering purposes,
IC sockets take the heat so the chips come in no direct contact with the scalding solder. IC chips have a preprogram on them and, if you can’t tell, they are extremely delicate . They are very crucial because without them the circuit will never work correctly.
The transmitter would detect an object and calculate the distance and then send the information to the receiver.
Diodes simply offer one-way current. If enough voltage is reached, current will flow through.
Now that our little electrical lesson is done, let’s continue onto the technical function. There is a process that the ultrasonic radar is going through every 20 milliseconds or so (while it is connected to a power source). First, the sensor checks if there is something in its way. If nothing is there it will send a value of 0 to the program on the IC chips which causes no current to be passed through the buzzer, therefore making no noise. Now, if there is an object in the sensor’s way, it will send a signal of varying strength depending on the distance. This signal is just a number. The higher the number, the greater the distance from the ultrasonic transmitter. The lower the number, the lower the distance between the object and the ultrasonic transmitter. Since there is a signal, current will flow through the diode to the potentiometer. The potentiometer will mitigate the current depending on the signal strength of the sensor. The higher value signal strength, the lower current will be passed to the buzzer, which will make less of a noise. Likewise, the lower value signal strength, the higher current will be sent to the buzzer which will produce a louder noise.
In making this project, I had a mess of problems. A major one was that my ultrasonic sensor was telling the buzzer to buzz indefinitely. We got out a digital multimeter and checked that the main and receiver PVC boards had the right connections, which they did. Then after checking, it turns out I forgot to put in a jumper wire! Another problem was that, at first, I had all the excess metal touching on the other side of the boards. That produced a form of connection for components that weren’t meant to be connected! I fixed that but the contraption was still not working! We had to pull out the schematics and see which components were cooperating with one another. Using the digital oscilloscope, we could see the current in waves between objects. If you just get noise on the oscilloscope, then you know one of them is damaged. The schematics said that the quartz crystal was connected to a capacitor on C1 and pin 10 on first IC chip. We checked these two connections and they were both giving us noise on the oscilloscope. we pin pointed the problem to the common component, the quartz crystal. Most likely being damaged to the first mistakes I made. We replaced it but the problem hadn’t stopped. This is when I realized that many other components are damaged because the excess metal made too many incorrect connections. We built a new ultrasonic sensor using another kit and checked the new quartz crystal with oscilloscope (you can never be too careful) and it functioned properly.
BlueStamp has taught me so much. I know the basics of electrical engineering, how to use the Arduino platform, schematic design, and Google Sketchup software. In addition, to my knowledge of C++ and Robot C programming knowledge, I now know how to program Arduino. What I don’t know is what life holds in store. I don’t know whether I’ll meet big people in the future. I don’t know if life will demand me to step up to the playing field. I do know that, through BlueStamp, I’ll have a firm steel bat to hit a home run.