Sunday, June 2, 2013

The Skeleton is Done

The mechanical elements (everything made of the LEGO Technic) is completed for Mr. Domino (pronounced Doe-mee-no). This means a domino can be ejected from the clip, as shown in Laying the First Domino, down a chute which holds the domino until the last linkage pushes it out the back of the robot. 

The 'front' of the bot is on the right with the first mechanism. It spits the dominos out to the left, they fall down to shaft whereupon the second mechanism, bottom left, pushes them out. Below is a video of the mechanism working at once - the two are geared together for two reasons: (1) is means only one motor is required to power everything and (2) it keeps the two mechanisms perfectly synchronized. 

The obvious next step is to add the Arduino, motors, and some sensors to the mechanical skeleton. The challenge in this will be in coupling the servo motors I bought with the LEGO Technic shafts. I hope to add some button-like sensors so that the robot knows when it is out of dominoes in the clip. 

Something I still have to determine is whether to drive the wheels independently or off the same shaft - whether or not it should need to turn. Building this robot will be ongoing, so regardless of which I choose I plan on eventually having it turning, swimming, and perhaps even flying. Below are some more angles, as the supported video quality above is relatively low. 



Tuesday, May 21, 2013

Laying the First Domino

I recently began building the first prototype of the domino laying robot out of Technic LEGOs. They are a great tool to quickly build a working model. In this case I've started with linkage that will eject dominoes from the clip. It works similar to a piston powering a train wheel, only in reverse. 
After a domino is ejected out to the left it will travel down a curving chute, ending up vertical on the ground. At that point another linkage will push the domino out of the robot. This final push will move backward at the same speed the robot moves forward, causing the domino to stand still and giving it time to balance. 

The gear on the right side, which will spin to move the center piston left and right will be driven by continuous servo motor. Typically servo motors have a limited degree of motion and the robot controls which angle the motor is at at any given time. In the case of continuous servos, the programmer controls how fast the servo goes and the motor continues to spin. I purchased a medium continuous servo from Sparkfun to learn how to program one. 

I programmed it in a way very similar to the Potentiometer LED project from Snow Day Tinkering.The potentiometer defined a variable which told the servo how fast and in which direction to spin. Programming the servo was very simple and the PWM wire broke up easily into three separate wires to plug into the Arduino and breadboard. PWM stands for pulse-width modulation. The PWM wire is really three cables, 5V (red), ground (black), and signal (white). The signal cable controls how fast the motor goes by turning the servo on and off very rapidly with different intervals. For example to achieve 50% velocity the signal would alternate between on and off being off half the time and on the other half. 

Thursday, May 2, 2013

Survey Results and Mr. Domino

The survey is now closed! The results showed the combination lock opener as the clear winner, with the recent domino laying robot follow. However, it has come to my attention that there was a miscommunication  -  many thought that the combination lock opener would 'hack' a lock or break into it. On the contrary, the idea I had was for the user to enter their combination in numerically, set the locker to 0, enter the size of the combination (35, 40, 45, or even 50) and only then let the robot open the lock. It's kind of boring put that way.


So, instead of listening to the people I'm going to make a domino laying robot. It will hold a clip of dominoes and drive forward while laying the track of dominoes, and occasionally need a refill. I've started prototyping with LEGO Technic parts simply because they are easy to work with. I have also purchased some small servo motors to start learning the coding and wiring for them (which is pretty simple). More on that will come in a subsequent blog post.

Over the next 2-3 weeks I will be working on building the robot!

Thursday, March 21, 2013

FIRST Pittsburgh Regional Robotics Competition

This last weekend was the FRC Pittsburgh regional. There were over 40 high school teams competing in the Frisbee-based competition, so the Peterson Events Center was packed with thousands of teenagers. I was there as captain/driver of City High's team, the Short Circuits (1743)  (as to why our team is named after an electrical failure, I'm at a loss). In short, it was the best robot our school has built and we consistently scored every match.

The competition lasted from Thursday to Saturday. Here is a basic schedule breakdown:

Thursday: Pass inspections and compete in practice matches

Friday: Compete in qualifying matches to develop a rank

Saturday: In the morning finish qualifying matches, in the afternoon are the final alliance selections and subsequent tournament

In fact, we were ranked first or second Friday morning and were in the top 10 90% of the competition. Our robot was one of the few to pick Frisbees off of the ground and most of the competition was just honing in shooting and dealing with small issues as they arose. These issues, like a broken belt or bad autonomous code, are dealt with the in pits:










Each team has a pit on the left side of the curtain and it is where they make adjustments to the robot or talk strategy. After a few devastating loses on Saturday morning, our team finished ranked 16th (the worst all weekend). This excluded us from be one of the alliance captains in the selections at noon and we were, furthermore, not one of the 24 teams to go into the tournament. But, because we were the top ranked team remaining we got to sit with our robot throughout the tournament in case there were any catastrophic failures in the other robots. 


And finally, all the mascots doing the Harlem Shake here.




Wednesday, March 6, 2013

Snow Day Tinkering

I had this old Sony boombox that used a lot as a kid to listen to Bruce Springsteen or Jars of Clay cassettes. It had a lot of buttons on it, several moving parts, and even a small LCD. What better way to make use of a snow day than to take apart old electronics?

I was thoroughly surprised by the amount of electronics inside the player. There's a main board, a power management board, an LCD board, a radio board, and several mechanisms for cassette and CD playing. 

The main board had several small trimmer potentiometers on it along with 2 much larger potentiometers. I desoldered one of each of those along with the small LCD to see if I could figure out how their wiring worked. This was fairly difficult to do and I was afraid the heat might ruin the LCD.

To test the LCD I used the 5 volt and ground ports on the Arduino and just made different connections on the screens 8 pins. There really weren't any consistent patterns that I could make out, but the screen was definitely working. I tried looking up a pin-out online, but there isn't much support for a 1 in by 1 in display from a 90's boombox.

There is, however, a lot more support for wiring up a simple trimmer potentiometer. The potentiometer as three pins, a positive, a ground, and the signal (the middle pin). This signal is analog in that it doesn't send 1s and 0s, it sends a variable voltage. Rather that research exactly what this signal looks like, I decided to use another great feature of the Arduino, the serial monitor.  It allows me to hook up a sensor into an analog pin and then print out all the numbers that come out. Doing this, the returns range from  0 to 1023. 

To put the sensor to actual use, I wired it up with an LED. LEDs can be programmed digitally (on or off) or through an PWM signal. A PWM signal essentially turns the LED on and off so fast that it looks like it has a partial brightness. This signal is given by a number from 0 to 255. In the code, I just multiplied the input from the potentiometer by .25 to get the proportional output to the LED. It is more elegant than using one or two different buttons. In the picture, the potentiometer is the little yellow circle. 

I tried to do the same thing with the larger potentiometers but when I hooked them up to the Arduino they shorted (even with resistors) and created a lovely smell. Thankfully the Arduino shuts itself off before it gets destroyed by my ignorance. 

To see the below wiring in more detail or to take a look at the code click on the Projects page and follow the subsequent links. 

Soon I will either put the DC motors to use by buying a motor controller or I'll purchase some servo motors which I can drive directly from the Arduino.



Tuesday, March 5, 2013

Fritzing!

I just found a great new resource for robot hobbyists called Fritzing. The folks there have created a great software that lets a hobbyist create visual or technical schematics of their circuits. Ideally, it will allow me to work on mapping out the electronics and ensuring their integrity without ever having to touch a wire. It should greatly increase my efficiency  as I'll be able to do the most difficult part of building circuits at school - planning the circuit out. 

Below is the schematic I just made for the 'Magic LEDs' project - it makes the wiring very clear.

For anyone interested, you can follow the link to download the software (which doesn't even require an install) here.


























I will continue to use this software to map out any projects I work on in the future, including the main robot. You'll be able to see them on the project page (soon to replace the code page) which will include schematics, code, and links the the respective blog posts.

Fritzing also has compiled their starter kits for arduino boards, their own accessories, and great guides that utilize the community using their software. Check them out in the links page.

Also, look forward to future posts - I'll be working with an accelerometer for the Arduino and I'll launch a survey for your input into what kind of robot I should make. 

Tuesday, February 26, 2013

Science Center Booth

This last week was National Engineers Week. Each year at this time, the Carnegie Science Center of Pittsburgh makes room (somehow) for a ton of engineers to come and set up booths with the goal of getting kids interested in engineering. 

FIRST Robotics is 4 tiered robotics competition designed for K through 12th grade students. I've participated in the program at various levels since 6th grade and FIRST is ultimately what made me decide to go into robotics. To help promote the program, City Charter High School's FTC and FRC teams set up a booth with Patricia Depra, the regional director of FIRST.

We had a large robot chassis up on crates spinning its wheels and smaller FTC robots hanging rungs. Over the course of the day (Saturday) I had to opportunity to speak to at least 40 parents about the program. While few of them had heard of FIRST, they were all really interested at getting their own children involved in robotics. 

Friday, February 8, 2013

Magic LEDs

With the basic LED blink program under my belt I decided to step the light show up a notch. Part of the Getting Started with Arduino Kit is a small LED which, instead of only making one color, can combine red, green, and blue to make virtually any color. I made a small circuit that lets you cycle through all of the colors in the spectrum by pressing a left or right or button.


Writing the program was difficult numerically because the LED works by receiving three different signals, one for each color. The signal strength, in the code, is denoted by a number between 0 and 255. To get the light to 'cycle' I had to increase one light to max, increase the next to max, decrease the first, increase the next and so on. 

On the left is a picture of the code within the Arduino IDE. Below also is a video in the dark, where you can see the different glows of the independent lights.


The full code is 101 lines long. To see the code from the program go to the Projects page, scroll down to the appropriate project, and select the code. There you can also find the schematics for the wiring.







Thursday, February 7, 2013

Getting Started with Arduino

I bought the 'Getting Started with Arduino Kit v3.0' from Radio Shack. It includes the Arduino Uno microcontroller and a lot of little electronics. 

The microcontroller is the computer for the robot I'll be building. It stores all the code and performs the computations -- basically managing the sensors and actuators. Due to my lack of experience with Arduino (or building small robots in general) I also picked up a digital copy of Getting Started with Arduino Edition 2 to help me get started.

Arduino-Button-LED Circuit
Programming the Arduino requires the Arduino IDE installed on a connected computer. This IDE (an integrated development environment) basically lets me write code and translate and transfer it to the Arduino. 

With the help of the book I was able to light up different LEDs (sounds impressive, right?). To do so I used some wiring, the lights themselves, and the breadboard -- all included in the kit. A breadboard lets you quickly wire circuits without using solder.

The circuit in the picture lights up an LED when the button is pressed and then turns the light off when pressed again. Going forward I'll keep making more advanced circuits on the same basic principle: sense, think, then act