Go Down

Topic: Time Fountain (Read 2643 times) previous topic - next topic

twychopen

I am attempting to build a smallish time fountain http://www.youtube.com/watch?v=kh_RXTEyJdU&feature=fvwrel (not that big or advance for round 1) with the hopes of making a large scale fountain in the future.

I am new to all this and have been reading and watching videos online trying to learn about the software and Hardware of Arduino. What I have right now:
  Arduino Uno R3
  Seeedstudio BT Shield (to control the fountain via phone)
  38 UV LED - http://www.superbrightleds.com/moreinfo/component-leds/5mm-uv-led-15-degree-viewing-angle-380-nm-30mw/632/1907/
  6V DC Water Pump - http://www.amazon.com/gp/product/B004HHW0FU/ref=oh_details_o02_s00_i00 (May be too small we will see)
  Frame for the LEDs, and Pump

I need to power all 38 LED but found out that I don't think I can power it directly with my Arduino board :( I have been told about using MOSFET but don't even know what it is used for. Also, the small pump  I was hoping to use with the arduino but think I may need the motor shield. Regardless, if I can't power the LEDs from the UNO R3 then I will need to figure out how to integrate the power to the pump and the LEDs then control it with the UNO R3.

My first question is how do I power the LEDs but control them from the UNO R3?
Second, can I power the Pump directly from the UNO R3 or do I have to get the motor shield?


















PaulS

Quote
My first question is how do I power the LEDs but control them from the UNO R3?

That's what the MOSFET is for. Google IS your friend.

Quote
Second, can I power the Pump directly from the UNO R3 or do I have to get the motor shield?

No and no. The motor draws far too much current. Another MOSFET or relay would be needed, though.

The motor shield is for motors that need to run in both directions (your pump does not) at various speeds (your pump probably does not). MOSFETs can be toggled at high speed (using PWM) so you could run the pump at various speeds using a MOSFET, but not using a relay.

Quote
Seeedstudio BT Shield (to control the fountain via phone)

This is far down the line. Get the pump and lights working first.

twychopen

Ok, Mosfets are for DC current, what is the equivalent for AC current? I have been searching but don't know what to search for because I don't know the name.

Grumpy_Mike

Quote
what is the equivalent for AC current?

A triac.

But why? You can't switch AC current at the rate you need for this project.

twychopen

Well what would my options be then? How would I pulse that many LEDs controlled with Arduino?

strykeroz


Well what would my options be then? How would I pulse that many LEDs controlled with Arduino?
Hi

I think the best thing to do is break this project down into smaller pieces, you'll then arrive at answers to each individual challenge.  This is an extension of what PaulS suggested when he posted you should hold off on the Bluetooth bit until other aspects are sorted.

For example how rapidly do you need to pulse your LEDs, do they get pulsed all at the same rate or individual different rates, or in independently pulsed groups?  If there's just one pulse rate for all, then you'll most likely be able to do this all from just one pin of the Arduino.  Think of the Arduino as the signal that runs the pulse, not the source of the power and it will make more sense perhaps.  Also does the pulsing of the DC pump to create the drips need to be varied/controlled by the Arduino independently, or could it be a known constant pulse and the lighting pulses are varied only?

Your Uno has 20 digital pins that can be used to generate your pulses, two of which are usually reserved for serial communications and are useful for debugging (and could be used by your bluetooth later) leaving 18 for directly controlling your LEDs and/or pump.  It is possible to generate pulses external to the Uno that are varied by the Uno so all is not lost, but you'll need work out the specifics of your requirements before making any of those decisions.

Geoff
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

PaulS

Quote
Ok, Mosfets are for DC current, what is the equivalent for AC current?

Would that be AC for your 6V DC motor? Or AC for your LEDs?

twychopen

Quote
how rapidly do you need to pulse your LEDs
I don't know the exact speed. I want to change the speed of the pulsing of the lights while keeping the pump at a constant speed.

Quote
do they get pulsed all at the same rate or individual different rates, or in independently pulsed groups?
All at the same rate

Quote
Also does the pulsing of the DC pump to create the drips need to be varied/controlled by the Arduino independently, or could it be a known constant pulse and the lighting pulses are varied only?
It can be constant. Actually, I have an AC pump and a DC pump. I thought I would be able to handle everything from the Arduino when I first started so I got the small DC pump. I think the AC pump will be the one I am using though because of the power requirements.

I know I can't power either the lights or the pump from the arduino but I want to control the lights.

strykeroz


I know I can't power either the lights or the pump from the arduino but I want to control the lights.
One pin with a MOSFET will control your bank of LEDs then, and either another to control your DC pump or maybe you could use some kind of solenoid valve setup to have the pump running constant pressure, but regulate the flow?

Either way it appears you're back to needing only 2 pins from the Arduino Uno, the rest is details :)

Cheers ! Geoff
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

twychopen

Grumpy Mike was saying I can't pulse the LED's fast enough using AC.


Just found this as another example where they use the arduino to control both pumps and lights. http://hackaday.com/2011/03/11/water-droplet-sculpture-using-leds-and-arduino/

What I don't know is how I can control AC current through arduino to flash the lights at the speed I need. I have to go back and look at my code for the exact speed I set on the 4 test LEDs that I set up.

Grumpy_Mike

Quote
What I don't know is how I can control AC current through arduino to flash the lights at the speed I need.

You can't.

AC has a cycle time of 50 or 60 Hz, with a triac once the power is on it remains on for the rest of the cycle. If you feed an LED with AC then it is already flashing at 60Hz (I assume you are in the U.S.) Therefore you can't get it flashing faster than this because you can't turn it off until the next half cycle. You can't use an incandescent light because you can't get it to flash fast enough because of the thermal time constant. So why the obsession with flashing lights with AC?

Using a triac (when packaged up is called an SSR) you can turn your AC pump on and off but not control the speed.

twychopen

Quote
So why the obsession with flashing lights with AC?
Because I want to be able to plug it into the wall and have the fountain turn on.

I need to convert the AC to DC then, then control it with the Arduino? (Which still I don't know how I'd do that).

PeterH


Quote
So why the obsession with flashing lights with AC?
Because I want to be able to plug it into the wall and have the fountain turn on.

I need to convert the AC to DC then, then control it with the Arduino? (Which still I don't know how I'd do that).


LEDs are low voltage DC devices. Using mains AC to power them directly does not really make sense. The more sensible approach is to convert your AC to low voltage DC using a suitably rated power supply, and then use a transistor controlled by the Arduino to switch them on and off at whatever frequency and timing you want. The transistor would probably be a MOSFET as already mentioned.
I only provide help via the forum - please do not contact me for private consultancy.

Grumpy_Mike

Quote
then control it with the Arduino? (Which still I don't know how I'd do that).

Look at the blink LED sketch that comes with the Arduino IDE

twychopen


LEDs are low voltage DC devices. Using mains AC to power them directly does not really make sense. The more sensible approach is to convert your AC to low voltage DC using a suitably rated power supply, and then use a transistor controlled by the Arduino to switch them on and off at whatever frequency and timing you want. The transistor would probably be a MOSFET as already mentioned.
[/quote]

Ok, thats what I was looking for! I am not sure why I hadn't just thought of it this way as it is a very simple idea, but for whatever reason I hadn't. Thanks! I will get started researching this method!

Go Up