4tronix Initio Home Page

About 4tronix Initio


The Initio 4WD robot platform has been specially designed here in the UK to work easily with Arduino and Raspberry Pi controllers. Supporting products include motor driver boards, sensor shields, sensors, pan-tilt mechanisms and more. We also have a range of kits available for both Arduino and Raspberry Pi platforms

Outline Specification

  • An extremely flexible and easy to use 4WD Robot platform designed by 4tronix especially for Raspberry Pi and Arduino
  • Injection moulded from tough ABS
  • Built-in powerful 170-size motors and high-quality gearboxes
  • Arduino (UNO, Mega2560 or Leonardo) and Raspberry Pi mount directly onto the base-plate
  • 6-cell battery box with switch, charging socket, wiring for motor driver and Arduino already in place
  • Built-in speed encoders on each side with electronics already fitted
  • Each wheel can be individually decoupled from the gearbox – run as 1WD, 2WD or 3WD if you want!
  • Fixings for stepper motors (28BYJ-48 as found in our shop – not included) so you can replace the DC Motors with stepper motors for greater accuracy
  • No soldering or gluing required – simply screw together and plug in the wires (of course you can add things we haven’t thought of and they may need soldering)
  • The main chassis is delivered ready-built and all wires connected
  • All you need to do is add in the control boards and screw on the top plate
  • Mounting plates included for IR obstacle sensors and Line sensors
  • Loads of extra mountings for additional boards included


Purchasing Initio

4tronix Initio Assembly


Online Guides:

Other Assembly Information

Downloadable PDF Guides:



Motors Not Turning

  • For Raspberry Pi, ensure you are using correct software. Use the software in “robohat” folder if using RoboHat, or in “initio” folder if using Pirocon
  • Batteries. You must use good quality rechargeable batteries, not alkaline. We strongly recommend Energizer Extreme 2300mAH




4tronix Initio Programming Examples


Arduino examples are found in our Arduino support site

  • initio_01 simply moves initio back and forwards and spins
  • initio_02 uses PWM to control the speed and create smooth turns
  • initio_03 shows how to use the speed sensors to move accurate distances
  • EncoderTest01 tests the operation of both wheel sensors. Use the switches on the top of the gearbox to disengage the wheels from the gears, then turn the wheels by hand to see the results on the serial monitor
  • initio_04 uses the obstacle sensors to avoid obstacles
  • initio_05 adds a light-follower function using LDRs mounted on the Pan/Tilt (Connect one end of each LDR to 0V, the other ends to A0..A3)
  • initio_06 uses the line sensors to follow a black line and stop when it reaches a cross-roads
  • initio_07 uses the ultrasonic sensor mounted on the Pan/Tilt to avoid obstacles and travel in the direction of most space



Raspberry Pi ScratchGPIO examples are found in our GitHub

  • MotorTestB.sb    Allows control of the motors using arrow keys (ScratchGPIO)
  • PanTiltTest.sb    Allows moving the pan/tilt assembly using arrow keys (ScratchGPIO)
  • UltraSonicTest.sb    Shows operation of the UltraSonic sensor (ScartchGPIO)
  • TrackerTest.sb    Uses the ultrasonic sensor on a Pan/Tilt assembly to follow (ScratchGPIO)
  • Avoider.sb    Uses IR obstacle sensors and motors to avoid objects (ScratchGPIO)
  • InitioTest.sb    Uses line sensors, obstacles sensors and motors (ScartchGPIO)
  • Also see this post for using the wheel sensors with Raspberry Pi and the PiRoCon


Raspberry Pi Python examples can be downloaded from an LXterminal session and connected to the internet, type in or copy and paste:.

wget https://4tronix.co.uk/robohat.sh -O robohat.sh

Then type in:

bash robohat.sh

You will then have a number of python examples in the robohat folder to try. Run them with:

sudo python filename.py
  • motorTest2.py:  use the arrow keys to move forwards and backwards, spin left or spin right. Space to stop. Use . and , to increase or decrease speed
  • sonarTest.py: Prints the distance in centimetres from the ultrasonic sensor, once every second
  • irTest.py: Prints the state of the IR line and obstacles sensors, every time the state changes.
  • servoTest.py:  use the arrow keys to pan and tilt

NB. If using the older Pirocon controller the replace robohat with initio throughout the above.


Yes, you can now program the Initio for Raspberry Pi directly in C. What’s more, it works seamlessly with both the Pirocon and the RoboHat control boards so your program can work on either without being changed

Visit this link to find out more about this which was written by Dr Raimund Kirner at the University of Hertfordshire




PiRoCon Robotics Controller – Links

Links for Various Resources for the 4tronix PiRoCon



If you are experiencing low power to the motors when using the DC Jack input, it is very likely that you have not set the power selection jumper correctly to the right as shown below:



New: PiRoCon v2 released



  • 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


Getting to Know Your PiRoCon

Tour of PiRoCon

In this post we will take a tour around the PiRoCon v2 board and see how all the various elements operate and can be configured



Power Supply


  • The DC Jack (bottom left) is the input connection for your battery voltage. The voltage should be between 7V and 12V and will need to be able to supply at least 2A. This is a 2.1mm DC Jack with positive centre pin. Below about 6.5V, the regulator will not be able to output the 5V required for the Raspberry Pi to work. Above 12V, the regulator will probably get too hot.
  • The voltage regulator (lower left side) is used to convert the input voltage to 5V as required by the Raspberry Pi. For version 2 of PiRoCon we use a switching regulator which barely gets warm even at higher input voltages and no heatsink is required. Note that the motors are not powered from the regulated power supply


Motor Drivers


  • The terminals for two DC motors are at the top right of the board. Motor A on the left and Motor B on the right
  • Both terminals are wired the same way (left to right) so the same inputs would drive the motors in the same direction. If you use one motor for a left side drive on a robot and the other for a right side drive, then you should swap the wiring for the second motor. For instance, using the example programs on the Initio, you should wire Red-Black-Black-Red
  • The motor terminals are driven directly from the output of the H-Bridge driver chip L293DD (shown just below the motor terminals)
  • The 4 GPIO pins used to drive the chip are the SPI pins CE0, CE1, MISO and MOSI. These are connected via solder jumpers (to left of the L293D) – these are pins 19, 21, 24, 26
  • If you want to use other pins to drive the motors, then you should cut these these connections and wire your own connections to the required positions
  • Each motor has an enable pin which by default is connected directly to 5V using the jumpers just above the solder jumpers and below the 8×3 header block. For some purposes it is better to use the enable pins for the PWM signal, so that you can use the 4 control pins to purely control the direction. If you want to do that, then you should remove the jumpers and wire the enable pins to a PWM source (eg. an Adafruit 16-channel PWM board plugged into the PiRoCon expansion sockets)
  • In the bottom right of the photo above is a separate 2-pin terminal for external power. If you don’t want to drive the motors from the incoming battery voltage on the DC jack, you can move the selection jumper (just above the 2-pin terminal) and provide your motor voltage directly to the 2-pin terminal. This voltage can be from 5V-15V DC – ensure you connect it the correct way round. Note that this 2-pin terminal does NOT power the 5V regulator, only the motors.
  • For normal operation using the DC jack input. ensure the jumper is placed to the right side, or no power will get to the motors


5V GPIO Connector (8×3 rows)


  • NOTE: The Ground pin for the 8×3 block of GPIO pins is at the lower side for v2 PiRoCon (upper side for v1), so be careful when wiring
  • There are 8 unallocated GPIO pins available and these are brought out to a bank of 8×3 male headers
  • The headers are at 0.1″ pitch so you can connect standard 3-pin 5V sensors or servos etc. directly to them
  • Each signal is separately fed through a bidirectional level converter so can safely be used to input or output at 5V
  • Each signal is labelled with an x-number (on the jumper block) and a #-number
    • x refers to the physical pin number on the GPIO connector. So the first signal on the left is x07 which is pin 7 on the GPIO connector
    • # refers to the GPIO number itself. So the first signal (x07) is GPIO#04
  • Each signal can be disconnected from the GPIO header to the Raspberry Pi, by removing the relevant 2-pin jumper (shown top left)
    • If you remove the jumper, then the related signal in the bank of 8×3 is no longer in use
    • You should then connect a 3.3v max input or output to the signal pin where the jumper was
    • This allows the use of 3.3V sensors (eg. the wheels sensors on the Initio)
    • There is a 2-pin header (top left) which has two 3.3V connections, intended for powering 3.3V sensors
  1. #04 – x07
  2. #17 – x11
  3. #18 – x12
  4. #27 – x13
  5. #23 – x16 NB. Labelled incorrectly on board as #22
  6. #22 – x15 NB. Labelled incorrectly on board as #23
  7. #24 – x18
  8. #25 – x22

Please note, as described above, there is a layout mistake on the PCB which results in pins 15 and 16 (GPIO numbers 22 and 23) being swapped. So ensure that you plug into the correct connection for your application

Ultrasonic Sensor


  • There is a group of 4 pins (shown above at top right) that are designed to add an HC-SR04 ultrasonic sensor directly to
  • From the left, these are 5V, Trig, Echo, Gnd and match the ordering of the pins on the sensor
  • There are 3 resistors which process the signals so that both Trigger and Echo can use the same GPIO pin on the Raspberry Pi and also that this is 3.3V safe
  • The jumper (just below and left of the ultrasonic 4-pin connector) can be used to select either TXD (pin 8) or SCLK (pin 23)
  • If you want to use a completely different pin, simply remove the jumper completely and connect the pin you want to use to the centre pin of these 3


SPI Connector


This 8-pin female header allows you to connect the SPI signals. Note however that these are also used for motor controls by default, so you may need to attach the motors to different pins if you want to use SPI. Alternatively, simply don’t connect the motors when using SPI.

  1. 5V
  2. 3.3V
  3. CE1
  4. CE0
  5. SCLK
  6. MISO
  7. MOSI
  8. GND


I2C Connector


This 6-pin female header allows you to connect additional modules using the I2C connections. These are not used on the PiRoCon itself, although the expansion boards (see below) can use them. This connector also has the UART RXD/TXD pins on together with Gnd and 3.3V

  1. Gnd
  2. RXD
  3. TXD
  4. SDA
  5. SCL
  6. 3.3V


Expansion Board Sockets


There are two 6-pin expansions sockets that use I2C connections to add functionality to the PiRoCon. Expansion boards available right now are:

  • 4-channel analog input (ADC) with single channel analog output (DAC) from 4tronix



  • 16-channel PWM or servo driver from Adafruit



If you use stacking headers for the 6-pin connectors, and right-angle headers for the signals on the boards, you can stack these I2C expansion boards as much as you like. Here are both the above expansion boards fitted:



MicRoCon mini Robotics Controller Board for Raspberry Pi – Assembling

MicRoCon Robotics Controller Kit



Click on any image to enlarge.

The MicRoCon is the baby sister to the more powerful PiRoCon board, but incorporates many of the same features and in fact can use exactly the same code for programming as the pins it shares are the same. Here is a brief comparison table between the controllers:


Check you Have all the Parts


  • Printed Circuit Board (PCB) with the 5V regulator already fitted
  • L293D H-Bridge driver chip
  • 470uF capacitors x 2
  • 100uH Inductor
  • Diode
  • 2-pin Screw Terminals x 3
  • 2K2 resistors x 2 (coded Red-Red-Red-Gold)
  • 1K resistor (coded Brown-Black-Red-Gold)
  • 4×3 male header blocks x2 (one has 2 pins removed) [alternatively we may ship with 4 off 2×3 male header blocks depending on availability]
  • 6-pin female header
  • 26-pin GPIO header
  • Fixing hardware – M3 screw, M3 nut
  • Heatsink
  • Rubber “foot”


Starting Soldering

If you haven’t soldered before, you might want to check out this instructable. I find that the following order of soldering works best, starting with the lowest profile components and moving to the highest. This allows me to place the components through the holes in the PCB, then turn the PCB over onto the desk surface and gravity will hold the components in place. You can also use Blutack to hold the components in place while you solder


1. Add the Resistors

The PCB is labelled with the resistor values. 2K2 resistors are marked by Red-Red-Red-Gold bands, and the 1K resistors is Brown-Black-Red-Gold. It is neatest to ensure that all resistors point the same way. Make sure you snip off the leads on the back after soldering.


2. Add the Diode

The PCB is labelled with the resistor values. 2K2 resistors are marked by Red-Red-Red-Gold bands, and the 1K resistors is Brown-Black-Red-Gold. It is neatest to ensure that all resistors point the same way. Make sure you snip off the leads on the back after soldering.


3. Add the L293D chip

Make sure that pin 1, marked by the little black round indentation and the U-shaped cutout of the chip, is at the edge of the board as shown below.

Note: This chip may already be inserted in the board for protection during transport – but it won’t be soldered.


4. Add the screw terminals

These terminals are used to connect the motors and also to supply external power to the board for the regulator and the motor driver.

Solder all the terminals onto the PCB facing outwards



5. Add the Male Header blocks

These 4×3 header blocks are slightly different from each other, as one has 2 pins removed from it. Make sure you put them into the correct place as they would be difficult to remove if placed incorrectly (of course the block with all its pins won’t fit into the other position, but vice versa is possible).




7. Add the 6-Pin Female Header

This header brings out the I2C pins from the Raspberry Pi together with 5V, 3.3V and Ground. This is our standard layout and the 4tronix IP Display dongle will fit directly in here.



8. Add the 470uF Capacitors C1 and C2

These are polarised and must be placed the correct way or magic smoke will appear. The long lead is positive and should be placed in the hole marked with a ‘+’ on the PCB. The casing has a grey band with down arrows next to the negative pin – the grey band should be facing the GPIO connector as shown below. Cut off the legs on the underside after soldering



9. Solder the GPIO Connector to Bottom of PCB

Your kit may be provided with a choice of standard or extended header – select the one you want to use. The other is not required. Make sure you solder this to the correct side of the board!




11. Finally Fit the Pillar and rubber foot, then fit onto the Raspberry Pi

mcStep12a   mcStep13a  mcStep14a  mcStep15a


Return to MicRoCon Home