Project:Line-following Robot: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:
I want to now move the circuit off my Arduino Uno with breadboard and onto a Xino with a "micro-shield". What's a micro-shield? It's a ghetto Arduino shield that uses just a few of the pins and can be knocked together cheaply with a few scraps of stripboard and pins.
I want to now move the circuit off my Arduino Uno with breadboard and onto a Xino with a "micro-shield". What's a micro-shield? It's a ghetto Arduino shield that uses just a few of the pins and can be knocked together cheaply with a few scraps of stripboard and pins.


[[File:IMAG2029.jpg|none|400px|A micro-shield base]]
[[File:Line-follow-micro-shield-001.png|none|400px|A micro-shield base]]


I found this tiny bit of spripboard that was 12x4 holes but nicely separated down the middle...
I found this tiny bit of spripboard that was 12x4 holes but nicely separated down the middle...


[[File:File:Line-follow-micro-shield-002.png|none|A micro-shield base]]
[[File:Line-follow-micro-shield-002.png|none|A micro-shield base]]


I have loads of male header pins (we have boxes of them at Hackspace and I also get them from work) and here I'm using 7 pins that fit in digital pins 8, 9, 10, 11, 12, 13, and the ground pin. That gives me access to 3 digital pins with PWM and 3 without...
I have loads of male header pins (we have boxes of them at Hackspace and I also get them from work) and here I'm using 7 pins that fit in digital pins 8, 9, 10, 11, 12, 13, and the ground pin. That gives me access to 3 digital pins with PWM and 3 without.


The line-follower robot requires two PWM pins to drive the motors via a mosfet...
The line-follower robot requires two PWM pins to drive the motors via a mosfet. Here's a little circuit diagram I jotted down to help me with wiring...
 
[[File:Line-follow-micro-shield-003.png|none|A micro-shield base]]


I mounted the two mosfets with drain pins to a common ground linked to the GND pin...
I mounted the two mosfets with drain pins to a common ground linked to the GND pin...
[[File:Line-follow-micro-shield-005.png|none|A micro-shield base]]


I don't want to solder my motor wires on as I want to swap them between projects so I have two header pins per motor connection, slightly bent outwards, one pin goes to source on the mosfet and one pin goes to +5v...
I don't want to solder my motor wires on as I want to swap them between projects so I have two header pins per motor connection, slightly bent outwards, one pin goes to source on the mosfet and one pin goes to +5v...


I'm using jumpers as little F-F connectors (a little trick I developed to save on expensive female headers)...
[[File:Line-follow-micro-shield-006.png|none|A micro-shield base]]
 
I'm using jumpers as little F-F connectors (a little trick I developed to save on expensive female headers - I have hundreds of jumpers knocking around)...
 
[[File:Line-follow-micro-shield-007.png|none|A micro-shield base]]


The mosfets need gate connections (middle pin) to the PWM pins to switch on the motors...
The mosfets need gate connections (middle pin) to the PWM pins to switch on the motors...


We also have a little jumper wire to go to the 5v pin on the other side of the Arduino...
We also have a little jumper wire to go to the 5v pin on the other side of the Arduino...

Revision as of 12:06, 26 June 2012

As part of the Arduino 102 (or is it 201?) we built line-following robots...

((insert video here!))

Photos at https://plus.google.com/photos/101627167067307203883/albums/5758095721560984897 ((the upload process takes too long from the wiki so I'll sort it out later))

I want to now move the circuit off my Arduino Uno with breadboard and onto a Xino with a "micro-shield". What's a micro-shield? It's a ghetto Arduino shield that uses just a few of the pins and can be knocked together cheaply with a few scraps of stripboard and pins.

A micro-shield base
A micro-shield base

I found this tiny bit of spripboard that was 12x4 holes but nicely separated down the middle...

A micro-shield base
A micro-shield base

I have loads of male header pins (we have boxes of them at Hackspace and I also get them from work) and here I'm using 7 pins that fit in digital pins 8, 9, 10, 11, 12, 13, and the ground pin. That gives me access to 3 digital pins with PWM and 3 without.

The line-follower robot requires two PWM pins to drive the motors via a mosfet. Here's a little circuit diagram I jotted down to help me with wiring...

A micro-shield base
A micro-shield base

I mounted the two mosfets with drain pins to a common ground linked to the GND pin...

A micro-shield base
A micro-shield base

I don't want to solder my motor wires on as I want to swap them between projects so I have two header pins per motor connection, slightly bent outwards, one pin goes to source on the mosfet and one pin goes to +5v...

A micro-shield base
A micro-shield base

I'm using jumpers as little F-F connectors (a little trick I developed to save on expensive female headers - I have hundreds of jumpers knocking around)...

A micro-shield base
A micro-shield base

The mosfets need gate connections (middle pin) to the PWM pins to switch on the motors...

We also have a little jumper wire to go to the 5v pin on the other side of the Arduino...