can't sink current through multiplexer

I have a seven segment display. I've verified that it works, but I have trouble when I hook it up with an arduino + 4051.

The SSD is common anode. I have a resistor running from 5V to the common anode. Each cathode is hooked up to a multiplexer input. As I understand it, to sink current with an IO port, I set it low.

Output 1 is wired to the B Cathode, when I run the code:

digitalWrite(0, HIGH); //Select A, LSB
  digitalWrite(1, LOW); //Select B
  digitalWrite(2, LOW); //Select C, MSB
  digitalWrite(3, LOW); // This is what should sink the current

For some reason, all the outputs on my mux are floating at 3.6V. If I add a 10K pull-down, the appropriate cathode lights up, but very dimly.

Could it be that 4051s are really crappy at sinking current? I wouldn't imagine this making sense as a multiplexer should have no problem passing whatever you tell it to.

If any clarification is required, please let me know.

What size is the resistor running from 5V to the common anode?

With a supply voltage of 5V on the 4051 the on-resistance is probably around 200Ohms (this depends on which variety of 4051 you are using). With your current limiting resistor and the on-resistance of the MUX you are probably not getting much current through the LED.

(* jcl *)


www: http://www.wiblocks.com twitter: http://twitter.com/wiblocks blog: http://luciani.org

With a supply voltage of 5V on the 4051 the on-resistance is probably around 200Ohms (this depends on which variety of 4051 you are using).

Indeed. An analog multiplex is NOT a power switch; it has a on resistance that is "low" only compared to (for example) audio signal levels, and is "well behaved" in that space (acts like a pure lowish-value resistor of a couple hundred ohms when on), but it's not really suitable for what you're doing...

Could it be that 4051s are really crappy at sinking current?

No, it’s really good at sinking current. As long as the current is in the sub-1mA range it was designed for :wink:

jcl was actually being optimistic: the Fairchild datasheet for 4051s says they have a typical Ron of 270 Ohms, and are allowed to have up to about 1K and still be within spec.

The 4051 was designed as a peanut part, intended to meet non-critical requirements cheaply. If ya want fancy, ya gotta pay a fancy price.

For this application, you should look into a digital decoder, like a 74xx138.

Ran

I have 100 Ohm on the common anode.

It's sounding like this on resistance could be troublesome, and quite far ranging. Decoders seem ridiculously expensive, and I'm wary of buying more complicated parts which may not sink the current.

Are there any other parts that would give me control over all 7 segments with 3 lines (for select) and 1 line (for control)? Maybe a mux can't sink the current I need to properly, but I could use it to control a transistor as a gate directly to ground?

I found these SSDs at the surplus store for a buck each, so it wouldn't make sense to go buy ICs that cost more just to get them working. I just want to set up 3 of the displays and count to 256 (just for kicks). If it turns out that this can only be done expensively, I may just have to move on to another project (I just spent $140 on electronics supplies the other day, so I have to cool it for a bit).

The 74AC138 and 74ACT138 will sink 24mA. How much current do you need?

(* jcl *)

20mA should do it. I'll look those up.

I have 100 Ohm on the common anode.

That's usually a bad idea. You can get away with it because you're only lighting up one segment at a time, but you normally would be lighting up multiple LEDs, and would need a resistor for each segment.

I found these SSDs at the surplus store for a buck each

Surplus stores that sell 7-segment displays usually also have cheap chips. Since you live near Waterloo, there's a good chance that there's some sort of storefront within easy reach that caters to EE students, so you shouldn't have to mail order or wait for you next trip to Hogtown.

Ran

I considered that a resistor on the common anode was generally bad (if the segments had slightly different properties, it could be problematic), but as you said, I am only turning them on 1 at a time.

As far as cheap chips at the surplus store, they don't really deal in ICs. They mostly sell LEDs for far more than they're worth. I don't know of any stores in Waterloo, but there is one close to my house in the industrial section of town. It's just a matter of praying they have the chip I want. (and then going down and sorting through the millions that they do have, you can end up spending two hours in the place finding parts)

Either way, thanks for all the suggestions and advice.