Problem controlling a ~9v 7 segment display using NodeMCU (3.3v) gpio and a CD4094 shift register

I'm new to electronics. I'm a developer.

I've been working to control a 7 seg common cathode ~9v display using a CD4094 shift register and a NodeMCU ESP8266 (3.3v pin out).

I've tried to solve the difference between these voltages (3.3 and ~9) using a common emmiter transistor schema (w/ 2n2222).

I could use the common emmiter as a switch, supplying 9v when the transistor base is powered by 3.3v. But I could not figure out how to use this schema with the data, latch and clock in the shift register.

Is the common emmiter schema a possible solution for this problem? Is there another solution using few components?

Schematics (CD4094 pin position are random in this drawing):

simulate this circuit – Schematic created using CircuitLab

Thank you everybody!

• Welcome to EE.SE. You need to provide a schematic so we understand what you have done. If you don't have one then draw one using the built-in tool on the editor toolbar. Show your power supply, the output pin and the LED driving circuit. – Transistor Aug 26 '16 at 18:15
• Is this 7-seg to be multiplexed with other 7-seg display digits? Will you be mutliplexing each of the A-G anodes? Or driving appropriate ones in parallel, instead? – jonk Aug 26 '16 at 18:53
• You will be using the $9V$ to operate the CMOS device, too, I suppose. You may need something to level-shift between your $3.3V$ outputs and the CMOS inputs. Your question probably includes that, as well as driving the segments of the display from the CMOS device. Yes? – jonk Aug 26 '16 at 19:36
• Hi friends! I've added the schematics I'm trying to achieve. Does it make any sense? – Ricardo Zylbergeld Aug 26 '16 at 19:42
• Hi @jonk! I will multiplex the digits instead of each segment. But, my main problem is to figure out how to supply 9v to the shift register with a 3.3v output from my mcu gpios. Thanks! – Ricardo Zylbergeld Aug 26 '16 at 19:47

simulate this circuit – Schematic created using CircuitLab

You want to use $9V$ as your source voltage and control that using a $3.3V$ signalling line (with a small amount of current compliance to it.)

The problem with the above is that you don't really have any headroom to help control the current, if you use $9V$ as your source voltage. This really only leaves open one possibility -- a saturated current mirror -- and I'm not particularly hopeful about that. You usually want to allow some headroom for a control circuit (just a resistor in many cases) to provide at least some modest current regulation.

You could easily just use a BJT or MOSFET as a switch and just let the LED segments each decide on their own what level of current will flow through them given the voltage they face. But LEDs tend to respond with currents that are exponentially related to the applied voltage. Worse, they don't all respond equally. And since it's an exponential function, "not responding equally" can mean very large differences in current between them and very different apparent brightness. (They aren't even the same brightness given the same current, but at least they tend to be closer that way.)

So you really shouldn't consider the idea without some kind of current control going on.

You can add the current control to either side. If you add it to the COMMON, then the current control circuit will apply to all the segments. However, this only is useful if you are "scanning" them one at a time. Otherwise, the current control applies to all the enabled segments and this is very bad to consider. So if you intend to "turn on" more than one segment at a time, then the current control should go onto each of the nodes. And that means you have another problem -- a replication of lots of current control circuits.

So what I need to know from you, before I bother answering further, are answers to the questions I asked in my earlier comments. How do you plan to operate these devices? How many are there? Will you operate more than one segment at a time? Can you consider a voltage rail that is more than $9V$?

Your situation has complicating boundaries, if you plan to have no voltage headroom. So it's hard to answer directly when you haven't given enough information. I'll wait until you consider those and provide some better detail about what you intend and want to do.

• it will be a 3 digit combination and, yes, if one segment at a time is a better solution, it could be considered. – Ricardo Zylbergeld Aug 26 '16 at 19:53

Your transistor circuit will work to level-shift the 3.3V/0 signals to 0/9V for the CMOS shift register. Note however that they are inverted (3.3V in is a logic 0 out and 0V in is logic 1).

It's possible to use the same transistors and similar resistors as non-inverting level shifters but I think your method is fine so long as you account for the inversion and for the relatively slow switching.

simulate this circuit – Schematic created using CircuitLab

The CMOS chip has relatively little drive capability and may not be your best choice for driving a large LED display- you might do better with a TPIC series power shift register- but that was not your question.