2
\$\begingroup\$

After complex math and right wiring on my ESP8266, I finally light up my 4x7 segments display, one segment at a time. All the 4 selectors are connected to the 4 GND pins, so all four are lit up.

Do I need a MC or transistors to better select which display is lit up? Or is it possible with only the ESP8266 (I doubt)?

EDIT

Here is the schematic of the 4x7 segments display (source: https://osoyoo.com/wp-content/uploads/2017/08/cathnode.jpg) enter image description here

And the NodeMCU ESP8266 (source: https://i2.wp.com/randomnerdtutorials.com/wp-content/uploads/2019/05/ESP8266-NodeMCU-kit-12-E-pinout-gpio-pin.png?ssl=1) enter image description here

\$\endgroup\$
9
  • \$\begingroup\$ It might work dimly, current-fan out would suggest using transistors or FETs. Have you looked around online? I'm sure you can find an example, for an Arduino if not an ESP... \$\endgroup\$ – Chris Stratton Sep 11 '20 at 14:23
  • \$\begingroup\$ What does your schematic look like? You shouldn’t need to invoke j to wire up an LED display to an MCU. \$\endgroup\$ – Spehro Pefhany Sep 11 '20 at 14:26
  • \$\begingroup\$ Apparently, the maximum sink current of an I/O pin is 20 mA: GPIO Maximum current Imax. How much current does the display take when all seven segments are lit? If it is more than 20 mA then you will need to use transistors for the selectors. \$\endgroup\$ – Andrew Morton Sep 11 '20 at 15:28
  • \$\begingroup\$ @AndrewMorton I'm only displaying 4 segments at a time. The specs of of the display says direct current between 10mA and 20mA, so I might need to add a resistor. I didn't add any (except for the sink) and the leds are pretty bright... \$\endgroup\$ – Kaymaz Sep 11 '20 at 15:45
  • \$\begingroup\$ @SpehroPefhany I have added a schematic \$\endgroup\$ – Kaymaz Sep 11 '20 at 15:45
1
\$\begingroup\$

I ended up buying a shift register because I will not be able to use 12 pins + 1 for a DHT11 (temperature and humidity sensor).

The led display is possible on the NodeMCU, but, if all the pins are connect at boot, there is an issue.

digitalWrite(pin, LOW);

does the trick for the sink.

\$\endgroup\$
0
\$\begingroup\$

You can drive it with 12 GPIO, add 150 ohms series resistance to each segment/dp output and drive each cathode with a 2N7000 MOSFET or a BJT + base resistor.

Ideally refresh the display with an interrupt at 1 kHz or so from 4 bytes of dedicated RAM.

Write whatever segments you want to appear on to the RAM at your leisure.

You can test it with a simple loop before getting the interrupt routine working.

\$\endgroup\$
1
  • \$\begingroup\$ Ok so this means I cannot use the NodeMCU alone? I have BJT like 2N2222 so I will try \$\endgroup\$ – Kaymaz Sep 12 '20 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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