![]() ![]() Look closely at the way the components are plugged into the breadboard, and compare to the schematic above. Supplying the base with a high voltage allows current to flow through the transistor, which in turn allows current to flow through the LED to the transistor collector, through the transistor emitter, to ground. Notice that even though the LED is connected to a high voltage, the circuit is not complete unless the transistor base is also connected to a high voltage. The circuit that you just made work is drawn like so: To make the second red LED (connected to a resistor and a transistor) light up, connect the base of the transistor to a high voltage through the resistor, as shown below. You have to supply a small amount of current to the base to get current to flow. One of the legs (the middle one) is called the base, and is used to control the amount of current flowing through the other two legs. It is called the transistor, and it has three legs. But we need to learn about one more component before weīegin. Last is there a simple way to set each individual LED to a corresponding number, symbol, letter, etc that would allow me to write an array of the sequence that I want the lights to turn on/of, blink, count, sweep, etc? I have read briefly about using this with PROGMEM, but I don't know if I understand quite fully its limitations and application, and I also belief I may need an Arduino Mega to account for the required RAM memory that would be needed.Īnd then there is ShiftPWM, though I can't seem to understand the code well enough to know how to alter it to use only 1 transistor (1 color LED in a sense), and to eliminate fading to only on/off.In the next page, we will start using programming to control LEDs. Meaning that maximum if sending binary code out, would be 4 shift registers. ![]() ![]() I have read that there is a 32 character limit in the binary code that can be delivered out to the registers. ![]() My next question is a limitation that I believe is inherent in delivery binary to the shift registers. My hope is that I can run multiple different lighting arrays similar to the way the actual game lights up, all at once, or well enough for the human eye not to notice it is not all at once. Say I want to have a small number of lights, say lights #33 to #37, count upward, turning on and staying on, then repeating all while having lights #38 to #40 blink on/off, or count up in the same way. I have attached an image of the playfield with all the lights labeled. My biggest challenge right now is determining what route to take with the code, as I have run into some issues in my breadboard builds with getting multitasking, or faked multitasking running to get different lighting arrays to run seemingly at the same time. I am new to code, very new, but I understand the basics of shift registers and where abouts I need to take the code. The plan as of now is to run 10 shift registers that trigger transistors switching the powersource current and voltage to the bulbs. They draw about 0.25A per bulb, so I am sourcing a 20 amp, 5.5v DC powersource for 'worst-case-scenarios' when all the lights could momentarily be on together. The bulbs originally meant to run on AC current, run fine on DC, and I'm OK with losing a little bit of life from them by running them that way. I have a stripped down pinball playfield with with 73 incandescent 6.3v light bulbs installed on it from the original game. Hey I'm looking for a little directional help as far as my code goes. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |