[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself


View post   

File: 5 KB, 158x150, switch.jpg [View same] [iqdb] [saucenao] [google]
281110 No.281110 [Reply] [Original]

So I have a switch kinda like this pic.

I'm new to this and I'm trying to find a way to make it turn on and off an LED using the power of a couple small batteries. Have some resistors and wire laying around too.

>> No.281136
File: 29 KB, 482x800, 1343165768699.gif [View same] [iqdb] [saucenao] [google]
281136

>>281110


circuit goes:

battery (+ terminal) -> switch in -> switch out -> resistor (10k or close for LEDs) -> LED -> - terminal of battery

batteries would be best in a pack with wire lead outs, but you can tape the red to the + and black to the - if you're desperate for it to work. if the switch has 3 pins one is for ground, you don't exactly need it for a simple circuit like this (its usually the middle pin).

>> No.281138

>>281136
It has 4, which is whats confusing me.

>> No.281139

Basically what you want to do is this:

Attach the 2 small batteries end to end and tape them i guess (the + end touching - end on other)

Now you want 2 wires coming from the battery, one from either end. Stick these on 2 pins on the switch. I'll make a bad diagram.

<Battery +>---------o switch o
<Battery ->----------o o

So after this is done attach the resistor somehow to one of the 2 remaining pins (if there are 4) and then wire up the LED with one side on the resistor and one side on the remaining pin. There will be a flat part on the LED for ground (negative) so make sure that side goes up with the negative side of the battery. (the pin adjacent)

Hope this helps. It's not too hard and im shit at explaining

>> No.281144
File: 5 KB, 236x241, switchone[1].jpg [View same] [iqdb] [saucenao] [google]
281144

>>281138
just fug around with the pins. found this online but im not sure how relevant it is to you

>> No.281145

>>281139
Thanks. Ya doesn't seem hard I just don't know shit. Might have to get another switch anyway since it has to all fit in a soda bottle top.

>> No.281147

>>281145
Don't worry, When i first got into remote control/autonomous robots, i was like WTF. Where do i start. I started googling, used youtube, hobby shops, robot marketplace, etc.

You'll get it soon enough. If it needs to fit in a bottle cap try a micro rocker switch with 2 pins. 2 pins is easier, because you just need to cut the wire anywhere and attach the 2 ends. If you need more help i can make one and send a pic tomorrow. Got an email?

>> No.281167

Simple (If I understand you correctly) The reason the switch has four pins is because it's what is known as a single throw, double pole (st/dp) that is: you throw the switch between two positions (off/on) For an L.E.D. you won't need ground, and your switch doesn't have a ground anyway. If you look closely, on the switch there will either be a '+' and '-' symbol, or 'c' (common) and 'NO' (normally open) Connect the battery's red lead to one of the + connections, or C connections, and the black to the - or other C connection. Next is the LED...check the voltage requirements for the LED, it's likely to be 1.5v which is what your battery will put out. If that's the case, just attach the annode (the + side of the LED) to the other + or opposite C to the red wire from the battery, and then the cathode (- side) to the opposite C to the black, or the other -. Job done. If the LED has a lower voltage then the battery, then you can use Ohms law (look it up on google) to work out what resistor you will need...solder the resistor inline with the + side of the LED..you may need to shorten the leg to get it to fit.

>> No.281179
File: 30 KB, 692x487, switch.jpg [View same] [iqdb] [saucenao] [google]
281179

In other words...this:

>> No.281397

Thanks again everyone. Got the little mini light working pretty well, now I just have to find my glue gun to mount it.