0
\$\begingroup\$

I have two seven-segment displays. Each display requires about 12 V to power and each segment of the display needs about 20 mA (so about 140 mA worst case scenario).

I have everything working if I power the microcontroller and displays independently with two different power supplies, but when I try to run both off of one power supply, the displays are extremely dim and some of the segments won't even turn on. The power supply I'm trying to use outputs 12 V, 2A (outputs 14 V in practice).

Why isn't this working? Do I just need a power supply that can provide more current? The microcontroller supposedly draws about 170 mA max, and the displays would draw about 280 mA worst case scenario. That's well under the 2 A my power supply provides. What am I missing here?

Here's the schematic of my circuit. I apologize it's so messy. There may be a mistake with the transistors but it's only in the diagram; that part works correctly in the circuit itself. This is my first go around with making circuits in software.

enter image description here

\$\endgroup\$
17
  • 2
    \$\begingroup\$ How that would work at all if 2n3906 transistors are connected like that? \$\endgroup\$
    – Justme
    Mar 10, 2023 at 7:02
  • 3
    \$\begingroup\$ Regulators rarely work properly without bypass caps. They can turn into oscillators and the circuit will not work properly. You have already given a schematic that does not match what you built, and supply voltages that did not match. We don't know what else might not be true about your circuit, or of what you built does not match the schematics. On paper, it should just work, assuming the regulators are ideal, supply is over 12V, transistors are in correct orientation. In real life, regulators need the capacitors, so put them in to rule out that it isn't the issue. \$\endgroup\$
    – Justme
    Mar 10, 2023 at 8:31
  • 3
    \$\begingroup\$ Just a general observation. You've replied 'it works' a few times to enquiries and suggestions, yet your question you started with is 'Why doesn't this work?'. Designing something that works is relatively very easy, it's designing something that never doesn't work that's the hard part. And that's where your design is falling down so be ready to examine and tear apart everything, impartially. If the fault isn't where you thought it would be then it's somewhere you didn't think it would be. \$\endgroup\$
    – TonyM
    Mar 10, 2023 at 8:38
  • 3
    \$\begingroup\$ Please measure the actual voltages of the 12V regulator input and output when the circuit is running. It does not matter if the power supply outputs some random voltage when it has no load. \$\endgroup\$
    – Justme
    Mar 10, 2023 at 9:35
  • 3
    \$\begingroup\$ It doesn't help to show us a schematic with known errors in it since you're going to get feedback on those which won't be useful if you've already fixed them. Show us what you've actually built. \$\endgroup\$
    – brhans
    Mar 10, 2023 at 12:33

3 Answers 3

3
\$\begingroup\$

The main problems I see is that Q9 and Q11 should have emitters to the positive rail (as-is they are reversed and E-B breakdown will occur with a 12V supply). And that U4 cannot supply the 200mA+ current requirements of an ESP32 in worst case (transmitting), it will current limit and/or thermally limit as the die heads for silicon-melting temperatures. In the latter case, a switching supply would make more sense.

Other than that, it should "typically" work fine, unless I've missed something. There are other things that could be better (caps on the regulators, some resistors to drain leakage from the high side bases) but those won't stop it from "typically" working at room temperature etc.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Thanks so much for the answer. I figured out the issue. It was that under load, my 12V power supply doesn't provide enough voltage to allow the 12V regulator to work. What would you recommend to step down the 12 V to 5 for the microcontroller? I saw you recommended a switching supply. Would you mind linking to one so I can see an example? \$\endgroup\$
    – namarino41
    Mar 10, 2023 at 20:47
  • 1
    \$\begingroup\$ You can find various inexpensive modules for hobby use based on the LM2576 or (more likely) clones. I think they work okay, at least at moderate currents and input voltages, however I can't recommend one over another. \$\endgroup\$ Mar 10, 2023 at 20:55
  • 1
    \$\begingroup\$ Great, thank you. I bought a buck converter based on the LM2596. I think that should do the job. I did some more testing and it looks like you're exactly right. Thanks so much for your help and patience. Really appreciate it. \$\endgroup\$
    – namarino41
    Mar 11, 2023 at 1:52
2
\$\begingroup\$

The LM78L05 and LM78L12 are constant voltage sources, who deliver 100mA of current. If you use them with a single 7-segment display, this can work, but not in every case (if you display a "8"). If you try to use two displays, then the voltage will be reduced because of internal protection mechanism of the LM78L12.

Please measure the voltage at the output of each voltage regulator and touch the surface of the LM78L05 and LM78L12 to feel how warm they are.

Use instead a LM78T05 and LM78T12 for higher current.

\$\endgroup\$
3
  • \$\begingroup\$ Appreciate the response. The 5V regulator is very very very hot. Will the T05 help with that? Would you recommend any other way to regulate the 12 V down to 5? \$\endgroup\$
    – namarino41
    Mar 10, 2023 at 19:46
  • \$\begingroup\$ The linear voltage regulator has a voltage drop of 2 Volt. If you want 5V, you need at least 7 Volt. 2V*0.28A=0.56 Watt. This is a lot for such a small device. I use a little adjustable StepDown-regulator, this is a little module (for ~50 Cent from eBay/aliexpress). Your ESP need 5V/140mA and with a step-down regulator he would only need 60mA on the 12V line for the ESP-µC. If your power supply generates high voltage peaks (engine generator), then you need an RC or LC-filter and a diode on the input to protect the switching regulator. \$\endgroup\$
    – MikroPower
    Mar 10, 2023 at 20:45
  • \$\begingroup\$ @MikroPower, had upvoted the answer but this is good new information. Please can you edit and rephrase your answer to add this into it, rather than posting it in a comment. Otherwise readers have to piece together the full answer from fragments. Thanks. \$\endgroup\$
    – TonyM
    Mar 14, 2023 at 7:01
0
\$\begingroup\$

The main point is using a linear voltage regulator with nominal supply voltage equal to nominal output voltage: this won't work.

I don't think you need a regulated voltage there:
turn your segment drivers high ("differential") impedance instead.

\$\endgroup\$
2
  • \$\begingroup\$ I'd need \$V_F\$ for a suggestion how. \$\endgroup\$
    – greybeard
    Mar 10, 2023 at 13:13
  • 1
    \$\begingroup\$ (Down-voters please comment why an answer is not useful.) \$\endgroup\$
    – greybeard
    Mar 10, 2023 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.