I made a vehicle of networked sensors and motors, and a GUI to control it with Python. With the GUI, I can program it in Python to respond to inputs. I got a lot of help from classmates, TAs and friends. Thanks everyone!!
The concept is based on a Braitenberg Vehicle . I made a GUI so you can flexibly program the vehicle to do whatever you want, then run it and observe the vehicle's behavior. I may use a vehicle like this as a demo in a new computational neuroscience course, to visualize how simple input/output rules govern behavior. Here's the current code for my GUI, which I started in the interface applications week, and a screenshot:
My friend Zenna helped me design the body, which has loops for holding the motors and batteries. We measured each of the components, and cut it out and assembled it:
I also designed rubber wheels, with 121-30 dry from smooth-on, at Neil's suggestion. I made a mold out of layers of acrylic, staggered to make the treads. It was less rigid than I though. So I reinforced the wheels with the original acrylic wheels. Here's the .cad file, and pictures:
Next I designed, made and programmed a bunch of circuits, to control each of the wheels and to sense light and acceleration. Here are the phototransistor, motor and accelerometer .cad files. They each have headers that connect power, ground, Tx and Rx lines, so they're networked together, and the motor board has headers to get inputs from an Xbee or the FTDI cable. Here are the phototransistor, motor and accelerometer .c files and the phototransistor, motor and accelerometer makefiles. Here are the final circuits on the vehicle:
I added Xbees to make it wireless, with the Adafruit Xbee adaptor, and following Jie's tutorial to program their addresses with Zterm. The antennas are very fragile, and fell off, so I needed to solder on new antennas (wires of the same length).
It works in the end!
Though I gave it a bit too much freedom...
It broke its wheel holder from this fall, but Adina helped me fix it with acrylic glue. In class I'll demo it, conditioning motor movements off the sensors, and we can experiment with different python codes in the GUI.