Flashlight Modification for Computer Control

I just got the Vex flashlight. It’s nice.

But it simply must be turned on and off under computer control. So…

I connected an N-channel FET across the switch contacts. The Source of the FET is connected to the side of the switch that leads to the Black wire. The Drain of the FET connects to the other side of the switch. The Gate of the FET is connected to a new wire that leads back to the Vex controller and is plugged into a Digital Out. I probably should have soldered a 10K resistor between the gate and source to keep the light turned off if the control wire is not connected, but I was going for quick and dirty.

I used an MPF6661 FET because that’s what I had lying around, but there are any number of FETS that will do the job. The current through the LEDS is only about 15mA.

The flashlight can still be turned on and off with the switch as long as the control wire is connected to a low logic level. When the control wire goes high, the light turns on.

https://vexforum.com/gallery/files/1/4/6/1/flashlight-fet.jpg

Well that was fast. Very nice now to find a use in the FTC…

in FTC the flashlight could confuse other robots light sensors (kind of unGP though)

this is very nice, glad to see other users know a thing or two about electronics (i.e. diodes, resistors, transistors, capacitors, etc…)

just wondering, instead of taking your flashlight apart, thus voiding the warranty, couldn’t you just put the black wire to ground and then use an NPN or FET transistor to connect the red wire to another power source and then the base to an I/O pin?

Yes, I could have put the transistor completely external to the flashlight.
In fact, I have done similar things in the past using the rig shown below. For the flashlight, the FET fits nicely in the case and was easy to install. I am not really very worried about the warranty for this part. If I break it, I fix it.

thats great, mind if i use the set up? actually im more of a jumper wire person my self (http://www.basicx.com then click products and extra jumper wires, these things are awesome!)

This is really cool, but i don’t see a need to spend $12.99 on the vex light when you could get a relay from Radioshack and a much more powerful mini mag light, and then turn on the relay which would turn on the mag light.

some people like convienience though, i guess unless you’re in FTC theres really no need for it to be computer controlled because if you’re in the dark, whats the point of turning it off?

i believe Vex Labs should come out with an IR battle tag thing, with a whole bunch of battle commands :smiley: this would be awesome!