All New PiRoCon2 Robotics Controller

Introducing Pirocon 2

The “Gold standard” robotics controller for the Pi just got better!

pc01a

As of this week (October 14th 2014), we are shipping version 2.0 of the Pirocon controller board. This has many changes from the previous v1.x versions.

Quick summary of changes:

  • No changes to pinout or functionality – all existing software will continue to operate without change
  • Board shape fits all models of Raspberry Pi including Model B+
  • All active components now surface mount
  • Big 3A regulator for the 5V supply of both the Raspberry Pi and sensors/servos
  • Fully CE certified and RoHS compliant
  • More energy efficient – batteries last longer
  • Improved 3.3V-5V level shifters

 

Pirocon2 Functional Layout

pc02c

Clockwise from top left:

  1. Level shift selectors. Remove these jumpers if you want to use an input at 3.3V. Then you can connect directly the GPIO pin using the topmost pin freed by removing the jumper.
  2. Level shifted 3-pin block. A header with 8 sets of 3-pin connectors for 5V inputs or outputs. Note that Ground (0V) is furthest from the GPIO connector – this is opposite side to the Pirocon v1.x boards. From the top, each group of three is: Signal, 5V, Gnd
  3. The 2-pin screw terminal for connecting motor A
  4. A 4-pin terminal for directly connecting a 4-pin ultrasonic sensor – HC-SR04. This is converted on the Pirocon board to a single (selectable) pin into the GPIO
  5. The 2-pin screw terminal for connecting motor B
  6. Red indicator LED for 5V
  7. Orange indicator LED for 3.3V
  8. Selection jumper for GPIO pin to be used for ultrasonic. Default position is pin 8, but pin 23 can also be selected by moving the jumper to the left
  9. An 8-pin female header containing the SPI and voltage (5V, 3.3V, Gnd) signals
  10. This chip is the H-Bridge used to control the motors. It is an L293DD
  11. The 6-pin female header allows you to connect a 4tronix IP Display module or an Adafruit 16-channel PWM board (Adafruit model 815) for controlling multiple servos or LEDs. There are 2 of these headers (left and right) but they contain all the same signals so only one needs to be used, but is is more physically robust if the PWM board is plugged into both sockets.
  12. Selection jumper for motor voltage input. The voltage to drive the motors can be taken either directly from the DC jack input (which is used to generate the 5V for the Raspberry Pi), or from the 2-pin screw terminal on the lower edge of the Pirocon board. For most purposes, you will want this jumper to be on the right (nearest the edge of the board)
  13. The 2-pin screw terminal for an alternative motor power source. Note that this terminal does not power the 5V regulator so cannot be the only source of power
  14. A bank of 4 solder jumpers that connect the motor control pins to the selected GPIO pins. By default these are MISO, MOSI, CE0 and CE1. To change them, you should cut the tiny track between the two halves of the relevant jumper, then connect to the pin you want to use. This option is provided for flexibility, but most people will not need to change it
  15. These two jumpers permanently enable each motor driver. From a purest point of view, it is better to use these enable pins to provide the PWM signal to each motor and only use the motor control pins to determine the direction. However, in most circumstances it makes very little difference, so all the library software assumes 4-wire control and not 6-wire control. Leaving these jumpers in place ensures each motor is always enabled.
  16. Input DC jack for the regulator (and generally also for the motors). This is a 2.1mm pin jack, with centre positive. The voltage should be between 7V and 12V DC. Lower than 7V and the regulation may not be sufficient. Above 12V then the regulator may begin to overheat
  17. The left side connect for Adafruit’s PWM board – see item 11
  18. I2C and Serial (Rx, Tx) breakout female header
  19. Bi-directional level shifter chip. This converts the 5V signals to/from the 8×3 male header block into 3.3V signals for the Raspberry Pi

 

Software Support

  • In ScratchGPIO, use the addon name “PiroconB”. Download from here
  • For Python, use the standard Initio/Pirocon library available here. Although designed specifically for the Initio robot chassis, it will work unchanged for most robots with 2 drive motors

 

Errata

  • Pins 15 & 16 (Broadcom GPIOs 22 and 23) are swapped from what is shown on the silk screen
  • Pin 11 is shown as GPIO 07 on the jumper bank, instead of GPIO 17

 

Wiring the Unotron for Raspberry Pi & Microcon 3

Wiring the Unotron with Raspberry Pi and Microcon 3

Click on any image to enlarge.

step10

 

For the basic mechanical building instructions, please refer to here

 

Step 1 – Fit the Mounting Pillars

step01a

For the Model B+ you should place 4 of the 25mm pillars in the positions shown above. (Note that the one bottom-right in above picture will need the screw removing later to allow the motor to sit properly on the baseplate)

For Models A or B only 2 pillars are required in the positions shown with red ring.

 

Step 2 – Fit the Raspberry Pi

step02

After screwing in all 4 pillars for the B+, then remove the screw underneath the bottom right-hand pillar so it sites on the baseplate but isn’t screwed in.

Also, note the rubber bumper on the bottom of the mounting pillar of the Microcon v3. This rubber bumper rests onto the PCB of all models (For the Model A and B, you can removed the rubber bumper so the Microcon sits flat with its pillar on top of the mounting screw)

 

Step 3 – Push On the Microcon v3

step03

Make sure it is connect correctly to the end of the GPIO connector. For the B+ there will be 14 pins left exposed. For Models A and B, all pins will be covered.

 

Step 4 – Connect The Motor

step04

Screw in the motor (see instructions for base build here, steps 1 to 7

Depending on the wiring to the motor, you may need to swap the wires so that the software moves forwards and not backwards when required. Check this when first testing the software

 

Step 5 – Connect the Servo Lead

step05

Plug the servo lead into the position shown (marked 22 on the PCB). Make sure you have this the correct way round with the Black wire next to Gnd, Red wire on 5V and White wire on Sig(nal)

 

Step 6 – Plug in the Ultrasonic Sensor

step07

Plug the sensor into the breadboard – approximately centred left to right, but it is not critical

Then connect 4 of the 30cm Male-Female wires, ensuring you plug into the same 4 columns of the breadboard as the sensor is in

 

Step 7 – Wire the Ultrasonic Sensor to Microcon

step06

Ensure that the wires match the signal names printed on the sensor and the PCB. So:

  • Gnd -> Gnd
  • Echo -> Echo
  • Trig (or Ping) -> Ping
  • Vcc -> 5V

 

Step 8 – Wire in the Line Follower Sensors

step08

Again it is important that the voltage is the correct way round. Connect:

  • G -> Gnd
  • V+ -> +5V
  • S -> Sig

The Left sensor should be plugged into the 3 pins labelled 07

The Right sensor into pins labelled 11

 

Step 9 – Wire in the Battery Pack

step09

Very Important: The positive (Red wire) goes into the terminal marked Vin, and the negative (Black wire) into the terminal marked Gnd. If you get these the wrong way round, you will damage the driver chip.

 

Testing & Software

You have now completed the wiring of the Microcon onto the Unotron single-wheek robot. Please download the sample code to test it, remembering that you may need to swap the motor wires so forwards is forwards and not backwards. With the Pi powered up and connected to the internet, go into a terminal window (eg LXTerminal) or from the startup terminal if that’s how you run your Pi, then type (or copy and paste):

wget http://4tronix.co.uk/unotron.sh -O unotron.sh

When that is complete, type:

bash unotron.sh

Now you will have a new folder /home/pi/unotron with a library module and examples to try. Eg:

sudo python motorTest.py