I am working on a project for school where I will be making a stroboscopic water installation.
Similar to this project here: https://youtu.be/LqMFiVkvxQw
My current plan (which is admittedly probably not ideal) is to use a 5v 15a power cord to power both the LEDs and the pumps in parallel.
I would chain the pumps together in series with a relay to control the flow of water.
I have experience wiring the LED strips but havent worked with the pumps, or motors in a while and have a feeling I am overssimplifiying, is there anything I am overlooking, or just doing downright wrong?
Until you post all the code in code tags, and any error logs or relevant serial output also in code tags plus a wiring diagram, photo of a hand drawn is fine. We can't tell.
Is this some sort of automated response? He hasn't even chosen and Arduino yet. How is he going to have any code?
@Lynk101 , You will need to provide a proposed schematic.
That doesn't sound like a great idea. Given the low current draw of these pumps, you could possibly use a single relay but wiring them in series is not something I would do.
Also, if you have experience wiring and programming LED strips (especially RGB strips) then getting a pump to turn ON and OFF will be relatively simple... much simpler than a stepper or servo.
You agreed to a user agreement ten years ago, so you know this is standard practice; To provide code and drawing, but most users fail to remember their agreement, even users with a decade of tenure. Therefore, a friendly reminder, is in order. Without information, no help can be given. You know that. Why the row?
Wait... What is the difference between asking for non-existing software and asking for non-existing hardware? Two legs bad, four legs good, except some two legs can do four leg things.
WS2812 strips may not switch fast enough to use as a stroboscope.
Assuming 30 LEDs per metre, your 4ft strip will contain around 36 LEDs.
The data rate for these strips is 800KHz, 24 bits per led, so in theory you can update a strip of 36 LEDs at a rate of 800,000/24/36 = 925Hz. It takes 2 updates to make one flash (on then off) so the flash rate will be 463Hz.
In practice, there are overheads to updating the strip which will reduce that theoretical update rate, maybe significantly.
I recommend you do some testing to measure the actual flash rate you can achieve and test if that will be fast enough for your installation.
You will need to use full brightness on the strip at all times, otherwise you will get interference strobing from the strip's PWM frequency, which is around 400Hz and cannot be adjusted. So you can mix the standard 7 colours (red, green, blue, yellow, cyan, magenta, white) but not colours in-between. You cannot have a rainbow fade effect, for example.
Stroboscope pulses must be very short for stop action on a fast moving target ( < 1ms ?), for human eyes to see such a short flash, it must be very bright, an ordinary LED probably won't work. A 2 or 3 watt white COB might.
For example, the light from a xenon strobe would blind you if it were not only a few microseconds long.
@xfpd , I'm aware of forum rules and etiquette. I felt my response to the OP was more productive and more to the point. My response to sonofcy was not. I'm sorry.
@sonofcy , You appear to be an experienced and respected member here. My quip was uncalled for. Please except my apologies.
No need, I was a little premature. The message I was trying to send is he needs to do more research to the point that he has a rough schematic and rough code at least. He has an example and links to pumps so I didn't think it was that much of a stretch to have code and schematics very soon.
Here's a simple LED pulser to try, notice when pulse is less than about 2 milliseconds (2000 microseconds), it appears dimmer, even though it's not. It's your slow brain response.
// LED pulser
/* Written for UNO / Nano (AtMega 328P MCU).
* Connect an LED with 150 to 220Ω series resistor from pin 8
* to GND.
* Type in serial monitor entry line:
* Lower case "i" for pulse interval,
* lower case "p" for pulse length.
* Example to set interval to 1 second: i1000000 (1 million micros).
* to set pulse length to 10 ms: p10000 (ten thousand micros),
* or both: i1000000,p10000,
* and click the SEND button or press [ENTER].
*/
unsigned long timerStart,
interval = 500000, // interval between blinks, uS
pulseLen = 10000; // length of pulse, 10 mS
byte led = 8; // pin 8 (PORTB.0)
void setup()
{
Serial.begin(115200); // set serial monitor to match
// set serial monitor line ending to "Newline"
pinMode(led, OUTPUT); //make led pin OUTPUT
Serial.print("interval = ");
Serial.println(interval);
Serial.print("pulse length = ");
Serial.println(pulseLen);
}
void loop()
{
if (Serial.available() > 0)
{
if (Serial.peek() == 'i') // lower case 'i" for interval
{
interval = Serial.parseInt();
Serial.print("interval = ");
Serial.println(interval);
}
else if (Serial.peek() == 'p') // lower case 'p' for pulse length
{
pulseLen = Serial.parseInt();
Serial.print("pulse length = ");
Serial.println(pulseLen);
}
else if (Serial.read() == '\n')
while (Serial.available() > 0)
{
Serial.read(); // clear serial buffer
}
}
if (micros() - timerStart >= interval)
timerStart += interval; // restart timer
bitWrite(PORTB, led - 8, micros() - timerStart < pulseLen);
}
We used to use xenon bulbs for our industrial vision inspection systems. Back when white LEDs were first introduced, one of our engineers designed an LED strobe. In reviewing the specs, he learned you could actually pulse the LEDs at a much higher current given a shorter duration, and still maintain it's life expectancy.
If this is something the OP is interested in, I'll dig up the info. Although the LED strips have more to consider.