LED Throwies are fun and simple projects to create, but the basic ones have some limitations - no on/off switch, so once you wire them up, they start to run down the battery. There's other instructables for fixing those issues (On/Off LED Throwies, and Auto On/Off LED Throwies). Those are good improvements, but the LED will still run during day-light hours, when it's not likely to be seen. Googling that, I found a solution at EvilMadScientiest.com for adding in a Photo-transistor (in this case, to sense Infra-red). It's pretty simple, although doing multiple solders on small wires in tight areas was a challenge for me, especially trying to do it neatly / cleanly, to have a compact throwie.

I wanted to do this throwie as part of a project in an 'Introduction to Engineering' class I help out in - soldering was OK, but I knew that ~20 students, most with no soldering experience, having to do 5 solders each wouldn't be fast... Crimp connectors could solve that, but would give a pretty bulky body. Thankfully, next to the soldering and crimp connectors in my local electronics store were some Molex connectors - they turned out to work GREAT!

And, a quick shout-out to the Downtown College Prep (DCP) Alum Rock High School Engineering Design students and staff - Keep Calm and Ganas On!

Step 1: Materials

  • 1x CR2032 coin cell battery
  • 1x 1K Ohm resistor
  • 1x 2N3904 Transistor
  • 1x LTR-4206E Phototransistor
  • 1x Molex KK .1" 4 terminal Connector & 4x Molex terminals
  • 2x short wires, about 2” / 5cm long (22 gauge is good - I used Red and Black to stick with red = + (positive) and black = - (negative) standard
  • 1x one small, round Neodymium (i.e. rare earth) magnet (1/2” by 1/16” is good)
  • Electrical tape
  • (Optional) Hot Glue gun
  • (Optional) Card stock and double-sided tape for final assembly

For the Molex Connector & Terminals -

  • I got Waldom WMLX-102 at local store - should be $4-$6 for a pack with 3 housing and 13 terminals. If you can't find 102, but can find other Molex KK .100" series with more connections, those work as well - just use 4 terminals in them.If you want more than a few (like I did for the class),
  • If you want more than a handful of them, it's cheaper to buy housings and terminals separately / in bulk from an online store like DigiKey. The part numbers for the Molex housing is Part #’s 22012041 and for the Molex terminals is 08500114. I got 50 housings and 250 terminals from DigiKey for $30 plus shipping.

Step 2: Prepage the Molex Connector

The Molex connector has 1 end with larger holes, in which wires with Molex terminals (see photos) can slide in (I'll call these "terminal holes"). The opposite end has holes in which small pins (like on PCB boards) can go in (I'll call these "pin holes"), or an electrical connection can be made via the metal tabs on the terminals and the slots in the molex housing. To grip the pins in the pin holes, the terminal has a spiral end, which acts like a spring - when you insert the terminal into the Molex terminal hole, with the flat / parallel side of the spring facing the slots (rounded / spiral side facing away from the slot), this spiral section gets compressed, increasing its tension against the housing. When you insert a pin into the pin hole, that tension holds it pretty firmly in place. We'll use that tension to make our circuit connections.

  1. Strip insulation from ~3/16” (2mm) on one end of each wire, and ~3/8” (4mm) from the other end of each
  2. Crimp (or solder) one end of the colored (red in picture) wire into the “u” shaped channel in 1 terminal. Repeat on one end of 2nd wire (black in picture).
    • In the 3rd picture, I stripped the too much insulation off the wire. On the terminal end, the insulation should go into the first set of crimps, and the metal into the 2nd set. See 1st picture for a great example.
  3. Insert colored wire & terminal into terminal hole #1, then 2 terminals (without wires) into terminal holes #2 & #3, and finally the 2nd wire into terminal hole #4
    • The spiral head faces the end with slots, with the flat side of the spiral towards the slots
    • The wire or “u” channel end faces out the bigger hole
    • If you can see the "top" of the "u" channel / crimps as you slide the wire and/or terminal in and the slots on the Molex connector, you're inserting it correctly.
    • Lightly push until almost all the way in – you should see silver showing in part of the slot. Use a pen or another fine tip item to seat firmly.
    • Easiest to do it in order from #1 to #4 or vice versa - inserting the 2 middle terminals when #1 and #4 are already done is a bit trickier, but you can do it.

Step 3: Assembling the Circuit - the 2N3904 Transistor

Labelling the slots on the Molex connector may help you - a fine tip Sharpie works well here.

Note - the schematic has 4 connections, labelled 1..4, which will match what's inserted into the Molex connector terminal #1..4 holes. The schematic also has the flat side of the 2 transistors drawn in.

Insert the 2N3904 transistor (one with 3 legs) into Molex connector holes for Terminal 1..3 - with FLAT side of transistor facing you

  1. the right leg (the collector) goes into pin hole #1
  2. the middle leg (the base) goes into pin hole #2
  3. and the left leg (the emitter) goes into pin hole #3
  4. Get the tips of all 3 legs into the Molex pin holes and then push the transistor body - you wan the legs to go in 1/4 - 3/8” (6-8mm) to seat the transistor firmly

Step 4: Assembling the Circuit - the 1K Ohm Resistor

To add the 1K Ohm resistor into our circuit, we want 1 leg (either one) to go into the terminal 1 hole, and the 2nd leg to go into the terminal 2 hole.

  • To make this easier, trim 1 leg of the resistor to be about 1/2" (10-12mm) long.
  • Bend the other leg of the resistor 180 degrees and back in parallel with the leg you just trimmed, and trim it to end at same depth as the first leg.
  • Now insert the resistor into the Molex, with the body of the resistor above pin hole #1
  • Place the 2nd leg into pin hole #2
  • Push in legs 1/4 - 3/8” (6-8mm) to seat the resistor firmly

Step 5: Assembling the Circuit - the LTR-4206E Phototransistor

Great – now we’ll place the phototransistor between pin holes #2 (collector) and #4 (emitter)

  • Note: You may want to trim the legs on the phototransistor – gently slide the phototransistor into any 2 pin holes about 1/4" (or 6mm) and see how it looks - I trimmed off 1/4" (6mm) of the phototransistor legs to get it to sit deeper
  • The photo transistor body is also a cylinder with a flattened side. On the LTR-2406E, the flat side points to the (C)olletor leg – that should go into pin hole #2
    • It may be a little difficult to get the phototransistor collector leg into pin hole #2– using a pair of needle nose pliers, tweezers, or forceps, with the body of the tool in parallel to the direction of force, to help push it in will help
  • Push in legs 1/4 - 3/8” (6-8mm) to seat the Phototransistor firmly

Step 6: Assembling the Circuit - the LED

Wow – almost done! It’s time to place the LED.

  • Note: You may want to trim the legs on the LED – I thought the LED sitting 1" (25mm) above the connector was too much, so I trimmed off about 3/8” (8mm), so it would sit just above the phototransistor.
  • If you trim it, one leg may not be longer anymore – use a battery to find the +ve / -ve legs
  • The longer / +ve leg goes into pin hole #3
  • The shorter / -ve leg goes into pin hole #4
  • Push in legs 1/4 - 3/8” (6-8mm) to seat the LED firmly

Step 7: Quick Test to Make Sure It Works

Excellent – let's do a quick test with the overall circuit

Touch the wire (red in the picture) coming out of back of terminal #1 hole to the positive side of the CR2032 battery, and the other wire (black in picture) coming out of the back of terminal #4 hole to the -ve side of the battery. If you’re in-doors / under fluorescent lights, the LED will turn on. That’s *expected* - the phototransistor senses IR (infra-red) light, which most lights don't emit. Hold the wires to the battery, walk outside (assuming it’s daytime) to check that the LED goes out.

Assuming everything works, go on to the next step.

If there is a problem, things to check:

  • Light doesn't come on inside
    • Try reversing the battery - might be using the wrong polarity.
    • Re-check the LED vs. the battery - try both directions. The leg of the LED that touches the + side of the battery needs to go into pin hole #3, and the leg of the LED from the - side of the battery should be in the pin hole #4.
  • Tried all items in above and LED still doesn't turn on, or the LED turns on but not off
    • Are any legs of the resistor / transistor / photo-transistor / LED touching other legs? This would cause a short and cause different types of issues depending where the short is.
    • To prevent and/or reduce shorting, you can gently bend the bodies of the resistor, transistor, phototransistor, and LED away from the pin hole #1..4
    • The optional step using a Hot Glue gun will also help keep this from happening in the future, but only do that step once you have the circuit working!

Step 8: (Optional) Add Hot Glue to Hold Everything in Place, and Prevent Shorts

Assuming it works, let’s use some hot-glue to help hold everything in place, provided electrical insulation between the component legs, and maybe even weather-proof the connections

  • Run a small bead (1/8 - 3/16", or 1-2mm) of hot glue along one side of the “top” (pin holes #1..4), and then back across the other side. You're trying to inject it in between the legs to help hold them all in place, and keep them separate.
  • Repeat on the terminal holes, covering both sides and all 4 holes (2 with wires, 2 without).
  • DON’T TOUCH the HOT GLUE! - Let it sit for 1 minute for the glue to set (harden).

Step 9: Time to Wrap It Up

Once the hot glue has set, we can tape the “a” (red in picture) and “b” (black in picture) wires to the positive and negative sides of the battery / magnet combo.

Your choice on “always on” (just tape it up), using a simple Paper On Off Switch, or using accordion fold paper “spring” to make an Auto On Off LED Throwie (where the magnet clamping on metal closes the switch).

If the “a” and “b” wires are thin enough, you can bend the battery back around and tape-id\t to the connector housing to make a very compact LED Throwie - just be sure to leave the magnet facing out, so it’ll attach to an iron or steel surface!

What are the purpose or the resistor and transistor? I'm looking into upgrading dollar tree window LED candle with dark sending capability, but I'm not sure how to integrate the phototransistor into existing board.
The phototransistor itself will allow about 1.5mA of current thru it - not enough to get much light out of the LED, so we need to use the phototransistor opening (passing current) to change the bias (or gate) voltage on a secondary, high-gain transistor, like the 2N3904. <br><br>When the phototransistor senses IR light, it draw about 1.5mA, so the 1k ohm resistor will get 1.5mA thru it, and have a 1.5V drop across it, setting a positive voltage on the bias (gate) terminal of the the NPN transistor, and not allowing current flow between the collector / emitter.<br><br>When the phototransistor sense no (or little) IR light, it'll draw 0 (or much less current) - this will cause the bias (gate) terminal of the NPN transistor to see 0 (or close to 0) volts, which will allow current to flow between the collector / emitter. <br><br>NPN transistors work (conduct current) when the bias (gate) is ~0V. PNP transistor conduct current when the bias (gate) voltage is &gt;&gt;0V.<br><br>I'm guessing if it was a cheap design, it probably has a some combo of batteries to make 3V, and then 1 resistor in series with the LED. You'll want to remove that resistor from the circuit, and then treat the 3V battery and LED you have like the ones in my schematic.
Thank you for the explanation! I always thought that this skill is a dying breed in America, considering how cheap electronics are. I'm a programmer by trade but your post inspires me to learn more about this skill.
And yes, it's a cheap design. It's using 2 AA batteries to get 3V. I will tear it apart and follow your direction. Thanks again and happy holidays!
<p>I think you're right that it is a dying skill set, but there's hope - with Instructables and STEM/STEAM focus in schools, Arduino and stuff like that, young folks are out getting hands on more and more... I'm a 50 year old retired HW guy, helping teach some engineering classes at a local school - try to get them more hands-on in fun ways as well.</p><p>Happy Holidays!</p>
<p>Combine with flicker LED: https://www.aliexpress.com/item/free-shipping-100-x-5mm-Orange-Candle-Light-Flicker-Ultra-Bright-Flickering-orange-LED-Leds-5mm/32225009177.html?spm=2114.01010208.3.74.xeZLMG&amp;ws_ab_test=searchweb0_0,searchweb201602_3_10065_10068_10000007_10084_10083_10080_10082_10081_10060_10061_10062_10056_10055_10037_10054_10059_10032_10099_10078_10079_10077_10073_10097_10100_10096_10070_10052_10050_424_10051,searchweb201603_8&amp;btsid=64d7b558-f518-4d48-ab3b-c19d6168b27a</p>
<p>Nice improvement. This would ensure that the LED's last longer.</p>

About This Instructable




More by jabenoit:Dark Sensing LED Throwies - DCP Style 
Add instructable to: