Go Down

Topic: 5 PWM's on, but nothing (Read 441 times) previous topic - next topic

suicidalacorn

i am using PWM on pins 3, 5, 6, 9, and 10 to control transistors that turn on the ground to my layers on my 5x5x5 LED cube. when i use analogWrite(pin, 255) for all of the 5 PWM pins that i am using, it gives me nothing. its like it cannot use 5 PWM pins at the same time. i have no problem when i have 4 of the pins set to 255 at the same time, but 5 gives me issues. like the LEDs simply do not turn on at all. i think i see a little ghosting when this happens,too, but it is not bright like it is supposed to be. what is wrong? is it something wrong with my setup? any help is appreciated! thanks!

suicidalacorn

i now have no clue what is going on. i am at a complete loss. i plugged the arduino into a 1.5amp usb port. then everything turn on and the code worked perfectly, but there was an insane amount of ghosting. what is up? i am powering the LEDs from a 5v wall wart and i am using resistors to limit it to 3v. why is the arduino's power affecting the transistors(which is turning the LEDs on and off)?

suicidalacorn

ok, so the ghosting only occurs when LEDs are not on and is proportional to how many and how bright those LEDs are. when i have 2 layers on at full brightness there is no ghosting on the layers that are off. when i have 1 layer of LEDs on at a low brightness, there is a ton of ghosting. how bad the ghosting is is absolutely proportional to how many LEDs are on and how bright they are. both brightness and amount of LEDs on are factors in how much ghosting there is. and now when i plug this into a regular(500ma) usb port, it barely lights up. i am starting to think this has nothing to do with code. i think it is a hardware issue.

suicidalacorn

sorry to like completely spam this, but i keep finding new information. now i have noticed that while the ghosting is REALLY bad, it is easy to get disappear. only one layer of LEDs at full brightness and it is gone. but one layer a half brightness and it is still really bad. again, i am sorry to keep posting, i am just trying to post the most recent and up to date info i have. i would really appreciate some help, but i may need to move this to another section now that i think this has nothing to do with the code. should i move it?

Nick Gammon

No, don't do that. You are in danger of being banned for spamming, I wouldn't add cross-posting to the list.

Read this before posting a programming question

I suggest posting your code, a schematic, and possibly a photo.

Go Up