Introduction: NODEMCU LUA ESP8266 With 74HC595 LED and Matrix Driver

Picture of NODEMCU LUA ESP8266 With 74HC595 LED and Matrix Driver

This is my attempt at driving the 595 shift register with an ESP8266.

I am using NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4 on ESPlora v0.2.0-rc2, which is standard stuff. Included are 2 examples of LUA code. Both programs are the same except there is an extra line needed in the dual program. The GPIO pins on the ESP8266 are set for SPI mode.

Step 1: ESP8266 Driving Single 595 With 8 LEDS

Picture of ESP8266 Driving Single 595 With 8 LEDS

This is how to drive a 595 from an ESP8266. I am using an ESP12 to do this, but any with more than 3 I/Os will do the job. This set up works at 3.3 volts. I am using SN74HC595N ICs, don't know if it will work with other 595s.

Included is a circuit diagram of how to connect everything together. I am assuming you know how to connect up your ESP8266 and load code into it.

This is an image of my 595 set up (also works with the Arduino).

Some simple LUA code shows the basics.

Step 2: ESP8266 Driving Dual 595s With 8 X 8 Matrix

Picture of ESP8266 Driving Dual 595s With 8 X 8 Matrix

This is my dual 595 set up with an 8x8 Matrix.

The program is exactly the same as the single except that you need to load in 16 bits of data instead of 8.

This line goes to the 2nd 595.

spi.send(1,0)

Change the zero to any value between 0 and 255 to see result.

Changing the zero to any value between 0 and 255 gives different lines on the matrix. You can also alter the data in the programs to display different sequences.

This line goes to the 1st 595

spi.send(1,byte)

I have included a circuit diagram for this but there are plenty of examples for the Arduino out there. My board works with the Arduino as well as the ESP8266.

Comments

BeachsideHank (author)2016-07-14

"I have not included a circuit diagram for this as there are plenty of examples for the Arduino out there".

No doubt you are right, but the neophyte Arduino user may not be up to pairing the circuit you created with the proper Arduino sketch or circuit information, so a few links that you believe to be appropriate may be helpful to include in your posting. ☺

JohnL142 (author)BeachsideHank2016-07-14

I was new to all this once, when there was hardly anything out there and a lot of the stuff did not work either. I cannot do every instructable for all levels of readers as they would be so boring going over the simple stuff time and again. I will try and find a diagram or a link for you and others who are just learning.

BeachsideHank (author)JohnL1422016-07-14

Not to be argumentative with you, or to impose an additional burden, but a simple link will suffice, it will no doubt spawn other avenues of information. Yours was a rather offbeat and unusual post which is why I read it. ☺

JohnL142 (author)BeachsideHank2016-07-15

Circuit diagram now included!

BeachsideHank (author)JohnL1422016-07-15

On behalf of Noobs everywhere, I sincerly thank you! ☺

Droxz (author)2016-07-14

nice one, have to try this.
thanks and keep up the good work!

About This Instructable

2,542views

19favorites

Bio: I like tinkering with electronics, PCs, ESP8266s and Arduinos. Would like to share what I have done as it may help others getting started or ... More »
More by JohnL142:NODEMCU LUA ESP8266 with MCP23008 8 Bit Port Expander ICNODEMCU LUA ESP8266 With MCP23017 16 Bit Port Expander ICNODEMCU LUA ESP8266 Get Weather for Your City (Updated)
Add instructable to: