spider
This is a copy of the "spidy" robot that was published on LMR last Noverber by myblack60impala.
Components:
Sparkfun ProMini
2 DFRobot Spiders
HG7881 Motor Driver
Radio Shack 4 AAA case with switch
4 AAA batteries
In total the project cost about $30 US and took about 4 hours to build and program for a simple forward/reverse motion.
This is rev 2 of the electronics. First module used 3 AAA batteries and a Sparkfun Pro Arduino. There was insufficient power to navigate on anything but a hard surface. Also the board and battery did not fit cleanly.
This time it is quite peppy but there is insufficent 5V power available to run the Sharp IR distance sensor. Double sided tape mounts the cpu board to the battery slide on case. The lack of power pins on the pro mini also required me to splice the HG7881 power with the CPU & battery cable. Used liquid tape (black & red) which nicely covers the solder joints.
Rev 3 will be a home brew PIC24 based board with 250ma on both 3.3V & 5V. There is a 2 week lead time for boards thru Oshpark so I will hopefully publish an update.
Thanks to other LMR's I have another toy.
The PIC24 arrived and is driving the motors. Screwup on one of the SPI lines to the NRF24L01 but hope to add a jumper wire to continue the debug effort. This CPU board has 4 AAA battery clips on the bottom. Not sure they are woth the effort vs independent battery case.
Completely stuck on how to go in a straight line. Five schemes have been discussed on the Shout Box.
1. Forget the motor feedback and use a digital compass.
2. Add optical wheel encoders.
3. Add magnetic hall effect sensors
4. Try to detect motor commutator noise.
5. Add accelerameters or MPU to detect steps.
I am leaning towards number 5. Monitor the Z axis for a period of time (25 msec) and collect approx 500 samples with a low pass filter keyed to the expected frequency. Then use a FFT to get the frequency. Putting the sensor outboard the legs should help minimize the vibrations for the opposite leg assembly. The PIC24 is a 16 bit CPU running at 40MHz so I expect to be able to do an integer FFT.
Options 2 & three are simpler but there is not much room for discs as the unit is currently built. Printing some plastic parts may open up the interior.
Will post pictures later this week when I get to a reasonable internet. Comments welcome!
Update 9/30/2015
The blank boards have been here a couple of months now. Finally got around to putting down some components and started on the software. The major change was going from 4 AAA batteries to 5 and dedicated voltage regulators for the motors.
A problem on the board is two of the battery clips come too close to some I/O header pins on the bottom side. Hacked by filing the pins down and adding a piece of insulating tape. Probably would have been easier, faster and neater to just file the clips. Revised the foot print for the battery clip to clearly show the interference. I usually take me three revisions to get it correct so this project is on schedule.
The dedicated I/O headers for the I2C mpu6050 and SPI nRF24L01 are nice and the power looks clean. I did not know if the brushed motors (very inexpensive) would interfere with the radio but testings within 5 meters range has he good. I have a problems with the mpu6050. The I2C message gets hung and I have not found the magic code to unlock.
The purpose of using the mpu6050 was to try and detect footsteps by looking for changes in acceleration. So far that has eluded me. Have been taking samples every 10msec and uploading to host via radio for analysis. Going to change to 1 msec today. I suspect I will add a traditional quadrature encoder on the motors.