Wednesday 13 April 2016

DAVE 2 - wiring it up


It is now time to switch on the soldering iron and get serious. I used single core insulated wire because this works best in the screw terminals of the Kitronik board.

My first move was to stick the 4 x AA battery holder into position with velcro sticky tape. I used hot glue on my first DAVE but this did not stick well to the plywood and it broke away when the robot was dropped. Velcro tape holds things very firmly but has a bit of shock-absorbing give which avoids this problem. 

In electronics, red is for positive and black is for zero volts. The red 6 volt wire goes through one side of the switch. It is a double-pole double-throw switch (DPDT) which means that two separate circuits can be controlled at the same time. The other half, or pole, of the switch will be used for the 9 volt circuit for external sensors. You can't see it well but I left a loop of wire available where the black wire connects to the negative battery terminal because the black wire of the 9 volt circuit will also connect here, creating a common zero volt rail.


With the 6 volt supply in place, I led the wires up through the underside of the top deck so they could go into the Kitronik board. I arranged all the wiring so that when the top deck is removed it will open like a book and lie upside down alongside the bottom deck. This gives easy access to the inside of the robot when you need to change the batteries or fix something.

Now everything has been flipped over and you can see the red and black 6 volt wires coming up through the top deck and into the power terminals of the Kitronik board. A pair of green wires has been connected to the MOTOR1 terminals and threaded down though the top deck and then the bottom deck to reach the motors. The motors are unclipped from the gearboxes for soldering.


Flipped back, here are the motor wires running across the bottom deck. Maybe the hole would have been better on the other side of the battery holder? This setup works okay and avoids a big bunch of wires all on one side of the chassis. I'm happy enough with it. I did find a 3mm hole is rather tight for the motor wires so a 6mm hole would be better.

Here the green wires have been soldered to their motor and this has been installed in the gearbox. Yellow wires have been threaded through the decks for the other motor.


The yellow wires have been soldered to the other motor and connected to MOTOR2 on the board.

Here the 9 volt circuit has been added. The PP3 battery is stuck to the underside of the top deck using velcro tape. The PP3 connector red wire runs to the switch and the black wire runs to the 0 volt terminal of the 4 x AA battery holder, creating the common 0 volt rail I mentioned earlier. A red wire from the switch and a black wire from the 0 volt terminal run up through the top deck and finish with bare ends, ready to plug in to a breadboard mounted on the top deck. The switch now controls the 6 volt supply to the Kitronik board and the 9 volt supply to the breadboard.


And here it is finished! The top deck has been screwed onto the spacers and a breadboard has been attached using velcro tape. The project on the breadboard has a microphone and other components that react to loud sounds like a handclap by producing a short pulse. That pulse goes back through a yellow wire to the BTN_A input of the Kitronik board where MicroPython code on the micro:bit counts these pulses and drives the motors in response. I will go into more detail on this project in a future post but for now, enjoy this video of DAVE 2 in action! 

No comments:

Post a Comment