-
Notifications
You must be signed in to change notification settings - Fork 32
PiTeRs Parts
campbellsan edited this page Nov 13, 2014
·
29 revisions
Working from the head down, here is a list of PiTeRs parts and where I got them:
- Ultrasound sensor HC-SR04, lots of suppliers for this on eBay. I tried an infra-red distance sensor but it didn't work as well in my opinion. IR sensors also get blinded by sunlight.
- Superbright LED's These are Luxeon Star clones, 3 watt RGB LEDs. I found mine on DealXtreme, but eBay also has them listed. My ones had the anode and cathode markings reversed.
- Raspberry Pi camera A Pi NoIR would also work and you could substitute the LEDs above with infra-red LEDs if you wanted to build a 'stealth' avatar robot that could see and manoeuvre in the dark.
- Servos I just used what I had in my bits box, one is a Cirrus the other is a Futaba. Any RC servos will do, though I find they vary greatly in how they respond to the PWM signal. All this means is you have to tweak the software to set centre points and full range limits. The pan servo is let into the top deck. It rotates the tilt servo, which in turn has the head mounted on it. These ones from Hobby King are pretty inexpensive and would be fine, I'm sure.
- PiTeRs head is made of an old used kitchen cutting board. The nylon is easy to cut and bonds well with hot glue.
- Speakers I got some 8 ohm 0.5w 36mm diameter small speakers from eBay, very cheap. For improved volume and bass response, I built small bazooka tubes from bathroom tissue inners. I mounted the speakers on an old sticky tape inner and inserted that in the front. For the back of the tube, I used the aluminium from a used tea light candle with the residual wax melted and poured away. This is the same diameter as the sticky tape inner. I unravelled the tissue inner and rerolled it to match the diameter of the speaker/sticky tape assembly. Then the tea light just fits neatly on the back.
- LED driver board None of the microcontrollers can produce enough current to light the superbright LEDs, so I made a compact little six channel driver board that uses six BC337 NPN transistors. Ouch! Watch your eyes with this bad boy.
- Audio amplifier board I designed this myself. It uses a TDA2822M 8 pin DIP amplifier chip which gives adequate volume. I have a few PCBs spare, please let me know if you want one. Alternatively there are plenty of ready assembled amplifier modules available from the Far East on eBay.
- Power supply I used two separate supplies because I found the servos were causing the Pi to reboot a lot. I designed these supplies myself based on what I had in my bits box. They are based on LM2576HVT switching regulators. I use an adjustable version to power the Pi and dial it up to just under the Pi's upper voltage limit. That way, any losses in the power wiring don't cause reboots. They are built on strip board at the moment, but if there was demand I could get a PCB designed.
- Raspberry Pi I have used both Model As and Bs. The B is what I use most because it allows Wi-Fi and Bluetooth at the same time. The B+ and A+ will also work, but would need to be positioned differently on the deck to allow room to bring the audio out from the front.
- Guzunty The 'glue' that allows all the individual components to communicate. You can buy a Guzunty Kit here.
- ATMega I use a Diavolino by Evil Mad Scientist. It is a 5v 16MHz ATMega328P. You could try a slower 3v model, but I have found that a shorter cycle time on the balancing algorithm makes for a more stable robot. The 16MHz version provides a duty cycle frequency of approximately 200Hz. You could also use a Arduino Pro Mini 328 which is much smaller.
- Motor controller PiTeR uses a dual VNH3SP30 motor controller from Pololu. With hindsight, I should’ve paid the small amount extra ($10) to get the VNH2 variant. The VNH2 handles a higher rate of PWM. I found that an increased PWM frequency produced a more stable balancing response. I'm assuming that even higher is better but its not so critical that I'd replace what PiTeR already has. The controller chips get quite hot in use, so I added a couple of 16mm heatsinks.
- Battery PiTeR uses Lithium Polymer (LiPo) batteries. I use Zippy FlightMax 3S packs which provide a nominal 11.1 volts. I use a variety of capacities, mostly 2200 mAh. 5000 mAh also work but larger packs will probably not fit on the deck. LiPos store a lot of energy in a very small volume, but they require careful handling. I use a LiPo charger from Hobby King and charge them in a safety bag. Never charge a LiPo on your robot. This sounds scary, but in practice if you follow the handling rules they're completely safe. One thing you do need to pay attention to is discharging. If you over discharge a LiPo it is ruined. PiTeR has code to monitor the battery level and can shut the Pi down if desired. However, that doesn't stop the discharge completely, so if you go off and forget to disconnect the robot battery it will be ruined. I have lost one pack like this. Don't even think about trying to charge an over discharged LiPo. It will get hot and may even catch fire (hence the charging bag).
- Inertial Measurement Unit is an MPU-6050 obtained on eBay. I have also used analog accelerometers and gyros in the past, but these ones are very easy to hook up to the i2C bus of the ATMega. It needs to be read by the microcontroller and not the Pi because you want to minimise any latency in the attitude data. PiTeRs IMU is mounted on a slab of high density foam in an attempt to reduce the amount of vibration reaching the sensor. I don't know how critical this damping is. When I get the time I will try running without the foam to see if it makes a difference.
- Motors are 30:1 37D spur gear motors from Pololu. They have more backlash than I would like, which causes the robot to be a little jittery at times. Zheng motor Co. in China also make a very similar motor which is probably a lot cheaper and may have better backlash characteristics. These motors are available with and without an integrated Hall effect encoder. Don't be tempted to skip the encoder, it allows PiTeR to know exactly how far his wheels have rotated. The encoder gives 64 pulses per revolution of the motor. Since the gearbox is 30:1 reduction this gives 1920 counts per revolution of the wheel. The only drawback to the Hall effect encoder is that there is a rotating magnet at the back of the motor shaft which makes using a magnetometer in an IMU impossible. Thus, an MPU-9050 is not recommended as alternative IMU (unless you happen to have one, in which case you can just ignore the magnetometer output).
- Mounts The motors are mounted using Pololu motor mounts designed for the 37D motors. They are too flimsy and give PiTeR a rather bandy legged look. I haven't seen anything better, so I might make my own sometime.
- Wheels I use Banebot series 800 wheels, 124mm diameter by 20mm with a 1/2" Hex mount. If you are getting some, I'd recommend the 3/4" hex mount instead since it is that little bit chunkier. Be aware that you have to buy the wheel and the hubs separately, you'll want the 6mm bore Series 40 2 wide (1/2") or Series 80 1 wide (3/4" mount). Confused? It is very easy to order the wrong parts, so work with the supplier to make sure you're getting compatible pieces. The grub screws need to be dipped in thread lock before attaching to the motor shaft or else you will find the wheels come off after a while. These wheels are great, but it is becoming difficult to source them, especially outside of the USA. Last I looked, Robot Shop had them in stock. You could try different wheels but I'd advise choosing larger diameter, heavier construction wheels. I tried some smaller lighter wheels and they did not work as well.
- Decks These are cut from 6mm marine plywood available from B&Q or Home Depot. The decks are 180mm by 95mm.
- Rods 8mm threaded rods pass through all 3 decks, The ends have M8 cap nuts and intermediate decks have regular M8 nuts. Thats a total of 8 cap nuts, 16 M8 nuts and 24 M8 washers. You could maybe get away with 6mm rods and save a bit of weight.
- Interconnects These are either breadboard jumper wires both male and female or purpose built wiring harnesses. These are all based on 2.54mm spaced headers male or female as required. When making harnesses, I strongly recommend using heat shrink tubing. If you don't, you'll be forever debugging and repairing broken joints. The heat shrink tubing helps support the joint and prevents breakage caused by vibration and fall overs.
Whew! Well I think that's about it. Let me know if you need more detail on any parts of the above.