Now I know a lot more, so my project has been a success. I knew Ohm's Law from high school and I occasionally did some FORTRAN programming a lifetime ago at work. At the time I started, I'd never heard of Arduino or shift registers, never used a breadboard, transistor or capacitor, never made a circuit board, and never done anything in C. I undertook this project as a learning exercise with a pretty cool endpoint. Except there would be no GND connection to my PC anymore - not sure what the effect of that would be. This would provide power to the Arduino from the same power source as my circuit board while allowing sketch updates to still come from my PC. I could take the two data wires in the USB cable from my PC together with +5V and GND wires from my circuit board and combine them into a new USB cable which I could then connect to the Arduino. The third is to play arround with USB cables. The second is to leave the LEDs ON all the time, as you suggest. The first is to do lots of plugging and unplugging of wires whenver I want to update my sketch - this isn't really practical because there are many updates during development. But right now, as I'm writing the animations for the cube, I need the Arduino connected to my PC so I can upload the new sketches and I need the LEDs to be ON so I can see if my coding works.Īfter seeing your response, I initially thought I could connect my 5V output to the 5V pin on the Arduino and Bob's your uncle, but then I read that that should NOT be done if the USB jack is being used at the same time - which in my case it would be. I put a 5V output on my circuit board so, in the future, I can supply the Arduino via its USB input jack from the circuit board (I would ignore the two USB data lines). Either you severely restrict the multiplexing speed, or use logic-level FETs instead. Wiring errors aside, "ghosting" is caused by using saturated BJTs to drive the layers. The Mega 2560 and the shift registers should always be powered from the same 5 V power supply. This is called "phantom powering" and is overloading the protection diodes in the shift registers. So then, never switch off the LED drivers while the Arduino is powered. Regards and thanks in advance for any thoughts / suggestions. In any event, is there any way this could be fixed (hopefully without making a new circuit board). Perhaps this is also a consequence of Issue #1, or not. The ghosting LEDs seem to be limited to a few layers as far as I can tell. LEDs that are supposed to be OFF are in fact ON but at substantially reduced brightness compared to the ON LEDs. By noisy, I mean ghosting (I think that's what it's called). When running animations on the cube, the animations appear noisy. Is this normal behaviour for a shift register? If not, is there anything I could do to stop it? I infer this is a manifestation of the behaviour above. I've also noticed that many LEDS in the cube also light up in seemingly random patterns (but at much reduced brightness) when VCC is OFF. The only way this can happen is if current supplied by the MEGA2560 SPI pins to the data, clock and latch pins on the shift registers appears on the VCC bus. I expected the LED to turn OFF when VCC was disconnected, as it is connected between VCC and GND. When I switch VCC OFF but leave the MEGA2560 connected, the circuit board LED stays ON but at a slightly reduced brightness. Only one pair of transistors should be active at a time. The 120 ohm value is my attempt to ensure the transistor is well into saturation when an entire LED cube layer is ON (560 ma), while also respecting the 35 ma max pin current limit on the shift register. I also put 120 ohm resistors on the base of the 2N2222A transistors, which are connected in pairs. With this value, the 70 ma max current limit for the 74HC595 is respected when all 8 attached LEDs are ON. The LEDs are protected by 220 ohm resistors. The MEGA2560 is connected via USB to my computer and receives power from there. There is a 0.1 microFarad capacitor between VCC and GND on each shift register. The circuit board has a switch so I can turn VCC on and off, with an LED on the circuit board lighting up when VCC is ON. The circuit (see attachment - I tried to embed it but I failed) uses 74HC595 shift registers and 2N2222A transistors, with the LEDs powered by a separate 5v power supply (VCC) from a wall wart. I'm running it with control signals coming from the SPI interface (pins 51, 52 and 53) on a MEGA2560 R3. I have built an 8x8x8 blue LED cube as a learning project for myself and it works. I'm pretty new to all this and I'm not sure if what I'm seeing is normal, and I'd like your comments and hopefully suggestions to fix it.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |