Prototyping

For the next step in my little electronics project I was looking at adding in the LCD to the display the output, I’ve selected an I2C device so that it requires very little wiring and also does not need a lot of I/O pins on the Arduino. The I2C bus also requires minimal components, basically a couple of resistors to pull the bus high. However I’ll also need to wire up a few components when I come to hook up my rotary sensor (aka mouse) so it made sense to take the approach of having a simple shield to wire everything together.

The arduino protoshield kit seemed an ideal starting point as it had the headers to wire up the digital inputs and outputs and an area to layout components and a few components to wire up some simple circuits.

Protoshield Kit

There are some really nice design features of the PCB such as mirroring the reset switch and ICSP pinouts as those are blocked by the position of the shield. There is also an area for prototyping with SMD chips as well as a for chips in DIP format.

You can download the schematic and Eagle PCB design files from the Arduino site:

http://arduino.cc/en/Main/ArduinoProtoShield

Given that the kit came with red, yellow and green LEDs I could not resist making a simple traffic light. So I wired up the three LEDs with the supplied 220ohm resistors and put together the following simple programme. Obviously if you were programming a real traffic light you’d want to put in bigger delays and also look at adding traffic sensors etc. I’d also suggest switching from this simple structure to something like a finite state machine.

  • /*
  • Traffic Lights
  • Three LEDs wired to digital outputs as specified below
  • */
  •  
  • const int Green = 8;
  • const int Amber = 9;
  • const int Red = 10;
  •  
  • void setup() {
  •  // initialize the digital pin as an output.
  •  pinMode(Green, OUTPUT);
  •  pinMode(Amber, OUTPUT);
  •  pinMode(Red, OUTPUT);
  • }
  •  
  • void loop() {
  •  digitalWrite(Red, HIGH);
  •  delay(1000);
  •  digitalWrite(Amber, HIGH);
  •  delay(1000);
  •  digitalWrite(Red, LOW);
  •  digitalWrite(Amber, LOW);
  •  digitalWrite(Green, HIGH);
  •  delay(1000);
  •  digitalWrite(Amber, HIGH);
  •  digitalWrite(Green, LOW);
  •  delay(1000);
  •  digitalWrite(Amber, LOW);
  • }

I’ll remove these temporary components before connecting up and writing code to interface to the LCD, so hopefully more on this project soon.



One thought on “Prototyping

  1. […] my prototyping on the Arduino there’s been an update to the Arduino development software. A couple of the […]

Leave a Reply

Your email address will not be published. Required fields are marked *

 characters available