Let's Make Robots!

Adding a flashlight to a backpack

This is a continued discussion from the shoutbox... I only made it a topic because I was having trouble explaining my set-up without pics..

 

So Essentially Im looking to add a small LED flashligh to the shoulder of my backpack. I understand the programming aspect of it, what I am having trouble with is how to rig it up. (i.e. How would I wire this to the arduino)

 

so here is the light:

 

 

 

Easrlier (due to my lack of ability to explain things) i made it sound like I dont understand the blink sketch from arduino.... I know how it would look like as a program, but not when wired up.

 

Any thoughts?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

You need some flavor of transistor.

As with motors, your arduino is not going to handle these LED's via an output directly. You are going to need a "driver" of some sort. The simplest version would be a transistor, maybe a 2n2222 to switch these guys on and off. I don't know however, how much current these LED's will draw all together. My guess would be less than an amp, and thus, a general-purpose NPN transistor (like the 2n2222 would work just fine. If that transistor starts getting hot, you may have to bump up to a beefier transistor --like a big Mosfet.

Lets assume the general purpose NPN will work. Here is how it goes:

  • You will run a constant + to your LED's
  • The ground from your LED's will go to the collector of the NPN transistor
  • The Emitter of the transistor will go to ground
  • Add a 1k resistor (or really what ever you have) to the base of the transistor
  • The other end of that 1k resistor goes to your Arduino digital output

Output high = "clicked" transistor = LEDS on

Im still learning about electronics, and the transistor was exactly what I was missing. Thanks again man!

This proect is for my Business class. We have to design a product then market it. Mine is the Zombie Survival Backpack. By the end of the week we have to have proof that we even started the project (I chose to start with the shoulder light). 

In the future the pack will have:

-temp/humidity sensor

-be able to detect pollutants

-use a ping sensor to "see" if zombies are on your tail

-a water purifier on the side

-alert method (most likely a small buzzer or pager motor for a vibration alert.

 

Its just a fun project for school, and just to have :)

 

@max, so beacause Im doing more with it, I didnt think the arduino Uno was overkill lol