I was inspired by a youtube video to try working with some shift registers and I did end up learning a lot more than I thought I would. I also learned that I have much more to learn. Sometimes you know where you went wrong and what to fix and that's a good place to be. Other times something doesn't work and you have no idea why and that's a confusing place to be. For me, this is one of those times. Shoot me an email if you can give me a hand with this one.
This is an Arduino, it's a really cool platform to learn electronics with. Very cheap and helps you learn a lot by trying things out and performing internet searches when things don't work the way you'd expect.
This is the LED matrix I'll be trying to draw some nice patterns on, I have some designs in mind I'd like to try drawing
You can see here there are 16 pins I need to drive here, 8 for the rows of the matrix and 8 for the columns. Lighting up column 1 and row 1 at the same time should turn on the first of the 64 LEDS. As you can imagine, trying to connect 16 different wires to the Arduino is pretty wasteful, if only there was a way to drive these 16 pins without using up all the Arduino GPIO pins
There is a way to drive 16 pins without using up all the Arduino GPIO pins. This is an SN74HC595N 8 bit shift register (pen for reference). The way this works is really cool. You send bits into it one after the other and then once you have them all locked and loaded you can output them from the register all at the same time. That means that your code will run slower (for stuff like this that won't matter at all) but you are able to use less GPIO pins to do the same amount of work.
I put some nice youtube background noise on and got to work wiring up the registers and the matrix. When you wire stuff like this up you can just do a search for the part number of whatever you need to wire up and there will usually be a schematic or two that will help you.
Arduino has software called the Arduino IDE, it lets you plug in the arduino via USB to your computer and you can upload your code straight to it. It also lets you download code libraries and it can work for other microcontrollers like the esp3266 as well. This is a picture of my first test code to see if my wiring was correct, it should turn all the LEDS on...
Success! they all turned on. I was ready to start trying out my designs, or so I thought. Every time I tried to light up a single LED, the whole row I was testing would light up. No matter what I tried, I could only light up entire rows at a time. I tried messing with the code, I tried reading about other people experiences, I tried encanting a magic spell. Nothing worked so far.
So, my project didn't exactly work the way I wanted but I'll come back to it. After a quick internet search, I think I may have fried the shift registers by putting too much current through them, but some other people have been able to make it work with the shift registers I'm using now so I'm not 100% sure what to think at the moment. I'll order the other model that people are recommending in forums and see if that works, I'll post to this page with what I find. I won't give up on this at the first sign of a problem, it's good to see it through as far as I can. So I'll keep researching and thinking it over. If you know what might have happened or have any ideas please shoot me an email [email protected] I'll be sure to keep this page updated with anything new I find. Thanks!
You can check out a list of all the blog posts by clicking here
You can get back to the homepage by clicking here