I want to make a strobed water fountain as a project.
First an apology to mkstevo for posting on his project,
I thought he would be interested. Anyway..
It needs a pump and water .. sorted.
It needs a variable strobe. This works.
This gives a variable frequency strobe over a few Hz. around the frequency the water drops
BUT it's a stand alone program.
searching for info about strobe fountainis incomplete.
I should use a solenoid valve running under pwm it seems to control water droplets size.
Well.., a 12V solenoid valve is mechanical and the strobe is around 50Hz. so it's pwm is 50Hz.
This works for 50Hz. pwm for the solenoid.
A pot connected to portc.1 changes the portd.6 on time..
ie. the valve on/off time and so the droplet size....in theory :)
Trouble is I can't join the two programs to make one. 2 evenings and no luck.
It's the variable strobe that is giving me gip. It's very interesting but a bit frustrating.
I think another approach is needed. Any suggestions welcome.
I think looking at the interrupt demos again might help.
I don't really understand wait or pulseout.
I know interrupts still run while wait is running. Not sure about pulseout.
White leds for the strobe.
only on for 1mS every 20mS so 0.05 % the power...
so run at 6V.
I digress. I have a lamp that came from a shop where everything is £1.
72 leds in parallel running straight off 4 x 1.5V AA cells.
I noticed the battery voltage dropped to 3.6V.
At 50Hz they could run at 6V maybe? ... all part of the project.
I sent off for 100 white leds.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After too many hours trying, I am back at my original code for a strobe from 45 to 53 Hz
I will use 2 arduino nanos..one for the strobe frequency and another for the valve 50Hz on time.
I spent too long getting it to work on 1 uno.
I found using 2 timers seems to work. Pity interrupt values are not variable or maybe they are.
I finally joined the variable 46Hz to 54Hz 1ms pulse strobe and the pwm for the solenoid valve
which is on for 1ms to 19ms every 20ms.
I used an every 1ms timer0 interrupt for the valve...
which runs during the main do wait pulseout loop.
I want to make a strobed water fountain as a project.
First an apology to mkstevo for posting on his project,
I thought he would be interested. Anyway..
It needs a pump and water .. sorted.
It needs a variable strobe. This works.
This gives a variable frequency strobe over a few Hz. around the frequency the water drops
BUT it's a stand alone program.
searching for info about strobe fountainis incomplete.
I should use a solenoid valve running under pwm it seems to control water droplets size.
Well.., a 12V solenoid valve is mechanical and the strobe is around 50Hz. so it's pwm is 50Hz.
This works for 50Hz. pwm for the solenoid.
A pot connected to portc.1 changes the portd.6 on time..
ie. the valve on/off time and so the droplet size....in theory :)
Trouble is I can't join the two programs to make one. 2 evenings and no luck.
It's the variable strobe that is giving me gip. It's very interesting but a bit frustrating.
I think another approach is needed. Any suggestions welcome.
Last edit: stan cartwright 2020-07-15
I think looking at the interrupt demos again might help.
I don't really understand wait or pulseout.
I know interrupts still run while wait is running. Not sure about pulseout.
White leds for the strobe.
only on for 1mS every 20mS so 0.05 % the power...
so run at 6V.
I digress. I have a lamp that came from a shop where everything is £1.
72 leds in parallel running straight off 4 x 1.5V AA cells.
I noticed the battery voltage dropped to 3.6V.
At 50Hz they could run at 6V maybe? ... all part of the project.
I sent off for 100 white leds.
After too many hours trying, I am back at my original code for a strobe from 45 to 53 Hz
I will use 2 arduino nanos..one for the strobe frequency and another for the valve 50Hz on time.
I spent too long getting it to work on 1 uno.
I found using 2 timers seems to work. Pity interrupt values are not variable or maybe they are.
I finally joined the variable 46Hz to 54Hz 1ms pulse strobe and the pwm for the solenoid valve
which is on for 1ms to 19ms every 20ms.
I used an every 1ms timer0 interrupt for the valve...
which runs during the main do wait pulseout loop.