Agobo Software

Software for Agobo

Python

You can download the latest python software: as a RAR file, or from GitHub

Alternatively, you can use the following commands from your Raspberry Pi in the home folder. (open LXTerminal from desktop):

  • wget http://4tronix.co.uk/agobo.sh -O agobo.sh
  • bash agobo.sh

 

Files included

  • agobo.py This is the python library module, see the first few lines of the library for listing of all the exposed functions for controlling motors, LEDs and reading sensors
  • motorTest2.py – use the arrow keys on your keyboard to control the direction and speed of the motors
  • irTest.py – check the state of the IR line sensors
  • sonarTest.py – print the distance using the UltraSonic sensor
  • ledTest.py – flashes the white LEDs on Agobo. NOTE: This does not operate the neopixels on Agobo2, see the note below
  • switchTest.py – shows the state of the mode switch once per second
  • neopixel.py and strandtest.py – produce pretty patterns on the neopixel attached to PlusPlate and any extended ones see Adafruit’s blog for info

 

Setting up Agobo2 Neopixels

Before you can use the neopixels on Agobo2, you will need to install the necessary drivers. This is the same operation as for the PlayHAT, so let’s use the instructions for that. You can always move the files over to your Agobo folder afterwards

Ensure your Raspberry Pi is connected to the internet

$ sudo apt-get install git$ git clone https://github.com/4tronix/PlayHAT
$ cd ~/PlayHAT
$ sudo apt-get install python-pip python-dev
$ sudo python setup.py install

Now you can run the strandtest.py demo as follows:
$ sudo python strandtest.py

Agobo Hackable Robot for Raspberry Pi Model A+

Specification

  • Designed for Raspberry Pi Model A+ (Can also fit B+ and 2B using optional mountings)
  • Pre-assembled. Only requires front caster, battery holder and Pi to be screwed on and then push the wheels on.
  • Raspberry Pi plugs directly onto the main PCB
  • Two N20 size metal geared motors fully and individually controllable in software
  • Built in line-follower sensors with indicator LEDs
  • Separately controllable front LEDs left and right (on Agobo2 these are fully addressable RGB neopixels)
  • Power on/off switch and LED
  • Connector for optional plug-in ultrasonic distance sensor
  • Breakout header for a standard serial console cable (ideal way to program a headless Model A+)
  • Breakout I²C header for our IP Display dongle
  • Prototyping area to add your own sensors
  • Fully replicated 40-pin GPIO header so you can attach your own addons
  • Additional mounting holes to attach sensors or extra hardware

 

Optional Extras

  • Ultrasonic sensors (HC-SR04) which simply plugs into the connector at the front
  • Acrylic cover with mounting hardware to cover and protect the Raspberry Pi Model A+ (included as standard in Agobo2)
  • PlusPlate™ Additional prototyping board and mounting hardware. This allows a full size area to add your own electronics from a simple LED, to more complex items including integrated circuits, RF modules and neopixels. See separate specification. The board comes complete with single, ready-wired, neoPixel with interface to extend to many, and a position for nRF24L01 socket
  • Serial console cable which allows easy access to the Raspberry Pi command line without any setup required
  • Super short micro USB cable to tidy up the battery connection
  • Pre-loaded SD card with the latest Raspbian software and Agobo software (Python and Scratch)
  • Wifi dongle
  • Additional mounting accessories to enable mounting the Raspberry Pi B+ or Raspberry Pi 2 Model B

 

Software

  • A Python library module and examples can be downloaded directly onto the A+ (if it has an internet connection) or transferred via USB stick or console cable
  • ScratchGPIO supports Agobo as an Addon board type from release 6.xxx (TBD)

 

Links

 

Agobo Features Walk-Through

Agobo with Ultrasonic sensor, WiFi dongle and short USB cable added to standard build

(Agobo2 has the Raspberry Pi turned 90 degrees so that fitting the B+ and 2B is possible)

Agobo – The Hackable Pre-Built Robot for the Raspberry Pi A+

Base Build

  1. Pre-Built PCB with the following items pre-installed and ready to use
  2. 2 x Metal geared Motors
    1. Left motor on physical GPIO pins 19 and 21
    2. Right motor on physical pins 24 and 26
  3. Two InfraRed IR line sensors
    1. Left on physical pin 7 with Red indicator LED
    2. Right on physical pin 11 with Green indicator LED
  4. Two White LEDs at the front (Agobo v1 only. On Agobo2 these are replaced by full addressable RGB neopixels)
    1. Left on physical pin 15
    2. Right on physical pin 13
  5. Mode switch – or whatever you want to use it for on physical GPIO pin 16
  6. Ultrasonic uses physical pin 23 for BOTH Ping and Echo. Swapping the direction of this pin is handled within the python library and ScratchGPIO
  7. I2C pins broken out to 6-pin connector with 5v, 3.3V and Ground
  8. Serial pins connected to a convenient 4-pin male connector so serial console cables plug right in (includes power and ground)
  9. Fully replicated 40-pin GPIO connector and prototyping area with 5v, Ground and 3.3V strips for you to add your own sensors, LEDs, or whatever
  10. All other pins free to do what you want

 

PlusPlate

  1. Lots more prototyping area
  2. Designed so ICs can fit in 4 different rows with easy access to 5V, Ground and 3V distribution lines
  3. A great way of adding any sort of electronics
  4. Use the Acrylic cover to safely protect your designs
  5. Physical GPIO pin 12 is brought to a pre-fitted neopixel which is directly controllable in python (and ScratchGPOIO??)
  6. Both the input and the output to the neopixel is brought to an expansion header so your pre-fitted pxiel can be in parallel with or in addition to the first pixel in your strip or ring of pixels
  7. All unassigned GPIO pins (as well as 5V, 3.3V and Ground) brought to a separate row of accessible pads
  8. A position for a standard nRF24L01+ module using SPI connections
  9. With the PlusPlate™, the Agobo becomes infinitely hackable!

 

Assembling the Agobo Robot for Raspberry Pi A+

 Click on any image below to enlarge

*Note. Images still show the Agobo v1 build. Agobo2 is similar but rotated 90 degrees.

Basic Build

1. Check you have all the parts:

  • Agobo ready built main board
  • 2 rear wheels
  • Front caster bag containing read-assembled caster
  • Acrylic cover with “Agobo2” etched on
  • Battery holder clip
  • 16mm countersunk screw
  • M3 nut
  • 4 x 11 mm female-female pillars
  • 8 x 6mm screws
  • Battery with connector/charge cable
  • 4 male-female pillars (5mm)
  • 4 nylon washers

 

2. Fit the Front Caster

For Agobo2 this has already been done for you, so skip to Step 3

This is a fiddly task, but it is the only one. Once it is done, the rest is easy

agb10_02

Put the main ball in the housing, and the small balls into the “corners” as shown above

 

agb10_03

Put on the cover plate and hold it all together with your fingers, as you place it on the PCB

 

agb10_04

Then use the small (10mm) screws to fix it to the PCB.

That wasn’t so hard, right? (NB. If using the PlusPlate™, or wiring onto the replicated header pads, you will need to use the 3mm spacers and the longer screws – this is a much trickier operation)

 

3. Fit the Battery Holder

For Agobo2, the battery holder is fitted to the Acrylic plate, so skip to step 4

agb10_05

You will need the 5mm small acrylic plate, 20mm countersunk screw, M3 nut and the battery clip

 

agb10_06

Remove the backing plastic from the acrylic plate – it should be bright and transparent

Push the screw through from the top of the battery clip, through the acrylic plate, through the PCB and tighten the M3 nut underneath

 

4. Add the Mounting Pillars for the Pi

agb10_07

You will need the 4 female-female pillars (11mm) and the 8 screws (M2.5, 6mm)

 

agb10_08

Screw the 4 pillars into the PCB in the positions shown

 

5. Fitting the Acrylic Plate

agb10_12

 

6. Add the pillars

agb10_13

Screw the 5mm male-female pillars in to the 11mm pillars that hold the Raspberry Pi A+

 

3. Fit the Acrylic Cover

agb10_15

  • Peel off the protective covering from the acrylic plate (now it is nice and shiny!)
  • Screw the battery clip to the offset hole in the acrylic using the 16mm screws and M3 nut (the 5mm spacer acrylic piece is not required)
  • Now use the 6mm screws with the nylon washers to hold the acrylic cover to the small pillars
  • All done!

 

—–

Using with the PlusPlate

1. Check you have all the parts

agb10_16

To attach the PlusPlate you will have to do some light soldering.

First, fit the 2x20pin male headers to the main board as shown above

 

2. Re-Attach the Front Caster with spacers

agb10_17

Note: This is really tricky – take it carefully and patiently. There is a knack to doing it, which is described below, but it takes a few attempts before you can do it quickly.

You will need the longer screws and the 3mm spacers found in the bag with the front caster.

  • Prepare the front caster as before and hold in one hand
  • Hold the main PCB vertical (ie. resting on the back end (USB connector end)
  • Put one long screw through the hole in the PCB
  • Put a spacer over the screw so that it rests on it – remember, the screw is horizontal at this point. Gravity is your friend.
  • Screw into the caster assembly with the other hole of the caster upwards(careful, though as it is easy to over-tighten)
  • Now turn the caster into the correct position, and push the other spacer into position
  • Then, screw the second screw in.
  • Now, you can have a cup of coffee, or glass of wine, or whatever. You deserve it!

 

3. Add the Mounting Pillars

agb10_18

Use the 4 Male-Female 11mm pillars and screw each on in, holding the Pi in place

 

4. Prepare the PlusPlate

agb10_19

Solder the 40-way female header to the bottom of the PlusPlate

agb10_20

Push in the 40-way extended header

agb10_21

 

5. Connect the PlusPlate and Battery

agb10_22

Push the PlusPlate with extended headers into the male headers that you soldered onto the main PCB

 

agb10_23

Fix the PlusPlate with the 6mm screws (from the base build)

Add the battery clip to the PlusPlate using the 12mm countersunk screw

 

agb10_24a

Fit the battery and off you go!

 

You can also add the Acrylic cover with the PlusPlate

agb10_25a

Use the 5mm Male-Female pillars and mount the acrylic cover with the overhang at the front

Leave the battery clip fitted to the PlusPlate to reduce the overall height.

Picobot: Low-Cost, Feature-Rich Arduino-Compatible Robot

Picobot – Low-Cost Open-Source Robot for Education and Fun!

pb1_02a

For little more than the cost of an Arduino Uno, you can buy a compatible product that works directly with the Arduino IDE and has built in motors, sensors and LEDs. You can add to this with plug-in modules for ultrasonic distance measurement and 2.4GHz wireless connectivity

Buy it here

Dimensions:
PCB 50 x 50mm
With wheels, width is 80mm
Including ultrasonic and rear LED, length is 75mm
Height without ultrasonic is diameter of wheels (42mm)
Height with Ultrasonic is 48mm

The circuit schematic and example code is Open Source and available for anyone to make their own. Licensed under Creative Commons BY-SA
The design files and basic program examples are on the 4tronix GitHub
The library and 3D printable case are from Martin Bateman

Also available as a Starter Pack with 2 Picobots, programming cable and batteries

Save even more by purchasing a Class Pack of 6 or more

Some example activities:
Without RF Connectivity:

  • Line following
  • Obstacle avoidance
  • Light seeking
  • Light avoiding
  • Colour reaction to environment Light vs Distance, Colour vs Light received, etc
  • Follow my leader (pulse the rear LED and get second Picobot to follow a pulsing white light)
  • Stay fixed distance from object/person – eg. get it to follow you around

With RF Connectivity:

  • Synchronise colours
  • Dance in sync
  • All follow the command of a leader
  • Send commands or data from a Raspberry Pi or PC
  • Classic swarming behaviour: react to alarms, searching, clustering, identifying

Video of Picobots preparing to follow each other

Base Model Comprises:

  • Ready assembled – just push on the wheels and screw in the front caster assembly
  • Arduino compatible ATMega328P-AU (with 2 additional analog inputs)
  • 2 x N20 geared motors with “biscuit” 42mm diameter wheels
  • 2 forward facing light sensors
  • 2 line sensors
  • 2 paired RGB LEDs underneath for mood lighting and status information depending how you want to program them – they both show the same colour, not independent
  • Rear facing bright white LED – useful for “follow my leader”
  • Mode selection button – general purpose input button that you can program yourself
  • On – Off switch
  • Reset button
  • Socket for ultrasonic distance sensor HC-SR04
  • Socket of 2.4GHz RF module – nRF24L01 or compatible
  • Socket for programming (requires a USB to serial converter such as a CP2102 module with DTR, must be pin for pin compatible with the one 4tronix sell)
  • NB. Basic model does not include battery or battery holder as you can use any LiPo or LiOn battery or battery holder with 2-pin JST plug (check the polarity)

Available Upgrades and Options:

  • Ultrasonic distance sensor HC-SR04
  • Programming module and USB cable (CP2102 USB to Serial converter)
  • 2.4GHz transceiver nRF24L01 or compatible (NB. this is not Bluetooth and a similar transceiver is required to connect to other devices)
  • 3-Cell AA battery holder
  • Lithium Ion battery (similar to PS3 controller batteries, but polarity is reversed)
  • Lithium polymer battery (various capacities)

Gallery

Agobo Robot for Raspberry Pi Model A+ (APB)

 

AGoBo is the winning name – Suggested by @mcambelluni

Mark will receive a complete AGoBo prototype, as well as the next iteration of the main PCBA.

 

abp02

Starting 29th November 2014 and finishing 1st December, we are running a Twitter based competition to choose a product name for this new robot, codenamed APB01

 

The winner will receive a complete prototype robot, including the Model A+ and we will ship it worldwide.

 

apb03

apb04

 

Specification

This is a prototype robot at the moment, and we expect the specification to change before we start selling it in January. Current specs as follows:

  • Supports Raspberry Pi Model A+ only
  • Size 100 x 80 25mm (excluding wheels)
  • Built-in power supply that works from 6.6V to 12V quite happily, supplying power to both the robot and the Pi
  • Serial connections (for SSH console cable) brought to convenient connector on the edge
  • Standard 4tronix 6-pin I2C breakout connector – direct fit for the IP Display module we make
  • 2 x line follower sensors with indicator LEDs
  • Ultrasonic distance sensor
  • N20 size, metal geared motors
  • 42mm wheels
  • Provided ready soldered. Just screw in your Pi and add batteries.

It really is as easy as Pi to get going in robotics now.

Competition entries (in order of appearance)

  1. mA+rvin – @MarkSwashplate
  2. Colin – @newsliner
  3. Pi2Go Nano – @monkeymademe
  4. Pi2Go mini – @monkeymademe
  5. Eric – @Mruktechreviews
  6. Ratbot (rA+bot) – @monkeymademe
  7. picabot – @TommyBobbins
  8. nitbit – @monkeymademe
  9. berryBot – @monkeymademe
  10. HatBot (hA+bot) – @monkeymademe
  11. DiddyTron – @AverageManvsPi
  12. DiddyBot – @AverageManvsPi
  13. A+ PiBot nano – @BitSkils
  14. The Crumb – @AverageManvsPi
  15. The Mighty Maus – @heeedt
  16. PiBotA+ – @skinnermartin78
  17. GoA+Bot (GoAtBot) – @skinnermartin78
  18. NanoGo – @skinnermartin78
  19. Johnny – @Ascii211
  20. MadgeBot – @ukscone
  21. BiBot – @JarrowComputing
  22. DinkyBot – @skinnermartin78
  23. MidiBot – @skinnermartin78
  24. +SonicBot – @CoderDojoCarm
  25. BotAplus – @treefrog52
  26. BotAppi (BotA+Pi) – @AndyBateyPi
  27. A4 – @sej7278
  28. A Robot – @sej7278
  29. PiBot – @TeCoEd
  30. Alfie – @richard007_1999
  31. AtBot (A+Bot) – @uk_baz
  32. Flat Stanley – @uk_baz
  33. 4tA+v1 – @uk_baz
  34. HalfPint – @skinnermartin78
  35. Swarmer – @zosho
  36. NA+Bot (NatBot) – @skinnermartin78
  37. Pip – @skinnermartin78
  38. BitBot – @skinnermartin78
  39. DotBot – @skinnermartin78
  40. A+Go – @skinnermartin78
  41. A+GoBot – @skinnermartin78
  42. Rudolph – @CoderDojoCarm
  43. RaspAπbot – @skinnermartin78
  44. JittyBot – @JarJarGeek
  45. Pi-onic – @red_dragon25
  46. PocketBot, PocA+Bot – @skinnermartin78
  47. PiAbot – @RobertsDavidJ
  48. PiAtron – @RobertsDavidJ
  49. PintBot – @recantha
  50. AGOBO – @mcampbelluni
  51. PiAGoGo – @mcampbelluni
  52. KinderBot – @APChristie
  53. SchoolieBot – @APChristie
  54. IKnowBot – @APChristie
  55. DeBug – @RobertsDavidJ
  56. aRobot – @Stimmli
  57. rA+pless (ripless) – @MBDilaver
  58. PiPlusBot – @Cloud4Schools
  59. RoboPip – @StefanPlum
  60. piDestroyer – @evgeniyraev
  61. pupPi- @evgeniyraev
  62. HAL 1- @evgeniyraev
  63. a1- @evgeniyraev
  64. Dalek- @evgeniyraev
  65. BugPi – @skeletony
  66. BuggyPi – @skeletony
  67. PiAGo – @skinnermartin78
  68. PiAGoBot – @skinnermartin78
  69. FrogBot – @AndyBateyPi
  70. PiFrogBot – @AndyBateyPi
  71. Piccolo – @ukscone
  72. amphipian – @AndyBateyP
  73. ampibot – @AndyBateyP
  74. apphibian – @AndyBateyP
  75. appibian – @AndyBateyP
  76. MidiBot – @skinnermartin78
  77. MidiTron – @skinnermartin78
  78. Medius – @skinnermartin78
  79. 4tronix build BotAplus – @treefrog52

 

Finalists (in Order)

  1. AGOBO – @mcampbelluni WINNER
  2. Piccolo – @ukscone
  3. NanoGo – @skinnermartin78
  4. mA+rvin – @MarkSwashplate
  5. Pi-onic – @red_dragon25
  6. BotAppi (BotA+Pi) – @AndyBateyPi
  7. HatBot (hA+bot) – @monkeymademe
  8. BotAplus – @treefrog52

 

 

Soldering the UltraSonic & LED PCB Kit

UltraSonic & LED PCB Kit

This kit makes it easy to mount a standard SR-HC04 ultrasonic sensor on the front of a robot. The sensor itself is soldered to the PCB which acts as a carrier, additionally having M3 mounting holes at various spacings.

The board also carries 4 LEDs with the necessary series resistors to be driven directly from Arduino or Raspberry Pi GPIO pins.

Click any image to enlarge.

 

1. Check you have all the parts

ultra01

The kit contains:

  • 1 x PCB
  • 1x UltraSonic sensor
  • 1 x Resistor pack (4 x 220R resistors in a SIL package)
  • 2 x White LEDs
  • 1 x Blue LED
  • 1 x Green LED
  • 2 x 4-pin male headers

 

2. Solder the LEDs

ultra02

It doesn’t really matter where you put each LED, but the standard way for our Pizazz robot is as shown above.

NB. Ensure that the longer lead (positive) from each LED is soldered into the holes marked with a ‘+’ sign (towards the top of the board in the photo above)

 

3. Solder the Resistor Pack

ultra03

The resistor pack must be placed the correct way round, with the white dot next to the ‘1’ marked on the PCB. The writing is therefore point towards the ultrasonic mounting points as shown in the photo above.

 

4. Solder the 4-pin Male Headers

ultra04

These should be mounted in the positions either side of the resistor pack. To get the straight, I find it easiest to solder just one pin of each header, then holding the board and header in one hand and the soldering iron in the other, gently melt the solder and move the header so it is straight. There’s a bit of a knack to this 😉

 

5. Finally, Solder on the UltraSonic Sensor

ultra05

This should be mounted on the same side as all the other components. You can double check, by checking that the writing on the front of the sensors, matches the pins on the 4-pin header next to it. (ie. VCC is next to VCC, Trig is next to Trig, etc)

Again, solder one pin first then straighten it out using the same method as for the headers.

 

6. The Completed Board – Ready for Mounting on your Robot

ultra06

 

First Information for Picobot – Swarm Robots perhaps

Some early Info About the Picobot Robotics Project

pb01

 

I’ve been working on and off for a while on a small robot because:

  1. I want to make available a really cheap programmable robot for schools
  2. I would like to make one that can communicate with other robots, detect them and interact with them
  3. If they can be made cheaply enough then making a swarm of 10 or more becomes feasible

pb05

pb02

pb03

pb04

pb07

pb06

pb09

case01

pb10

 

This version of Picobot (V2) contains a small number of sensors as well as a connector for an NRF24L01 2.4GHz RF module. This is stupidly cheap RF module with a reasonable range and excellent support in the Arduino community.

  • Dimensions of PCB 50 x 50mm
  • Motors: 2 x N20 size with 70:1 reduction gears
  • Wheels: 42mm diameter
  • Front ball caster
  • ATmel ATMega328P -PU(DIP) controller chip with Arduino bootloader
  • Interface to CP2102 USB-serial converter (with auto-reset). Only one converter required for all your bots, no need to waste money (and board space) having one for each
  • Plug in socket for HC-SR04 ultrasonic distance sensor
  • 2 x LDR for light level sensors
  • Reset switch
  • Mode select switch (use in your programs how you like)
  • Micro-USB for power only – will work from 3.7V to 5.5V
  • On-Off switch

 

Next Revision is V3 – Updated Info

V3 adds the following – keeping the PCB the same size

  • TQFP package for the ATMega328P-AU (smaller, surface mount)
  • 2 x IR line follower sensors
  • 2 x RGB LEDs underneath at front
  • Rear bright white LED, used for follow-the-leader swarming
  • Change to use of 2-pin JST connector for direct powering from 3.7V Lipo battery
  • New, thinner 47mm diameter wheels

Picobot_04c

 

 

 

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