Close

More details on "LM2596 with voltmeter"

A project log for eForth for cheap STM8S gadgets

Turn cheap stuff from AliExpress into interactive development kits!

ThomasThomas 01/01/2017 at 16:310 Comments

I toyed a bit with the "LM2596 with voltmeter" module. In case you're interested in the details of the voltmeter part, here is how the STM8 pins are connected:

Pin  STM8   Connected to (LED pin # in brackets)
--------------------------------------------------
1    PD4    F (10)   
2    PD5    A (11), LED "in"
3    PD6    V1 (12) cathode digit 1
4    NRST   (6), manually wired
5    PA1    E (1)
6    PA2    D (2)
7    VSS    GND
8    Vcap   Cap
9    VDD    +3.15V (LM317)
10   PA3    DP (3)
11   PB5    (nc)
12   PB4    (LM2596 pin5 "/enable", pull-up, manually wired)
13   PC3    LED MPX, key "out"
14   PC4    C (4)
15   PC5    B (7), LED "out"
16   PC6    V3 (8) cathode digit 3
17   PC7    V2 (9) cathode digit 2
18   PD1    G (5), key "in", SWIM
19   PD2    Ain "out"
20   PD3    Ain "in"

Here are details about the LED MPX and the key scan:

LED MPX: rate 20ms

Key scan after LED MPX active (low):

Key scan while the display is off:

Please note that the duty cycle of each 7-S LED digit is about 11%, and just 4% percent for the LEDs "in" and "out". The reason is simple: there are no current limiting resistors, and the supply voltage of 3.15V is much too high for a red LED. Part of why the LEDs don't overheat is that the STM8S output stages limit the current, and that's also visible at GPIOs that are in not connected. In awareness of that I ran the MPX with a duty cycle of 25%.

The LEDs aren't that much brighter than with the previous firmware:

The board clearly has some potential, but I'll wait until I know the details of some other variants before I add any code to the master repository.

Discussions