Pages: [1] 2   Go Down
Author Topic: Problem dimming filament displays vs. LED displays  (Read 2650 times)
0 Members and 1 Guest are viewing this topic.
Birmingham, UK
Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To save me having to worry about multiplexing, if I have a few LED displays I want to control from an Arduino, I string enough 74x595s together to give each LED its own output:



Dimming is easy - I've added a transistor between the LEDs and ground, so I can dim them all in one go with PWM. If I'm using 7 segment displays I usually stick one transistor on each display so I can fade them all individually for added sexiness (YMMV).

My problem is that I've found some sexy little 7-segment filament displays:


They are designed to work from TTL-level voltage (5v) and take less than 10mA each. If I try and connect them the same way as LEDs though:



Then dimming doesn't work. If the transistor is off, current flows from whichever segment is lit back through any unlit segments and back into any of the 595's LOW outputs.

What's the best way to solve this?
A) I could stick a Schottky diode in series with each segment (much like the series resistors on the LED schematic above) but that costs me a bit of brightness.
B) I've heard of tri-state outputs on logic chips, but is it possible to get a 595 shift register that will let you set an individual output to high impedance instead of just plain LOW? How would you send it data? Each output would need two bits of data sending.
C) Any better ideas?


Wish I'd thought this through before making my clock; apart from this dimming problem, everything else worked perfectly first time, and I'm not looking forward to laying out the board again, milling and stuffing it again, it took me ages, dagnammit ...



(PS I wish I'd discovered those little 0-ohm jumpers a long time ago - they save an awful lot of hassle if you're trying to do everything on a single-sided PCB. With the tolerances on my mill, I can just squeeze 3 tracks under each jumper. The days of trying to strip 1mm of insulation off each end of a 5mm bit of kynar wire are over, yay!)
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 78
Posts: 1720
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You are going to need to add diodes in series with each filament to prevent the current looping back.

The easiest way to do this with your board is to get some very small surface mount diodes and the traces going between the 595 and the filament, soldering the diode across the gap. You should have enough room if you stagger the cuts.

You may be able to squeeze 0603 diodes (which are 0.5mm wide, 1mm long) onto each of those traces.

P.S. That is a very neat and pretty circuit board!
« Last Edit: October 03, 2012, 08:19:34 am by Tom Carpenter » Logged

~Tom~

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What's the best way to solve this?

Diodes are the way to go. You can solder it on the lamp's pins so your board remains intact and can work with LEDs in the future.

BTW, you can dim the lambs by pwm the HC595's OE pin, further simplying your design.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is a solution.

1) Turn on the npn permanently. This keeps the "unlit" lambs at just the npn's Vce - should be 100mv or so and those "unlit" lambs should not be visibly light.
2) reroute your pwm signal to the hs595's OE pin(s).

Some jump-wiring and some recoding (minimum though).
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
you can dim the lambs

Quote
This keeps the "unlit" lambs at just the npn's Vce - should be 100mv or so and those "unlit" lambs should not be visibly light.

Leave the baby sheep alone.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 604
Posts: 33448
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Then dimming doesn't work
Yes that is correct. The reason is that a filament can not react fast enough to be dimmed by PWM due to the thermal lag. The control region is very narrow.

Other solutions posted unfortunately are rubbish especially the ones that involve torturing small sheep or using diodes. Sorry but there are some people giving poor advice on this forum lately.

What you need to do is to control the voltage to these displays. Perhaps the simplest way is to use the chip as a current sink and connect the common points to +ve through a transistor running as a emitter follower. That is emitter to common points, collector to +ve, resistor on the base to a low pass filter being driven by the PWM.


Very nice PCB and construction by the way.

Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just wanted to state that the original poster was right on as to why dimming didn't work here.

The rubbish about controlling the voltage is funny, however.
Logged

Birmingham, UK
Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

2) reroute your pwm signal to the hs595's OE pin(s).

Fantastic! Never occurred to me that you could just PWM the whole chip using its output enable pin... So I never needed those transistors at all... man, I've been doing that PWM transistor trick on everything, completely redundantly. D'oh!  smiley-red

(snip) ... a filament can not react fast enough to be dimmed by PWM due to the thermal lag. The control region is very narrow.

I'm not sure I understand you, Mike - haven't domestic dimmer switches been using a form of PWM to dim our incandescent-laden chandeliers for years? The thermal lag just acts like a low pass filter, surely. Or do you mean that the light response may not be linear, or may be inconsistent eg. may exhibit hysteresis when ramping up and down?
Logged

South England
Offline Offline
Full Member
***
Karma: 3
Posts: 205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have nothing useful to add here except to compliment the OP on that board smiley-grin What a beauty!
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 78
Posts: 1720
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The only effect thermal lag will have as far as I am aware is to simply slow the reaction to any change in brightness. If you try and change the brightness quickly you will run into problems, the lag will mean you don't notice the fast transient changes, but  regardless you do see the overall effect. It might take a few hundred ms to change, but I don't see how that would be an issue for dimming the whole seven segment display.

If you use PWM, yes you are still giving it full voltage for some of the time (on time), but you are giving it zero for the rest. This will reduce the overall power through it. Less power dissipated means less heat which means less light output = dimmer.

PWM dimming works with filaments fine in slow response systems like this, it is how household dimmer switches work.
« Last Edit: October 03, 2012, 02:32:56 pm by Tom Carpenter » Logged

~Tom~

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Contrary to "popular" believe, PWM will work on filament lamp and I would argue the thermal lag helps. Otherwise, the driver is repeated strained due to low cold resistance of the filament.

Quote
it is how household dimmer switches work.

Most dimmers utilize triac. So they are more phase angle modulated.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
you could just PWM the whole chip using its output enable pin

That actually is the standard way of dimming hc595s. I didn't invent it.
Logged

0
Offline Offline
Shannon Member
****
Karma: 201
Posts: 11744
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If the output enable didn't exist you could move over to a variant of the 595 that has open-drain outputs such as the NPIC6C595-Q100 (which also have the advantage of driving higher voltages than 5 if you need it).  You'd have to add PNP switching transistor and PWM on the high-side though with open-drain outputs.  But the OE does exist!

Or you could directly PWM the outputs themselves (would have to re-update the shift-register chain at a very high rate of course).
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Or you could directly PWM the outputs themselves

That would require tremendous amount of data being sent over the spi. I would say that's practically no-workable.

In that case (hc164 for example), the OP's original solution is better. Then it runs into the cross-conduction problem.
Logged

Birmingham, UK
Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Or you could directly PWM the outputs themselves

That would require tremendous amount of data being sent over the spi. I would say that's practically no-workable.

I bought one of those 5 metre long RGB LED strips with a little control box and remote a while back, and pulling it apart (welcome to my home, new victim) I noticed it used a tiny PIC and a plain ole' 595 to control the 3 channels' MOSFETs. Made me wonder how fast you can update shift registers. Obviously becomes less practical the more 595s you have chained together. Also made me wonder why they chose to use two separate chips rather than just using a PIC with more legs/outputs on it...

PS thanks for the compliments on my PCB construction, I always think they end up looking a bit hacky but it's nice to get a thumbs up from you folks smiley
Logged

Pages: [1] 2   Go Up
Jump to: