0
\$\begingroup\$

After receiving some feedback on my other question, I have improved my design.

I am still using a stm32f030k6 to drive a two-digit 7-segment display, but I am using the common-anode HDSM-291C in order to be able to use the STP08DP05 LED sink. Since that IC is specified as being a sink (although source is mentioned in the description?), I concluded that I need high-side transistors to toggle the digits, and since commenters suggested using a MOSFET I chose the dual-channel SQ3989EV.

I am reasonably certain that the STP08DP05 should do the job. It is connected to a set of SPI pins on the MCU, since the protocol (8 bits at a time clocked in through the CLK pin) seems to be compatible with SPI. I've connected the outputs to the cathodes of the display, and as far as I understand I should be able to toggle the brightness of the LEDs by using PWM on the OE pin.

I am far less certain about the transistors. I have tried to research LED drivers and found people using similar setups, but I have little personal experience with transistors. Do I need some kind of current limiting?

schematic

I would like to know if any of my assumptions are wrong, if the choice of ICs and transistors is sensible and if I've missed anything else.

Thanks for any help!

\$\endgroup\$
3
  • \$\begingroup\$ @StefanWyss The forward voltage is 2.1V. The datasheet for the transistors specify -0.300Ohm Rds(on) for -4.5V, is that the correct value? Should I just subtract that from the normal resistor value? It seems that a difference of 0.3Ohms is pretty negligible... And how does the STP08DP05 affect the equation, I thought that would limit the current on it's own? \$\endgroup\$
    – Vegard
    Oct 18, 2019 at 8:37
  • \$\begingroup\$ Ignore the Rdson. \$\endgroup\$
    – winny
    Oct 18, 2019 at 8:48
  • \$\begingroup\$ Sorry for my last comment: I did not notice that the STP08DP05 is a current regulator. \$\endgroup\$ Oct 18, 2019 at 8:48

2 Answers 2

0
\$\begingroup\$

In addition to the missing Rext resistor, you have grounded the latch pin (LE/DM1) so you can't load data to the device.

Please look up the datasheet how you want to connect it (maybe control from MCU when to load data in, or maybe it can be set high to act as a transparent latch as it is the only device on bus).

Also, I see no bypass caps at supply pins of the chips.

\$\endgroup\$
5
  • \$\begingroup\$ Ah, right you are - I thought I didn't have to use the latch because of the clock, but the datasheet does explain it. The MCU does have decoupling caps on it's power supply, but I see no mention of them on the datasheets of the other chips - would you say it's a good practice in any case, and how would I know what size to pick? \$\endgroup\$
    – Vegard
    Oct 18, 2019 at 12:27
  • \$\begingroup\$ Bypass caps are sometimes essential for chip operation, not just good practice. Basic rule of thumb is to have 100nF capacitor at each supply pin, unless told otherwise. It is usually cheaper to put them into schematics and later leave them out if not needed, than to not put them into schematics and later order new PCBs because they were needed. \$\endgroup\$
    – Justme
    Oct 18, 2019 at 12:48
  • \$\begingroup\$ Okay, I see. I'll add that, then. Actually, I'm still confused about the latch pin - on table 9 it's listed as negative logic but on table 3 it's not? And in the timing digram in figure 7 it's listed as low most of the time, and it's not clear what it's doing when it's set high. How can I figure out how it's supposed to be used? \$\endgroup\$
    – Vegard
    Oct 18, 2019 at 12:57
  • \$\begingroup\$ LE pin loads data from the shift register to LED outputs, looks like it loads during rising LE edge (or high). So if it is low, you can not update the output latch. If it is high, it might update output latch from shift register during the shifting so you might see LEDs flickering during serial data transmission. So just as with any other serial shift register with a latch, you use the clock and data pins to shift the bit pattern first, and when data is stable in the shift register then use the latch pin to update all data bits from shift register into the output latch. \$\endgroup\$
    – Justme
    Oct 18, 2019 at 13:18
  • \$\begingroup\$ Ah, I see, that makes sense. Thanks. I guess I'll accept this answer in a while if nothing else comes along, since it addresses multiple problems with the circuit \$\endgroup\$
    – Vegard
    Oct 18, 2019 at 13:29
0
\$\begingroup\$

add Pin 15 R-EXT to 0V sets the CC per segment

5mA may be adequate or 10mA with a dark red flat film cover for better contrast.

 Output current (mA) 3    5   10  20  50  80 130
 Rext (Ω )        6740 3930 1913 963 386 241 124
  ............................^

With 0.35 RdsOn @ 3.3V and 8 segments ON @ 10mA or IR=80mA*0.35Ω = 0.028V , the Anode drop is OK.

\$\endgroup\$
3
  • \$\begingroup\$ Should the resistor be between Rext and ground? So a 970Ohm resistor will cause the LEDs to be supplied with 20mA each? \$\endgroup\$
    – Vegard
    Oct 18, 2019 at 9:16
  • \$\begingroup\$ Yes, that is correct \$\endgroup\$
    – Justme
    Oct 18, 2019 at 10:29
  • \$\begingroup\$ Don't forget to use good ceramic caps on near each IC. You made good choices not available 40 yrs ago when I did it. and dont forget to close question. \$\endgroup\$ Oct 18, 2019 at 23:11

Your Answer

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

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