help with driving lamps from a LED driver

Thread Starter

ruprecht

Joined Mar 25, 2004
73
Hi all, long time.

I'm working on a project for my simulator cockpit which I have some ideas on, but am being a bit careful so as not to damage my electronics. Hopefully I'll describe the problem sufficiently well for someone to fill in the blanks for me!

I have a PhidgetLED64 output module attached to my PC. It has 128 output pins, of which I'm only concerned with 10: 5 pairs of anode/cathode pins.

In software, I can drive a variable current down those pins. The anode pulses a square wave at about 13kHz, 50% duty cycle from 0V to 3.3V DC. At full power, the anode sources 30mA; this is controllable from 0 to 30mA in 100 linear steps (noting that due to the 50% duty cycle from the anode voltage PWM, it is effectively 15mA).

Essentially, the board is designed to have LEDs attached directly to it. No current limiting resistor is needed, as the anode is designed as a constant current source.

However, I want to attach 12V lamps to them. This is the problem.

Now my first idea was to use an optocoupler (essentially a LED right?) on the output pins, which would trigger a solid state relay to drive the lamps. But the PWM gave me cause for pause there and I wondered if I'd have issues with relays.

Can anyone suggest the bit in the middle, between the output A/K and the two lamp pins, assuming a separate 12VDC supply?

*edit* and my usual supplier is Jaycar in Australia, hopefully all required components would be available there.

Many thanks
 
Last edited:

jj_alukkas

Joined Jan 8, 2009
753
Hey, do you need to vary the current level to the 12v bulb? Or just switch it on and off?? What is the current rating for the bulb? Just switching on and off can be achieved with a power transistor along with a normal transistor. Varied output can be handled with a transistor along with a TRIAC. Relays aren't really necessary.
 

Thread Starter

ruprecht

Joined Mar 25, 2004
73
Hi,

Sorry should have said, I just want them on or off. I'm not sure on the current rating of the bulb, it's not well documented. I'll stick my multimeter on it and see.
 

jj_alukkas

Joined Jan 8, 2009
753
If its a bulb similar to the one used in a car, it might be somewhere between 10-20w.
However, if it is below 10W, a BD139 would be sufficient.
This might help. A capacitor in the inputs will be necessary if its PWM.

 

Attachments

Thread Starter

ruprecht

Joined Mar 25, 2004
73
Yep, SPDT illuminated switches :) They contain a 12V lamp that is integrated with, but separately activated to, the switch.
 

jj_alukkas

Joined Jan 8, 2009
753
If you could tell the correct current draw, it would be easier. But Those wont need more than 2W, I guess they are 0.5W. I guess AC127\AC187 instead of that TIP would do just fine at 1W.
 

jj_alukkas

Joined Jan 8, 2009
753
AC127/AC128 are 50 years old germanium transistors that have not been made for many years.
I had one for many yrs until one day it blew up on some short circuit. I thought it was still in production.

Hmm... 2N2222 alone will do the job as it has an Ic max of 800mA where 40 is only required and is a 500mW transistor.

So wire a 2N2222 with base to your LED line through a 1K resistor, Emitter to GND and collector to your 12v bulb . Thats all what you would need.
 

Thread Starter

ruprecht

Joined Mar 25, 2004
73
Thanks for the replies. I mocked up the attached using components I had to hand. Would this be close? I would like to isolate the Phidget from the lamp circuit for a number of reasons, chief of which is that I don't trust myself not to melt it :)

Also how would I determine the type and size of smoothing cap to use?

BD135: http://jaycar.com.au/products_uploaded/BD135R07.pdf
MOC3021: http://jaycar.com.au/products_uploaded/ZD1920.pdf
Lamp draws 40mA at 12V as previously noted
PhidgetLED64 output is a constant current source @ 30mA, on a 0-3.3V 13kHz square wave, 50% duty cycle.

Many thanks

*edit* as alternative transistors, I also have 2N3904 and BC107B available.
 

Attachments

Last edited:

Thread Starter

ruprecht

Joined Mar 25, 2004
73
Alright: good news and bad news.

Good news is all the magic smoke is still inside, and the optocoupler does seem to work. With the phidget power set to 0 (0mA) there is no current through the opto output. At full power on the phidget, there is 0.045mA at 0.8V through the opto output.

Bad news is: the lamp stays on all the time, regardless of the phidget power (and even with it totally disconnected). There is always a constant 1mA through the Base, at about 0.8V. I tried disconnecting the cap, it made no difference.

Any ideas? I triple checked the connections, even took it completely apart and rebuilt it. Same problem.

Is the attached more sensible?
 

Attachments

Last edited:

eblc1388

Joined Nov 28, 2008
1,542
Is the attached more sensible?
I'm sorry, no.

The MOC3021 is an opto-TRIAC for AC usage and its use here is inappropriate.

I would suggest the follow circuit, which uses only 4 components and is proven to work in simulation. :)

Just drives the LED inside the optocoupler using interface board and you can turn ON/OFF the 12V Lamp. You don't need "the link" as shown in the image as it is for simulation purpose only.

You can use any general purpose MOSFET like 2N7000, 2N7001 or 2N7002 etc.... They are the size of a small TO-92 transistor.

If you have component selection questions, you can post here.

 

Attachments

Last edited:

jj_alukkas

Joined Jan 8, 2009
753
Søren ,

Isn't the above ckt configured for a low logic enabled output?? Or will the phototransistor in the opto always give a low till the LED fires to make it high?? Im confused.
 
Top