Newbie- Sunrise / sunset for aquarium

Hi all,
I am new to Arduino and I think it is a fascinating world. I was very keen but I lack knowledge / experience electronic engineering.

Background: I have a lovely aquarium and I built LED lights for it myself over the xmas break before I even knew Arduino existed. While it is fantastic :grin: Harry, my Blue Gourami has a nervous breakdown everytime I turn the lights on in the morning. So I would like the lights to come on slowly.

LED Kit:

This works as standalone now.

Arduino Kit

First try - FAIL :slightly_frowning_face:

I tried a simple test. I used the standard test code Blink and Dimmer that came with the standard Arduino IDE with the Mosfet. I tried on an LED first and that worked great. But when I tried it with the actual Aquarium light, it Failed. I mean failed as in, even when it is "OFF" it would be on. It's always looks like a fluorescent light that is at the end of it's life. My first thought is that the Mosfet I have is not correct. But I don't know what the right one should be. So this is my first challenge - just to turn the Aquarium lights on and off for now. I cant even think about the clock and dimming because I am too much of a novice.

Any help would be greatly appreciated.

Hi.

Your power supply cannot be dimmed in this way. It is a constant current supply, which is the correct type to use with your leds, but you need to find a model that has an input which allows it to be dimmed.

Even if it were possible to dim your power supply, the MOSFET you are trying to use is too small and cannot handle the current required. Higher power MOSFETS are available such as stp16nf06l. If you wish to use MOSFETs with Arduino, make sure to get a part that has a "logic-level gate".

When you find a dimmable constand current supply, you may not need a MOSTFET of any kind, becuase the dimmable supply may have an input you can connect directly to the Arduino output. Post a link to the power supply you want to buy and we will check that it is suitable for your LEDs and Arduino.

Maybe this one but it isnot clear to me how the dimming is achieved with it.

Paul

Hi Paul,
Thank you very much for the quick and detailed response.

It looks like the one you suggested is regulated on the (AC) power input side. So you dimm the via a normal AC dimmer. I also found this - https://www.amazon.co.uk/d/Light-Bulbs/Dimmable-Triac-Driver-Supply-Transformer-Safety-Compliant/B018PFO3KO

But I couldn't find one that can be dimmed on the DC side :frowning:

I read an article that said that the LED Dimming is actually turning on and off LEDs very quickly (too quick for your eyes to pick up) and there is no such thing as LED dimming - it's either on or off. Cant we get Arduino to do that on the DC side (apologies if that is a very dumb question)? or are you saying that the LED light I have cant go one and off so quickly?

You can dim a led by controlling the level of a constant current through it, or by pulse width modulation as you describe. A circuit can do both at the same time, but only if it is designed to do that. If it wasn't designed with that in mind, you get the effects you have seen.