Time Fountain

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?

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.

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.

Seeedstudio BT Shield (to control the fountain via phone)

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

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.

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.

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

twychopen: 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

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?

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.

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

All at the same rate

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.

twychopen: 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

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.

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.

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).

twychopen:

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.

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

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!

Grumpy_Mike:

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

Sorry, I worded that sentence wrong. I know how to do the Arduino programming. I didn't know how to get the AC to power and control the lights.

The arduino controls the lights not the AC power. To get AC power to power the LEDs you have to convert it into DC power with a wall wart.

thanks everybody

Ok, maybe another simple solution but I would prefer to just plug in 1 plug, not 2 (one for the lights and one for the seperate AC pump unit that just has to be on with no controlling.) How would I do that?

You could design your own power supply but I suspect you are not up to that. You could wire the two units together in a box and have one lead comming out. But basically you need AC and DC and these are two different things.

Grumpy_Mike:
You could design your own power supply but I suspect you are not up to that.
You could wire the two units together in a box and have one lead comming out.
But basically you need AC and DC and these are two different things.

No not up to designing my own power supply haha :slight_smile: I just will wire the two units together in the box as you said and have one cord for the wall. Thanks a lot!