Driving Miss Daisy-wheel

I got the wireless key-fob working:

Family and friends have been having a lot of fun driving it around.

My end goal is to let the ‘bot talk to a base station connected to a PC. I REALLY want to write an RF bootloader, so I can reprogram without touching the ‘bot. This is the hardware for the base station ( Still need to write the software and firmware):

Deskpet pre-proto

I ordered a Nordic-FOB from Sparkfun to make the coding for the wireless module easier. While I’m waiting, I decided to hack together a pre-prototype of the deskpet using a Baby Orangutan from Pololu, that has an ATMega168 and an LB1836M, the same motor driver that the real board will use. If you want one of those Baby-O’s, get it quick, because they upgraded the motor controller on it, and the old version is going fast. On a good note, they added the LB1836M to their IC page for me, so they should be much easier to get now.

Here’s a pic of the prototype:

P.S. If you are looking for a cool off-the shelf ‘bot, the 3pi from Pololu looks really nifty. Can’t wait until it comes out…

From the “Because I can” Department…

While waiting for my RF boards to arrive from Sparkfun, I started another project (ooh, look! Something shiny!). I have always liked building things that I could carry around with me, so I decided to build my own PDA. I had the graphic LCD and plenty of processors laying around. I figured adding an RF link back to the PC would not only make it more functional but also help produce code that would be useful for the Spoka project. I also figured that I could combine it with my Tricorder project (notebook pages 3-12) and add as many sensors as I could fit in this little OKW enclosure.
Inside Size Comparison Screenshot PC RF Base

The processor is an ATMega32. I have added a 128 X 64 graphic LCD, a 2.4GHz RF Transceiver, battery-backed real time clock, 2 axis accelerometer, linear Hall effect sensor, and a white led flashlight. The IR receiver is not connected yet. I still plan to add an RGB color sensor and an IR transmitter.

The source code was compiled with WinAVR and is available here. The library for the graphic LCD is from Gregor Horvat (http://www.indata.si/grega/) for the compatible HD61202 controller. After updating a few deprecated commands, it worked first time! I can’t remember where I got the library for the DS1307 clock that I converted for the DS1305. If anyone recognizes it, please let me know. The defines for the NRF24L01 came from S. Brennen Ball.

As you might be able to see from the screenshot, I am currently reading the battery voltage (upper left), magnetic field strength (upper right), x and y acceleration (lower left), and the current time (lower right). The cross-hairs and “bubble” in the center of the screen form a 2-axis level. See the picture of it in my hand for an example with the unit tilted on one axis. The RF transceiver is working well and capable of exchanging data with a PC base unit that connects via serial at 115200 baud.

(BTW, my order arrived from Sparkfun, but I’m having so much fun with this project, I may not get back to Spoka)

Spoka project – Begin

I was at Ikea the other day (they just built one in town, so i get to go all the time) and saw a rechargeable nightlight that I thought would be cool with some RGB LEDs. As I was working on the RF link yesterday, I realized that I could make a wireless, pc-controlled RGB LED light. So I headed over and picked up a Spoka from Ikea. This thing is just begging to be hacked. It comes with a 4.8V 400mA wall wart, and an internal 3.6V 550mAh NiMH battery. The silicone rubber outer cover diffuses the light nicely.

Contents Contents Nightlight Power Input

Once you get the plastic shell out of the silicone rubber cover (it takes some work), remove the bottom by releasing the tabs on either side. Then split the shell by releasing the tabs at the top (circles), and prying lightly. There are two alignment posts on each side (arrows) that are a snug fit.
Tab 1 Tab 2 Insides LED Board Switch

After a little circuit tracing, I had the schematic:Schematic I should be able to take out the LEDs and place my circuit in the same spot in order to keep the battery/AC/rechargeable portion working.
I am planning 2 RGB LEDs (That’s all I have at the moment) behind the eyes, and a red LED behind the mouth. I’ll use a small AVR (maybe a 2313) and the MirfV2 with a ceramic chip antenna for the RF.

Watson, come here. I want to see you!

I finally managed to send some data over the RF link. Somehow I managed to break the printf function, so I only saw the data on the scope as it clocked out of the transceiver on the SPI bus, but it was the correct data. Here’s a hint if you are using the NRF24L01 chip. Go to the Nordic website and make sure you have the latest datasheet. There is a step by step guide to the minimum config for enhanced shockburst mode. Once I had all of my generic SPI problems worked out, it just fell into place. Now to wrap it all up into a nice library and install it on a robot!

P.S. If the title didn’t make any sense, try here. Be sure to check out his notebook.

Reading the Status Register

After playing around with the idea of getting an SD card running in order to get enough storage for the data structures described in my last post, I decided that it would be better, if not neccessarily easier, to get an RF link up and running and prototype the learning algorithm on the PC. So I pulled out the Mirf-V2 that I have bought from Spark Fun for just such an occasion. After perusing the forums for a while I realized that this is a tricky beast to get running, but it should be worth the effort. I also came to the decision that I am not going to hurry, but instead I am going to enjoy the process.

Knowing all of this, I began programming the base unit that will connect to the PC and convert serial to SPI for the Mirf. I built this board almost a year ago, and it has an ATMega8, a MAX233, a 7805 and a Mirf. I had a little trouble getting the SPI working, but using the scope, I managed to figure out the problem.

Finally knowing that I would need two to tan.. er send data, I wired the Mirf up to an ATMega128 breakout board that I also got from sparkfun. Tomorrow I can start writing code that will make the ‘128 board send a packet continuously, and receive it with the Mega8 board.