some time ago i had some questions about arduino and leds. Kinda left it for awhile but i spent some time on it today and got it going. Well i have some of the leds lighting up, its just the inner circle for now and i'm running off the Arduino at 35% brightness to keep things safe. The rgb order is not the typical, but i found a rgb calibarate sketch inside fastled which i played with until i had the colours in the order i wanted (rgb) also the wiring order is reversed in an anticlockwise direction
but once inside fastled i guess it doesn't really matter how the order of things progress. I changed the code before i took the picture it now set up to go 2 leds of each colour r,g,b and white
i thought about while writing this message and turned the ring 180 degrees and it now rotates in a clockwise direction, no programing required
Next i hope to get the power adapter sorted out so i can run more leds and brighter
!arduino copy|690x428](upload://tKYBKG816wHSyrJlTHoSBt0lvfO.jpeg)
Awesome thanks, that worked. i'm sure i tried that earlier, might have been brain fade or spelling perhaps. At least now the color order is one less thing to worry about.
I played with it earlier, i now have 24 leds, or the two inner rings working with a cylon effect inside fastled at 25% just to be safe.
Tomorrow or the next day I'll spend some time getting the power supply sorted so i can run all the rings. i have some jumper cables and barrel connections and i'll probably take a photo to share. To see if anyone can spot any possible wiring issues with my meager talents.
Use an external power supply for your Pixel rings (please). Use the Arduino only for control.
With my 5v pixels I use a USB power cable on a breadboard and plug the USB cable into a USB charger port. That lets me see full patterns at any brightness.
Thats the plan. I have a 5v 10 amp metal enclosed beast of a supply to use. Someone on the forum mentioned that fastled had current limiting. So thats what i have been doing, running the code at 25% brightness while i experiment with the code. I wouldn't try to run all 5 rings from the arduino, that would be tempting fate im sure.
A WS2812 at full white (255, 255, 255) needs 60mA, so one needs more than a pin should source (40mA), and two need more than the rated sourcing of the Arduino (100mA). Running at 25% helps.
I have more progress to report . I wired up my 5v 10 amp power supply. its pretty rough from the 5v side at the moment all the connections are taped up with electrical tape . Everything's covered in tape, so i cant see anything shorting. I do have some barrel connections on the way and i found my soldering iron and some solder today, so i'll make it a bit mor professional looking when they turn up.
There's a total of 128 leds in the ring array. Pretty sure the arduino would have a heart attack if i tried to power it and the rings at once, so i compiled the code uploaded it and as soon as the first few leds come on, i pulled the plug. I then plugged everything into the 5v 10 amp power supply and switched it on and it worked. 128 leds slowly lit up and cycled around pretty happy
Which brings me to my next question. i powered the arduino from the power supply the same as the diagram below
now i'm curious if i can connect the arduino to the computer via the usual usb cable while the power supply is active. As i can't see how i can code the ardunio and test things otherwise ?
I presume their both being 5v supplies there should be no issue and from what i read it should be ok. Just being a bit cautious i'd hate to set the house on fire lol. Aside from that have a good weekend
While powering the rings with the PSU and the Uno with USB, disconnect the 5V wire from the PSU to the Uno, but leave the ground wire connected.
You should also have a resistor between the Arduino digital pin and the Din connection of the rings (~0.5K) and a large cap, like 1000uF across the 5V & ground, close to the rings.
It may be important to know that even when all LEDs in the rings are off, they draw something near 1mA each, so your 128 LEDs will draw up to 120mA even with all LEDs off.
thanks for the info about disconnecting the psu 5v wire, i'll do that. I had kinda forgotten about the resistor bit and i have seen a few of dave's garage youtubes and he doen't worry about a resistor. however as a best possible practice i'll put one in it.
regarding the the large cap does voltage matter, an ebay search lists them from 16-63 volts or more. i'm leaning towards a 16v 1000 uf at the moment
All you need is 47uF/6.3volt.
But bigger capacity and higher voltage doesn't harm. 470uF/16volt is commonly used.
The cap is mainly there to kill destructive spikes from supply wire length.
Bulk capacitance (thousands of uF) is inside the supply anyway.
Same for that (330-470 ohm) resistor. Termination (destructive spikes), as well as protection when the Arduino is powered up before the LED supply.
@PaulRB you must have seen 2.7volt supercaps
Leo..
I'm sure they exist, but to my knowledge I've never actually seen one
@onebyteshort the disadvantage of choosing a higher voltage capacitor, of the same capacity, is that they are physically a little larger and possibly cost a little more. Often these disadvantages don't really matter at all.
honestly i dont know that much about electronics. A 1000uf cap was first suggested, i did an ebay search the closest cap i could find was a 10 Volt at 1000uf at $5 for two, i decided i could live with that
While i wait for the caps and jacks to arrive, i can build a stand to mount it on. I'm pleased that two rings are working and the coding was easy enough to implement so far. I have to thank all you guys that have gone before and worked a lot of the kinks out. No doubt in a week or two i'll have some more questions when things don't go as planned.
Ok i have my capacitator installed across the screw jacks and underneath the green heat shrink is the resistor. The screw jacks turned up some time ago the hardest part was the resistor, i knew i had a pack somewhere it was just a matter of finding them by going through a bunch of storage boxes. The red wire tends to float, till i need to plug it in. I should put something over it to prevent an accident.
I have had the brightness levels set from 5% to 100% and it seems to work great. i did come unstuck with my programming. not sure if the ide was autosaving or not, but some how i messed up my code and nothing i seemed to do could undo it. So i had to restart from scratch. no big deal. I have also run a bunch of the examples on it and it works as expected. So all good i think.
Thanks for the help guys, I'm going to mess around with coding for a bit as i'm going to try implementing a count down effect however i might be back in a few days
Slight diversion from leds.. the led project I'm working on is part of a stop motion light animation. How ever the light level is a bit low between shots, so i bought a 5v relay that will control a mains voltage light. Its actually a 20w led workshop light. I watched a heap of youtubes on relays and arduinos got it sorted in my head and put it all together today. At the moment i upload one program to turn the light off by using the code
int relayPin =7;
void setup() {
// put your setup code here, to run once:
pinMode(relayPin, OUTPUT) ;
}
void loop() {
// put your main code here, to run repeatedly:
delay (5000);
digitalWrite(relayPin, LOW);
}
and then i upload it with the opposite digitalWrite(relayPin, HIGH);
to turn the light on. not the best way perhaps but i was lacking a switch to do it from arduino.
I checked my wiring three time before i plugged it in. tested the mains voltage first no smoke and no light, which was expected. then tried from the arduino side with no smoke. then i uploaded the code and success first go. I need the extra light between shots as my eyes aren't what they used to be, and it helps alot with small model movements.
i bought a cheap plastic housing to keep the mains wires and relay away from fingers. Still have to do something about an enclosure for the arduino.
wondering if anyone out there has any experience with dragonframe and arduino ?
dragonframe provide a sketch for moving stepper motors in a move shoot move program that integrates within dragon frame. I'd actually like to run my light inside the dragonframe sketch and have turn off before a photo is taken and then back on after the photo. I know it can be done through dmx and dragonframe sell hardware that will control dmx, steppers and lights. however that $200 plus $200 postage to where i live. So i'd like to find a cheaper option if i can...
hi all, added a ldr sensor to the mix. I have a couple of dmx lights i use for stop motion animation inside of dragonframe 5. Came upon a problem of when i have the dmx lighting down low, its kinda hard to see what your doing. Dragonframe thoughtfully provide a hardware solution for this, however where i live that amounts to aus $400 + $200 postage. Been racking my brain to figure out a work around. I think i have a temporary fix until i can come up with with some money to afford the real thing. My solution is to use a spare cheap dmx light, drill a hole through the housing, poke a ldr through the hole. With the arduino and a relay everything can be automated. I press enter to take a photo, dragonframe turns off the extra light, arduino senses the light is off and turns off my led work light and dragonframe takes a photo. dragonframe then turns the light back on and arduino in turn switches on the work light again. AWESOME...
I could also buy another dmx light to run as a bash light but that comes in at $400 as well...
For now i can live with the cost of $30 for the led worlight a couple of $ for a ldr module the rest i already had.
Theres a couple of pics of my setup first is the dmx light with the sensor inside it the led worklight is beside it. then an overall pic. Last pic is the code and dragonframe open as it took a little fine tuning to get it working how i wanted