14

So I'm making a model that simulates traffic lights (Red, Amber, Green) so there will be three LEDS that need to be preferably extendable (I don't want them attached directly to the breadboard) but I don't even know where to start (Ok, I admit I am pretty new to all of this but do want to learn!)

Basically, I have read somewhere that I can purchase the following:

  • 26 pin ribbon cable
  • Custom PCB
  • Ribben cable socket
  • Header pins

But the problem is that I don't really want a 26 pin ribbon cable because it would just look ugly in the model. Instead I was just thinking about soldiering the PCB onto the breadboard and using (breadboard wires) connect the Pi up to the breadboard, have resistors and then finally connect the LEDS. Does this sound practical?

Hope someone can help me! :)

Alex L
  • 7,615
  • 12
  • 44
  • 53
Phorce
  • 623
  • 1
  • 8
  • 15

2 Answers2

13

You need (as minimum):

  • Red/orange/green LEDs
  • ~470 ohm resistor (1 per LED) - note that this resistance is approximate, but should work for most all standard 5mm LEDs
  • Wire
  • A breadboard
  • Pi-breadboard connector (hacked 26-pin floppy drive cable, Pi breakout kit, etc).

Your circuit will look like the following (image taken from the excellent book Raspberry Pi: A Quick-Start Guide:

Traffic lights ciruit

Ground connects to ground, and each positive connects to a GPIO pin. You can connect the Pi to the breadboard with male-female jumper cables (example), a hacked-up floppy disk drive/IDE ribbon cable (here is a tutorial), or a breakout kit such as the Pi Cobbler kit from Adafruit. Alternatively, for greatest convenience you can invest in an Adafruit Prototyping Pi Plate Kit with mini breadboard in the middle if you want to set up a semi-permanent model.

Your wires between the LEDs and breadboard can run a fair distance, so that's how you would embed the LEDs in a model.

ropable
  • 286
  • 2
  • 6
-2

Then you will need a 555 timer, (Chip you can buy online) then you will also need to buy a 4017(Decade Counter), a 4027(Flip flop), and a 7408(And Gate), you can all of these chips online and the truth table for the and gate can be found online to. This is if you plan on making it Hardware Led Traffic Light. And to Get the 555 to blink and Led at one second you will need a 10k and a 68k resistors.