sconemad

technology, scones, nonsense

Loading...

Profiles

Twitter

GitHub

Launchpad

Subscribe to my RSS Feed

Admin

Robots

This section describes my adventures in robotics.

Robot obstacle course

Posted on Mon 02 Mar 2015

So, I finally got around to making my robot move, and allow the motor speeds to be controlled from a Raspberry Pi via I2C.

What better way to test it out than attempting to obstacle course at the Raspberry Pi 3rd birthday party event at Cambridge Computer Lab:

It didn't quite make it over the lumpy blocks in the middle, so I had to give it a helping nudge at that point!

Get your own motor pcb

Posted on Fri 09 Aug 2013

OSH Park now allow you to share your PCB designs on their website, so other people can download and order copies.

I've shared my motor controller PCB here.
You can also download the gEDA schematic and layout files. To use these you'll also need my gEDA symbol and footprint library from github (I should put this all on github at some point).

Meanwhile, I am developing the firmware for the onboard PIC16F690. So far, I've been able to test the motor outputs and PWM, which appears to be working well. I thought I was going to have to do all of this in assembler, but so far have been very impressed with Microchip's new MPLAB X IDE and C compilers. It's really good to see them supporting Linux at last - even my old Pickit 2 USB programmer works perfectly without any messing about.

Motor PCBs

Posted on Fri 05 Jul 2013 + 2 comments

Closeup views

Following my previous posting (Making a robot), my motor PCB's have arrived from OSH Park! I got three copies of the same board (and a sticker), which arrived in a nice purple envelope:

I'm very impressed with the quality of the boards and the price - its really not worth trying to make them yourself any more.

Next I will be soldering on the components and testing it out. Although I also need to write some firmware for the onboard PIC processor to make it do what I want, which will be the difficult part.

Making a robot

Posted on Fri 14 Jun 2013

I've decided to make a robot!

I think its something everyone should do at some point, but to be honest, its never particularly appealed to me before. Now with the Raspberry Pi, I can make one that runs Linux, which is slightly more appealing.

I started by sketching out some ideas for the basic structure - something very simple to start with, but would allow me to add on bits later perhaps. I don't have much time to spend building it, so I chose to base the design around parts that can be obtained easily and adapted as required. The chassis will be based on aluminium corner profiles, which is easy to work with and will provide a sturdy platform when bolted together to form a rectangle. My design has two powered 90mm wheels, one on each side of the chassis, and a single unpowered 40mm omni-wheel at the front. This will allow the robot to move forwards and backwards by driving the wheels together, and allow turning by driving them at different speeds (or in opposite directions for very tight turns). The use of the omni-wheel at the front is to accommodate the sideways movement when turning.

I went on to draw it out properly in SketchUp, which allowed me to work out the exact dimensions taking into account the motors, wheels, etc that I wanted to use. I selected to use a micro metal gearmotor to drive each wheel - these are tiny motors with a gearbox attached, and are available in different gear ratios. Using the 100:1 ratio gearmotor, which runs at 120rpm, will move the robot at 0.57m/s (~2 km/h) when used with 90mm wheels.

 

2D views of design in SketchUp

The Raspberry Pi and other control electronics will be mounted on a platform placed in between the two powered wheels. Batteries will be mounted around the edge of the chassis, as required to distribute the weight. The remaining space within the chassis can then be used to accommodate various payload modules, to be designed later. Some ideas I had were a robot arm, movable camera, vacuum cleaner and a pen for drawing on the ground.

3D view of design in SketchUp

I had hoped to be able to buy a module which would allow me to control the two motors using PWM, based on feedback from a pair of photoreflective sensors, aimed at a ring of alternating black and white bands on each wheel. But, as I couldn't find such a thing, I decided to make my own.

I wanted the motor module to take responsibility for driving the motors, using PWM to vary the power applied to each motor based on feedback from the sensors to maintain the speed and direction of each wheel. The Raspberry Pi will send commands to the motor module via an I²C connection allowing the desired speed and direction of each motor to be set. With all this in mind, I decided to use a PIC16F690 microcontroller, along with a L293 (or compatible) dual H-bridge motor driver and some Schmitt trigger gates to handle the sensor inputs. I designed the following circuit using gschem (part of the gEDA suite):

Motor controller schematic (click for full sized version)

I then went ahead and designed a PCB for this schematic, using the gEDA PCB layout tool. After a bit of shuffling about I came up with the following 2-layer board, measuring 2x2 inches:

Front and back of motor controller PCB (click for full sized version)

I chose to use SMD components where possible to minimize the size of the board. A lot of the board is taken up with the large DO-214 footprints required for the eight flyback diodes. I couldn't decide whether to include these or not, since some versions of the H-bridge IC have these included (e.g. the L293D), but in the end I decided to leave space for them on the board just in case. I also included the OSHW logo, since I intend to make the schematics freely available for anyone to use.

Finally, I exported the PCB layouts to the standard Gerber format and sent them off to OSH Park for fabrication.

Next: Motor PCBs

Updated on 2015-02-16 09:27:18 +0000 | Requested on 2017-06-26 01:47:19 +0000