***SONOFF - WiFi Wireless Smart Switch***

Would you use a Sonoff..?


  • Total voters
    85

noodle-led

Well-Known Member
I wouldn't think you'd want to generate a 10VDC PWM to control them because 10V with what reference? If you have two different power supplies, they generate a voltage compared to their own ground wire so if the ground wires are at different potentials you'd get different voltages. What you want is 10V potential over the DIM- voltage, not 10V from a second power supply. Note that the datasheet says "additive 10V PWM signal".

Lucky for us, DIM+ is already 10VDC over DIM- and will source 0.1mA of current. That means all you need to do is use an optoisolator / optocoupler which is designed for exactly this purpose-- transmitting a signal between two devices on different power supplies. The two pins on the output side of the optocoupler goes to DIM+/DIM- and the input you just hook to a resistor and a PWM source, and the other leg to ground. An Arduino can source enough current to light the LED (in the optocoupler) to make it work, or you can hook that side to power (5V or 3.3V for an ESP8266) then sink the LED current into the PWM pin (which would invert the output).

I'm not saying that it couldn't work with some sort of MOSFET arrangement, but it shouldn't because DIM- and your GND aren't connected or at the same potential so it wouldn't switch and you could cause a whole heap of problems if you tried to directly connect them. I know others just stick an NPN transistor across it and power the base from a PWM pin, but that's really hokey because you're now pushing current into the driver's DIM- which is a bad idea*. EDIT: I would consider it a bad idea, but there are plenty of ways to make the 3-in-1 dimming work.
 
Last edited:

justsmokedope

Well-Known Member
I wouldn't think you'd want to generate a 10VDC PWM to control them because 10V with what reference? If you have two different power supplies, they generate a voltage compared to their own ground wire so if the ground wires are at different potentials you'd get different voltages. What you want is 10V potential over the DIM- voltage, not 10V from a second power supply. Note that the datasheet says "additive 10V PWM signal".

Lucky for us, DIM+ is already 10VDC over DIM- and will source 0.1mA of current. That means all you need to do is use an optoisolator / optocoupler which is designed for exactly this purpose-- transmitting a signal between two devices on different power supplies. The two pins on the output side of the optocoupler goes to DIM+/DIM- and the input you just hook to a resistor and a PWM source, and the other leg to ground. An Arduino can source enough current to light the LED (in the optocoupler) to make it work, or you can hook that side to power (5V or 3.3V for an ESP8266) then sink the LED current into the PWM pin (which would invert the output).

I'm not saying that it couldn't work with some sort of MOSFET arrangement, but it shouldn't because DIM- and your GND aren't connected or at the same potential so it wouldn't switch and you could cause a whole heap of problems if you tried to directly connect them. I know others just stick an NPN transistor across it and power the base from a PWM pin, but that's really hokey because you're now pushing current into the driver's DIM- which is a bad idea*. EDIT: I would consider it a bad idea, but there are plenty of ways to make the 3-in-1 dimming work.
just stumbled accross this old post were growmau was doing something simular https://www.rollitup.org/t/i-need-help-5v-to-10v-pwm.894383/
 

whytewidow

Well-Known Member
Got my sonoff installed and setup. I have a digital baylite voltage display and current/amps display and wattage. I'm a little confused as to wiring it up. It's a Dc voltage so I know I want it on the secondary side of the power supply. But my problem is I have two power supplies. One for channel one. The white samsungs. And channel two for the reds. I'm a little lost on wiring it up. If someone could give me a bit of help that's be awesome. I have a shunt to wire in also...
 

noodle-led

Well-Known Member
just stumbled accross this old post were growmau was doing something simular https://www.rollitup.org/t/i-need-help-5v-to-10v-pwm.894383/
Ah yes there are a bunch of different ways it might work. I just measured the difference in potentials between a microcontroller running from a wall power supply and the DIM- wire and I got that DIM- was 0.460V above the ground on the microcontroller. That means if I were to connect the grounds together, current will flow out of DIM- which I can't imagine is a good thing. If the power supply on the microcontroller is isolated there's a chance it might float the whole thing up so that the new "ground" is 0.460V and it might just work.

What does work is just putting an optocoupler on DIM+/DIM- and not connecting any other wires from one to the other. The optocoupler is then just driven as normal from the PWM from the microcontroller. It seems odd to go through any more trouble than that. A DC solid state relay would work as well I'm sure, but that's really just an optocoupler with an additional driver too.
 

noodle-led

Well-Known Member
Got my sonoff installed and setup. I have a digital baylite voltage display and current/amps display and wattage. I'm a little confused as to wiring it up. It's a Dc voltage so I know I want it on the secondary side of the power supply. But my problem is I have two power supplies. One for channel one. The white samsungs. And channel two for the reds. I'm a little lost on wiring it up. If someone could give me a bit of help that's be awesome. I have a shunt to wire in also...
If you have two constant current power supplies and a DC power meter, you can only have it connected to one driver. There's no way to measure two different currents with just one shunt.
 

Randomblame

Well-Known Member
Got my sonoff installed and setup. I have a digital baylite voltage display and current/amps display and wattage. I'm a little confused as to wiring it up. It's a Dc voltage so I know I want it on the secondary side of the power supply. But my problem is I have two power supplies. One for channel one. The white samsungs. And channel two for the reds. I'm a little lost on wiring it up. If someone could give me a bit of help that's be awesome. I have a shunt to wire in also...

You either need two of these DC A/V meters or you take the AC version which is also available and measure the total consumption at the wall. They are also much easier to handle...
Screenshot_20180309-080445.png Screenshot_20180309-080457.png Screenshot_20180309-080520.png
 
Last edited:

whytewidow

Well-Known Member
Yeah I'm gonna hook it up to jus the big driver running the Samsung strips. I ordered 15 more sonoffs. I got a few singles, couple th10, 4 th16, 4 four channels, two sensors for temp/humidity and 2 of the th16-pow for power.
 

InTheValley

Well-Known Member
sweet,

Like the light scheadule.

Mine is 3500K first 30mins, then 4000k and 3500K for 5 hours, then add far red ( growmau puck) then last half hour, turn off 4000K, and run 3500K and puck to finish, with Puck only last 15minutes after all lights out.

Sonoff is awesome,,
 

nfhiggs

Well-Known Member
If you have two different power supplies, they generate a voltage compared to their own ground wire so if the ground wires are at different potentials you'd get different voltages.
You know you can connect the grounds together so they are at the same potential....
 

Randomblame

Well-Known Member
No I have a buddy that makes them here local. He owns a computer store. I ordered the diodes online. And he soldered them in for me. So they are as custom as they come. They are 20 inches long. And have 142 diodes per strip.

Aha, nice! I wish I had such a buddy, lol!
Which diodes? They look a bit squared, are this Osram Duris S5 with red phosphor?
 

whytewidow

Well-Known Member
Aha, nice! I wish I had such a buddy, lol!
Which diodes? They look a bit squared, are this Osram Duris S5 with red phosphor?
Yes sir Osram duris s5 color reds. I'm unsure how they color them red. lm assuming you're correct.

I will ask my buddy tomorrow where he got them from. He ordered them for me. I NVR seen them until I picked them when they were done. I'l get part numbers and stuff if you would like.
 

whytewidow

Well-Known Member
Well I got the baylight hooked up. But for some rason I'm only crawling 86 watts. Something isn' right. I'm running strips 10 strips. With a hlf320h-24a. Wired in parallel. I should be over 300 watts. I have the positive out on the driver going to a wago then running to each positive on the strips. And the same with the negative. How am I only crawling 86 watts? Especially at 3.62a

20180311_163654.jpg
 
Last edited:
Top