HUB-ee BMD-S Arduino Proto Shield V1.1 User guide and assembly instructions Document Version 0.5 Introduction & Board Guide 2 Schematic 3 Quick User Guide 4 Assembly Guide 6 Kit Contents 7 1) Diodes and Filter Capacitors 8 2) Reset Switch 9 3) Transistors 10 4) Power Capacitors 11 5) Pin Headers 12 6) Screw Terminal 13 7) Arduino Pin Headers 14 DISCLAIMER OF LIABILITY While we always try to provide accurate information, there may be times when factual, technical or typographical inaccuracies appear in our documentation. We apologise if this happens and we reserve the right to make changes and corrections at any time, without notice. Creative Robotics expressly disclaims liability for errors or omissions in the content of this document and makes no commitment to update the information contained in this documentation. Creative Robotics expressly disclaims all liability for the interpretation and use by others of any information contained in this document. All products are subject to change without prior notice. Creative Robotics disclaims any responsibility for errors, omissions or inaccuracies in product documentation or any other data relating to our products. Creative Robotics disclaims any responsibility for loss, damage or harm caused directly or indirectly by the use of our products. (Basically: be careful, have fun but if you mess up then don t blame us) Arduino is a trademark of the Arduino Team (www.arduino.cc). Page 1
Introduction This board makes it easy to connect up a pair of HUB-ee wheels to an Arduino Uno or Leonardo board. You can power two wheels and get full sensor feedback via their quadrature encoder sensors. Connections between the board and HUB-ee wheels are via a pair of single row 0.1 headers. HUB-ee wheels can be attached by soldering a connector breakout board or mini-splitter to each header, or by directly soldering ribbon cable to the board and crimping a Micro-MaTch connector to the other end. The board has two pairs of jumper links so you can disconnect the wheel sensors, freeing up four of the Arduino pins for other purposes, and a prototyping area to add your own stuff. Board guide Page 2
Shield with connector break out boards attached Shield with mini splitter boards attached Shield with soldered on ribbon cables NOTE: You can use a single pre-assembled HUB-ee cable and just cut it in half to make a pair of cables but please be aware that, due to the way the pre-assembled cables are currently made, the ribbon cable conductor marked with a RED stripe should be soldered into the ground (GND) connection on the board. Page 3
Schematic Page 4
Quick User Guide Power Supply: This board has inputs for a main power source and will feed anything connected into the Arduino Vin pin. If you connect a power source that is outside the range that the Arduino can cope with you will risk damaging your board. A protection diode between the power input terminals and the rest of the board protects against accidental reverse polarity. A Switch connector is also provided to make adding an external power switch easier. The board kit is supplied with a pin header and jumper link that can be used instead of a switch. The board has a number of pins labelled VIO which are connected to a three pin header. A jumper link on this header allows you to connect VIO to the Arduino 3.3V or 5V power output. This helps to provide compatibility for Arduino and other microcontrollers with different voltages. Pin Mappings: Motor 1: Schematic Arduino PICAXE PICAXE Microcontroller Net Pin Pin Name Shield Pin Function Nickname M1 In1 8 C.0 S.8 Digital Out M1 In2 11 C.5 S.11 Digital Out PWM 9 C.1 S.9 PWM Out M1 QEIA 3 B.0 S.3 Hw Interrupt (Internal Pull up enabled) M1 QEIB 7 B.7 S.7 Digital In (Internal Pull up enabled) Motor 2: M2 In1 12 C.4 S.12 Digital Out M2 In2 13 C.3 S.13 Digital Out PWM 10 C.2 S.10 PWM Out M2 QEIA 2 B.2 S.2 Hw Interrupt (Internal Pull up enabled) M2 QEIB 4 B.1 S.4 Digital In (Internal Pull up enabled) Page 5
Quadrature Encoder Interface: The QEI-A (Quadrature Encoder Interface - A) outputs of motor 1 and 2 are connected to the two interrupt on change pins of the Arduino (see note below about UNO and Leonardo interrupt pin differences) The QEI-B pins are not connected to interrupt on change inputs. This configuration will let you reliably measure wheel motion at 64 counts per revolution, but not the maximum possible 128 CPI. Each quadrature encoder output is connected to the microcontroller via an NPN transistor. These transistors convert the 3.3v sensor signals into open collector drivers. When the sensor is active it will switch the transistor ON, pulling the microcontroller pin to ground. When the sensor is inactive the transistor switches off and the microcontroller pin is disconnected By using internal pull-up resistors on a microcontroller running at 5V, this arrangement allows the 3.3v sensors to drive the microcontroller pin from ground to 5V. A small capacitor on the base of each transistor acts as a low pass filter ensuring that any transient spikes in the sensor signal do not trigger accidental sensor readings. All four of the QEI outputs from the two main HUB-ee sockets (Motor 1 and 2) can be disconnected from their respective Arduino pins using the jumper links. If you don t want or need the sensor feedback then you can disconnect them and use the Arduino pins for something else. Page 6
Assembly guide Kit contents Item Quantity Arduino 6 way header 1 Arduino 8 way header 2 Arduino 10 way header 1 Standard pin header 2 Way 5 Standard pin header 3 Way 3 Transistor (2n2222) 4 Capacitor 0.022uf 4 Capacitor 100uf 35V 3 Diode 1N4817 1 Tactile Switch 1 Screw Terminal 1 Standard Jumper Links 5 Long Jumper Link 1 Page 7
1 Diode and Capacitors It is always a good idea to start with the smallest components so let s start with the diodes and capacitors. Page 8
2 Reset Switch Clip in the reset switch this allows you to reset the Arduino when the shield is in place then solder it in. Page 9
3 Transistors The four transistors are there to convert the wheel sensor outputs into open collector drivers when used in conjunction with internal pull-up resistors on the microcontroller inputs these help convert the 3.3v sensor signals into a 5V signal for the microcontroller to read. The flat side of the transistors need to line up with the markings on the board. Page 10
4 Power Capacitors There are three electrolytic capacitors on the board. These help smooth out the power supply and are important when running power hungry things like motors. These capacitors are polarised, meaning they have to go in the correct way round. Their polarity is marked in two ways, by having a longer lead on the positive side, and having a white stripe down the other side of the case marked with a minus sign. Solder these in place then trim off the leads. Page 11
5 Pin Headers Time to insert and solder a few pin headers these are for the servos, power input and the jumper links for sensors and board voltage selector (VIO). You do not need to solder all these in place if you don t want to, you may prefer to leave some off so you can solder wires to the board instead. You can also choose to solder pin headers to the switch connector (JP1) if you don t plan on using an external power switch. If you are going to solder these headers in then here is a handy tip place all the headers in the board, then place something flat (like a piece of wood or plastic) on top of the board. Now turn the whole thing over and the header pins won t all fall out now you can solder them all in at once. Page 12
6 Screw Terminal The screw terminal allows you to connect a power source easily. Stick it in the board and solder it on. Make sure the cable entry holes are on the outside! Page 13
7 Arduino pin headers (The final step!) Now we need to solder on the long pin headers that connect the shield to the Arduino these go on the bottom of the PCB. One of the easiest ways to do this (to ensure the headers go in straight) is to insert the long ends of the headers into an Arduino before placing the board on top and soldering them in place. TIP: Put the pins into the Arduino sockets to keep them straight when soldering. Now place the shield on top, and solder the pins in place Page 14