December 4th, 2009 by Jonathan
Well, after a few weeks of searching I finally managed to find a new place so I’ll be moving in on the 18th. Until then I will be in the process of updating some of the furniture I had and doing other wonderful house moving related things (luckily I have 3G broadband for when I move my ADSL connection). Unfortunately I’m not going ot be in an area that supports FTTH, so no 100Mbps for now (although it is a bit pricey, plus I would have had to have a phone line, which I don’t want).
Earlier in the week I ordered a new 46″ Samsung Series 6 LCD TV and picked it up yesterday
. I thought about getting one of the Samsung LED TV’s, but couldn’t really justify the extra price. I wanted a TV that supported USB devices as a minimum, then I discovered DLNA. I saw that the Series 6 TV’s supported DLNA and at first thought whoopee – that was until I looked into it a bit further and found out what DLNA is capable of, which is when I decided to go with the TV I got. Another thing about this TV is that it supports wireless through an addon dongle, which is an extra 80 – 90 bucks unfortunately.
I downloaded TVersity which gave me some issues initially, but thanks to this page I was able to get DLNA working to some extent (I still don’t have rewind or fast forward capabilities, and I’m not interested in hacking the firmware). One minor note (which actually can be irritating) with TVersity is that it tries to install the Ask toolbar, so you have to ensure that you deselect this option when you install it.
Now to figure out a way to play DVD’s without a DVD player…
November 30th, 2009 by Jonathan
Wow, that a weekend. I was hoping to get some time to do some work on my RC Car but time got the better of me (I wish we could have more long weekends). I’m currently in the process of looking for a house and buying new furniture at the same time which has taken up the majority of my time over the weekend. Hopefully I’ll get some time during the week to crunch out some more code for the RC Car and maybe get a few other odds and ends done at the same time
.
November 26th, 2009 by Jonathan
I got a bit bored today and started thinking about a practical joke that could be played on unsuspecting/unwanted visitors (read: door to door sales people) – a doorbell that sprays a jet of water (or other liquid if you so please) whenever it is pressed.
This version uses the Adafruit Motor Shield (I knew I’d find a use for it after the RC Car Hack), but you could easily adapt it for other types of motor shields, or even a relay circuit. You’ll need your trusty Arduino, motor driving circuitry (the Adafruit Motor Shield in this case), a doorbell button and an old windscreen cleaner motor with the tank attached.
- Plug the motor shield into the Arduino and connect the motor to input 1 (polarity shouldn’t matter for now, if it’s wrong (i.e. nothing will come out of the squirter) we can either change the code to make the motor go in reverse instead of forwards or change the polarity later). Instructions on how to do that can be found here.
- Hook the doorbell button with a pull down resistor up to pin 2 of the Arduino. If you don’t know how to do this click here for instructions on how to do so.
- Load the following code:
#include <AFMotor.h>
AF_DCMotor motor(1, MOTOR12_1KHZ);
void setup()
{
pinMode(2, OUTPUT);
}
void loop()
{
if (digitalRead(2) == HIGH)
{
motor.run(FORWARD);
delay(3000);
motor.run(RELEASE);
}
}
I haven’t actually put this to test as yet (I’m not really that mean, I just thought it would be a fun exercise). This guide is for educational purposes only (i.e. so you can use your wiper cleaner motor for good, not evil) – I don’t endorse any sort of behaviour that may injure/annoy people. The Potter Project accepts no responsibility for any injuries/offense caused directly or indirectly (i.e. angry wet people) as a result of you using this guide.
November 25th, 2009 by Jonathan
I noticed there were a couple of broken links as a result of the move. The links to the Picaso library and my modified version of the NewSoftSerial library should now be working along with a number of images that were missing
.
I have also added a contact form, so if you find anything else broken or would like to contact e for any other reason, please visit the contact page on the right.
And finally, you can now share any of the posts using your favourite social web sites (i.e Facebook, etc…) by clicking on one of the buttons at the end of each post.
Jonathan
November 24th, 2009 by Jonathan
I thought I might take a bit of a break from the RC Car project for a bit and work on a few other things (variety is the spice of life). I decided to make a breadboard Arduino clone which I got working in a short amount of time. I initially had trouble uploading sketches due to the fact that the circuit didn’t have an auto reset (and I forgot that I had to press the reset button at a particular time in order to allow a sketch to be uploaded.
After doing a bit of research I found a way to implement the automatic reset on the older style Arduinos. All that’s involved is running a 0.1uF ceramic capacitor from the reset pin of the ATMega to the DTS pin of the FTDI cable/board and voila, automatic reset.
If that wasn’t enough, I thought I have quite a few 170 tie point Mini Breadboards lying around so why don’t I try using one of those instead one of my larger breadboards. I managed to get everything on the mini breadboard except for the reset switch and one lead of the auto reset capacitor. Now instead of using the mini breadboard with an Arduino shield, I can use the breadboard as the Arduino itself.
Here are some pictures/diagrams (excuse the “quality” once again I’m using my mobile):
Schematic of the Mini Breadboard Arduino*

Aerial view

Up close and personal – I even got the LED on there
As this version of the breadboard doesn’t have a 5v regulator on board you’ll need to use either USB power via an FTDI cable/board or an external 5v regulator.
* – While the schematic displays an ATMega8, an ATMega168 or 328 can be used as they have the same pinout (I actually used an ATMega328 for this example).
November 23rd, 2009 by Jonathan
If you can read this then it means The Potter Project has been moved to its new host
.
Most of the old site should have been copied over by now but if you have any issues please leave a comment and I will look into it ASAP.
Jonathan
November 22nd, 2009 by Jonathan
Over the past week I’ve been working on bits and pieces of the RC car hack. I’ve created a prototype Arduino shield to carry the various components such as the XBee, Pololu motor driver and compass module. I have also included connections on the shield for a Ping))) module, slotted optical switch and GPS module (which isn’t doing too well :/).
I’ve also made another prototype board that has a joystick control and another XBee module for use as a remote control since I gutted the original RC circuitry. I might put an InputShield on my wishlist and combine it with the prototype I’ve made for the XBee connection for added stability (the XBee shield is not suitable as I want to use software serial).
Codewise I’ve managed to integrate all of the hardware excluding the GPS into the library. I’ve also managed to get the manual controls up and running to an extent. One of the problems I face is wheel spin. As I was unable to put the optical sensor on the front wheels I’ve resorted to putting them on the driving wheels and because the RC Car likes to do burnouts this will give us false distance readings when in automatic drive mode. My solution is to accelerate the car at a slower rate so that it doesn’t spin the wheels. I’ve tested some code that will do this, but it will need to be modified so that it doesn’t “block” the rest of the code (in other words I need to give it the multi threading effect) as this has an undesired efefct on the operation of the car.
Once I’ve done that I’ll work on the code that makes the car automagically run a course without any external input (sans GPS) and the RC Car hack will almost be complete.
November 18th, 2009 by Jonathan
I received a couple of Sharp 1A50HR slotted optical switches a while ago so I could start working on a distance calculator for the RC Car project (one spare, and one for the project). The sketch I’ve written reports when the beam has been broken and adds the distance travelled to a global variable.
The switch is currently mounted near one of the rear wheels with a piece of cardboard tucked in between the tyre and the wheel to interrupt the beam once per revolution of the wheel. When it is permanently mounted I will replace the piece of cardboard with a number of pieces of plastic evenly distributed around the wheel for higher accuracy. This mechanism can be used as a redundancy if a GPS signal is ever unavailable (such as indoors).
This sketch should work with any slotted optical switch, the only external component used was a 200? resistor placed between the Anode of the switch LED and VCC. The output of the slotted optical switch is connected to pin 2 of the Arduino (in the case of the IA50HR this is pin 4). Consult the datasheet for your slotted optical switch for information on how to connect the other pins. The 1A50HR has 5 pins total – the other two pins on the receiver circuit are VCC and GND and the cathode of the LED goes to GND. Most 4 pin slotted optical switches have a just VCC and an output on the receiver side.
As usual, please don’t blame me if your stuff takes up smoking – consult the datasheets (and Google) first!
//The distance we've travelled
unsigned long int Distance = 0;
//The previous distance travelled
unsigned long int oldDistance = 0;
//Number of centimetres between each interrupt
//You can use inches if you want, there are no complex algorithms that
//use this number (yet)
#define SWITCH_DISTANCE 22
void setup()
{
//Set pin 2 as an input for the optical sensor
pinMode(2, INPUT );
//Set up the interrupt for when the beam is broken
attachInterrupt(0, ChangeState, FALLING);
//Set up the serial port for debugging
Serial.begin(9600);
Serial.println("Hi");
}
void loop()
{
//Print something if the distance has changed
if (Distance != oldDistance)
{
Serial.print("Dist: ");
Serial.println(Distance, DEC);
oldDistance = Distance;
}
}
//Beam interrupt
void ChangeState()
{
//When the beam is broken pin 2 will be low which means we've
//travelled the distance of the beam breaker on the wheel
if (digitalRead(2) == 0)
{
Distance += SWITCH_DISTANCE;
}
}
November 18th, 2009 by Jonathan
I received my Pololu dual VNH3SP30 motor driver the other day which I intend to use as part of my remote control car hack. The good thing about this driver is that it can handle up to 9A continuous whereas the Adafruit Motor Shield is capable of 600mA continuous. This means I can drive much larger motors than I could have with the Motor Shield.
It took me a while to get it working because, as I found out the hard way, it wouldn’t switch on the motor I was using at 5v. After a while of pondering why it wasn’t working and searching various forums I decided to use a 9.6V battery and it worked a charm.

Connecting the driver is easy. As you can see above there are two sets of inputs and outputs that apply to the two repective driver IC’s on the board. To test it all you need to do is connect +5V(IN), one of the PWM pins and either INA or INB (not both) of the corresponding input (i.e. 1PWM, 1INA) to a 5V power source and GND to ground. Connect a motor to to the appropriate output (polarity doesn’t matter at this stage, as we’re using a H Bridge) and finally attach the motor power source to VIN(+) and GND.
When power is applied to both the input and the output of the driver the motor should start moving and either a red or green LED will light up. If nothing happens check to see that all of the cables are correctly connected and that you are using a high enough voltage to drive the motor (I know 5V didn’t work, but 9.6V did).
I took the liberty of creating a small Arduino library to make things even simpler (not that they weren’t simple to begin with). Click here to download the library.
The library can be used in 3 easy steps:
- Connect the Arduino to the driver board (an example only):
- +5V(IN) to Arduino 5V
- GND to Arduino GND
- PWM to Arduino pin 3, 5, 6, 9, 10 or 11 (for the ATMega 128 or 328. Older ships can only use pins 9, 10 or 11 for PWM output). In this example we’ll use Arduino pin 3.
- INA to Arduino pin 4
- INB to Arduino pin 5
- Include the library and declare a Pololu Driver object. The constructor takes 3 parameters – PWM Pin, INA Pin and INB Pin.
- Call the Run method to start or stop the motor.
There are two overloads to the run method: one that takes two parameters – direction and speed, and the other one which takes only one parameter – direction. With the latter overload you must call SetSpeed at least once in the sketch as the default speed is 0.
The SetSpeed method takes one parameter (you guessed it) – speed, which can be any value from 0 (stopped) to 255 (full steam ahead). This rule also applies to the speed parameter used by the first Run overload mentioned earlier.
There are 3 valid directions used by the Run method:
- POLOLU_STOP – Stops the motor
- POLOLU_FORWARD – Turns the motor clockwise (or anticlockwise depending on how the motor is wired up)
- POLOLU_REVERSE – Turns the motor anticlockwise (or clockwise depending on how the motor is wired up)
Below is an example of how to use the Pololu Driver library:
//Include the library
#include <pdriver.h>
//Declare the Pololu Driver object
//3 - PWM Pin
//4 - INA Pin
//5 - INB Pin
PololuDriver Motor(3, 4, 5);
void setup()
{
//This will run the motor in reverse at full speed
Motor.Run(POLOLU_REVERSE, 255);
}
void loop()
{
}
November 17th, 2009 by Jonathan
As you may be aware, I blew up one of my Arduinos last week. Good news is that it was only the chip that was fried and not the rest of the board. I’d inadvertently ordered a replacement ATMega328 chip (and a couple of spares) that didn’t have the Arduino bootloader on them (at least I saved a few bucks
).
Anyway, I found a method of burning the bootloader on to the ATMega without having to use an external programmer. The guide was created by Kimio Kosaka and it’s called the FT232RL BitBang Mode AVR-Writer. I wonder if I can get it to work with the Arduino FTDI serial adaptor (this will be good as the Arduino wouldn’t have to be modified in any way)???