Day 12: Playing with LEDs (III) – PWM and L293D

This time I replaced the red LED in the circuit I used on Day 11 for a ultra bright white LED.

The white LED requires more power than the Pi can provide, so I added the external power source used on Day 9 and a motor control chip, the L293D. I did the wiring based on this Adafruit tutorial but my Cobbler is connected in the inverted position.

This is the final circuit:

???????????????????????????????

Notes:

  • I used the following wire color guidelines: Black for ground, Red for Vcc, Yellow for data, and Blue for control.
  • The white LED can take up to 80mA and is connected to 100/3 = 33 Ohms resistor.
  • The green LED is connected to a 330 Ohms resistor.
  • I used an external 5V power source connected to the bottom-right corner.

The following picture shows the connections from another direction:

???????????????????????????????

This is the final result:

Advertisements

One thought on “Day 12: Playing with LEDs (III) – PWM and L293D

  1. Pingback: Day 24: Controlling a relay with the Raspberry Pi | Diary of Pi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s