Dimmer sensor
-
Anyone has made a dimmer controlled by a sensor?
I'm planning on building some and I'd like some advice.I thought of using the servo sketch but this would create a blinds device in Vera.
I'd like to use the dimmer device. Is it possible?Does anyone have a circuit dimmer for arduino to adapt?
Thanks in advance
-
Check this out,
http://www.instructables.com/id/safe-and-simple-AC-PWM-Dimmer-for-arduino-Raspberr/all/?lang=pt
-
Checkout http://forum.micasaverde.com/index.php/topic,23342.0.html for a thread on a PWM dimmer for LED strips including the initial sketch.
Here is the next gen mysensors.org board that I am working on and will support up to 4 channels and power sensing - http://forum.micasaverde.com/index.php/topic,23342.msg176334.html#msg176334
Cheers,
Bruce
-
-
Ah, ok. @axillent is working on an AC PWM dimmer as part of the mysensors.org PCB kit. You can ping him via IM if you want the details. The main board will be able to connect to a sensor and an actuator (e.g. dimmer) to achieve your goal of having an autonomous dimmer that is activated by a discrete sensor.
-
@blacey
You're sketch looks really nice and I would like to use it but I started already with the 1.4 libraries. Any chance you will rewrite it for 1.4? I've had a look at it but it's to complicated for me to understand.
-
I did a quick 1.4 conversion just now.
Note that I haven't verified it with any real hardware or anything.
I will include it in the examples folder for 1.4 when someone has verified it.
-
@hek
That is great! Thank you very much, it worked first time. I have a LED-strip with a 50N06 FET connected to 12v and a 10K pull-down on the gate. Flawless!
Well, maybe one tiny little thing: when the dimmer is at 100% and I press the minus it always goes to 80% instead of 90%.
But this is not something in the sketch but in the library.About the part:
// hek comment: Is this really nessesary?
gw.send( dimmerMsg.set(currentLevel) );I left that out and there is no difference at all
Edit: I tried about every markdown possibility there is to create a code-block but it doesn't work. Sorry.
-
@hek * This sketch is extensible to support more than one MOSFET/PWM dimmer per circuit.
How do you add more outputs to this? I would like to add PWM 5 and 6 to this. I am using the EasyIot controller. @blacey
-
That was actually a @blacey comment.
-
@boblasure So you effectively want 3 children, one for each PWM? You will need to extend the sketch to handle two additional pins/children. @korttoma has already done the work...
Here is his sketch that handles four channels.
-
-
This post is deleted!
-
Can this dimmer sketch be used to control the speed of a fan ? If yes then what are the changes I need to do to this sketch. As part of a project I am working on, I intend to control a AC 230V fan using arduino. I was planning to create a sketch which explicitly controls a AC FAN.
By doing this am I reinventing the wheel or someone has done this already which I can use.
-
-
I have the dimmer circuit with me already. I am looking for the sketch to integrate this with the sensor and send message to the gateway using MQTT for controlling the speed of the fan.
Note: I am using a custom controller build using Ruby on Rails(WIP). and ruby-mqtt to send message to the MQTT gateway which is running mysensor code.
-
@mainali I don't think I have what you're looking for ...
-
Would this be of any help? ->
-
I have kind of implemented the fan control with a new message type V_FAN, but anyways I will check this out and revert after testing
-
Can the dimmer led actuator example be used to dim a AC 60w incandescent bulb connected 220v connection. If yes what are the modification needed.
when it comes to controlling the speed of a FAN or dimming a normal tungsten filament bulb. I have found so many answers but not a single one which explains all.
-
All the dimmer examples does is to change the level on an PWM output according to a 0-100% dimmer slider in the controller. What you connect to the PWM output is up to you. In the example sensor device I posted I have connected a transistor that controls the speed of a 12VDC fan.
I have also maid another sensor that shows as a dimmer in the controller but in the arduino it controls 3 relays instead ( there are not so many rules you have to follow here you can create what you need, that's the beauty of MySensors ).
-
@mainali
Dimming AC current is far more complex than dimming DC from the hardware perpective.
Do a search on the internet about it and come back with a solution that fits your needs.
-
This post is deleted!
-
This circuit might help with what you are doing. See attached. Try building this circuit and connect "signal & ground" to dimmer LED actuator PWM. Again I can't stress enough be careful with AC power!!!