Saturday, November 22, 2008

Lia Niederberger, Robot Genius

Lia finished the Lego NXT humanoid, and programmed it to say "Good Morning" and shake its head when its arm button is pressed, but only if the lights are on. (If the lights are off, Mr. Roboto is sleeping.) Brilliant!





Tuesday, November 4, 2008

Lego NXT Bluetooth

Weirdly, when I went to plug the batteries in the NXT brain, the LCD was working. Guess about 48 hours juice free was enough to purge the demons. Trying to figure out how to get Bluetooth working on Lia's iMac with her NXT, I called tech support again, and they sent me this:

1. Turn off the NXT brick.
2. Unplug the Bluetooth Dongle.
3. Launch the NXT software.
4. Click the Go button next to Start a New Program
5. In the lower right corner, click the button that looks like a NXT brick to bring up the Communications window.
6. Click on the Communications tab
7. Remove everything in this list by clicking on the item and the Remove button.
8. Turn on the NXT brick.
9. In the brick menu, choose Bluetooth and then My Contacts
10. Delete all the Contacts listed
11. Plug in the Bluetooth Dongle.
12. Make sure the NXT brick is still turned on.
13. Back in the NXT software, return to the Communications Windows.
14. Click the Scan button (you may to do this a few times until the NXT brick appears in the Communications list). Note: When you click Scan, the MAC default Bluetooth dialog pops up and scan for devices. Select the NXT and click Select.
15. Once the brick appears in the Communications list, click the Connect button.
16. Type in 1234 if prompted for a Passkey and click the OK button.
17. The NXT brick should make an alert sound. If 1234 is selected, press the orange button to confirm the connection.
18. Back in the NXT software, the Communications window should now show a status of Connected. The Bluetooth icon on the NXT brick should now show a <> (in the upper left corner of the brick) which means that you are paired.

Lego NXT humanoid

For her next robot project, Lia wants to build a humanoid NXT. The LCD stopped working on the main NXT brain, so I called Lego tech support, and they sent me a long list of instructions. I could either (1) walk into Lia's room, log her out, log into my Gmail to read the instructions, or (2) post them here so that I can access them without logging Lia out. I choose (2):

1. Unplug the NXT Brick from the computer.
2. Turn the NXT brick ON.
3. Flip the brick upside down, so that the USB port is at the top left of the brick.
4. In top left-hand corner of back of brick, is a hole with a reset button. Use a paperclip (straightened out) to push this button 5 seconds or until the screen goes blank. You will often hear a soft ticking emitting from the brick.
5. Set the brick down for now. Do not connect to the brick to the computer. Please be aware the brick will not turn on at this point, but will work once the process is complete.
6. Next, please visit http://mindstorms.lego.com/support/updates/ . Locate MINDSTORMS NXT Driver v1.02 and click either on the link under PC or MAC depending on your operating system.
7. Save the file to your desktop (upload1F7B2420-A5ED-44FF-
9460-E262657029DC.zip for PC or upload41336AE8-40FE-4AF9-8050-3F1D9A28427B.dmg for Mac)
8. Unzip or Decompress the file using your favorite unzip utility (Macs will automatically do this when double-clicked)
9. Open the folder upload1F7B2420-A5ED-44FF-9460-E262657029DC on the PC or upload41336AE8-40FE-4AF9-8050-3F1D9A28427B.dmg on the Mac.
10. Double-click the Setup.exe file on PC or the LegoDriver.mpkg on a Mac to install.
11. Follow the prompts.
12. Click Shutdown.
13. Plug in the NXT while the computer is off.
14. Start the computer.
15. Visit http://mindstorms.lego.com/support/updates/. Locate LEGO MINDSTORMS NXT Firmware v1.05 and click either on the link under PC or MAC depending on your operating system.
16. Unzip or Decompress the file using your favorite unzip utility. (Macs will automatically do this when double-clicked)
17. Launch the NXT software.
18. Click Tools and Update NXT Firmware.
19. Click the Browse button and choose the MINDSTORMS NXT Firmware folder on the desktop. Click the OK button.
20. Click the Download button. (If the brick is not detected at this point, check that the cables are connected firmly. If that does not resolve the issue, insert new batteries in the brick.)
21. Once the download process is complete, the NXT will turn.
22. Turn the NXT off and then turn it back on. The NXT Brick is ready for use!

Sunday, October 5, 2008

Linuxed!

There's nothing like taking a job as Department Chair to slow down robot construction. Having had the first weekend in two years without a major undertaking or disaster under way, I naturally turned back to building Robot 3.

Simon promised me that if I gave him a hunk of metal and an AutoCAD file, he'd lathe Robot 3's body. How can you pass that up? So I started learning AutoCAD, which is anything but intuitive. I'm up to the section on layers in Just Enough AutoCAD 2007, a book I highly recommend for those new to AutoCAD (it's my third try at a good AutoCAD book, and this one's the best.)

As something of a diversion, the program I'm using to program Robot 3's brain is Dynamic C version 9, which up until the present is the only reason Mothership is a multiboot system. (Dynamic C only runs on Windows.) Having recently upgraded Mothership's Linux to Fedora 9 and VMware Workstation to 6.5, I decided once again to try to program Robot 3's brain from the Linux side. Dynamic C talks to Robot 3's brain through Mothership's serial port, and I spent the entire morning trying without luck to configure VMware to talk to Fedora's serial port.

Then I had the simultaneously brilliant and boneheaded idea just to use a USB-to-serial converter to have Dynamic C running in VMware talk through Fedora to Robot 3's brain. Eureka! I can now program Robot 3 from the Linux side, and no longer need to boot up Windows just to program Robot 3. Here's a picture of Robot 3's brain being programmed through the USB-to-serial converter from Mothership.


I now return to learning AutoCAD!

Sunday, February 11, 2007

Boarded!

After breadboarding, I finished my schematic in gEDA's 'gschem', and then turned it into a printed circuit board using gEDA's 'pcb'. I then sent the Gerber files that 'pcb' generated to Sunstone, and a few days later a pretty PCB appeared in the mail!


(Note the "Niederbot 3.0" in the bottom right corner, hee hee.) I had ordered all the parts from Digikey, Mouser and Jameco, so by the time the board arrived, it was time to solder. Everything works, and Robot 3's brain is complete!

Sunday, February 4, 2007

Rat's nest!

"Where it's at! I got two turntables and a microphone..."
(Beck, Odelay)

Like Robot number 2, Robot number 3 needs two motors for motion. Adding a second stepper was harder than I thought. The stepper motors skipped, ending up in different positions and completely defeating the purpose of using stepper motors in the first place. So I learned a lot about steppers, voltage requirements, how choppers work, and as in life, how timing is everything. Finally I added a cool digital servo, which was easy to get going as the signal could be driven straight from the Rabbit, and my breadboard was finished. What a rat's nest!

Sunday, January 21, 2007

Going Mobile!

"I can pull up by the curb, I can make it on the road, Goin' mobile..." (The Who, Who's Next)

What would a mobile robot be without mobility? One of the main features of Robot 3 is tighter control over motion using stepper motors. I hadn't previously used stepper motors, and so had planned to use a ready-made motor controller, and put off making an in-board hardware designed controller as a possible project for Robot 4. I chose the Active Robots Easy-Step 3000 controller, and the Sanyo Denki H546 bipolar stepper motor. I hooked up power, connected the leads, and watched smoke billow from the $80 controller.

There's a lot in this world 80 bucks more fun than watching smoke curl from a PC board. Four rather compelling hands of poker, for example. A decent steak dinner, replete with martini, a decent Cab by the glass, Caesar salad and chocolate desert. Twenty five comic books. Oh, well.

So I set about breadboarding a bipolar stepper motor controller using the STMicroelectronics L297 and L298 chips. In about the time it took the Bears to win the NFC championship and about half the time it took the Colts to win the AFC, I had a spinning Denki.