That's it. But not a common ground. I was going that route but it exposes the arduino/pi to the 110v circuit. You need to use the drivers ground for the 10v signal and the pi for the 5v ground.and if i wanted to fix the inversion, just:
So the common ground was actually what i was concerned/worried about initially. Also read a few places on the Pi forums that yes- you may get feed back in various situations via ground trying to regulate an external circuit. This is where my electronics knowledge takes a sharp dive- can you run the base of a transistor from a voltage source with an uncommon ground? I seem to remember seeing circuits where you could wire a full circuit from collector to emitter, then run an isolated voltage source on the base (like a 9v battery). I can't for the life of me remember if this needed a common ground. But it seemed to me it would, otherwise you can't build a charge gradient across the base?Be very careful creating a common ground between the arduino and the meanwell driver. Seperate grounds is recommended.
Two things can happen. First the signal can go backwards, high is low, or the signal needs to be inverted because sunrise/sunset run backwards.
Both can be resolved with just inverting the pwm signal. That is fine if you are using your arduino for dimming only because the pwm signal will go low, relay off while light is high meaning on. Conflict
If you are hoping to both dim and control on/off functionality both signals need to be in sync.
Shouldn't the Dim 10volts be modeled as a 0.1 milliAmp constant current source with 10v at 100k and 1v at 10k? The Vce (sat) (voltage between collector and emitter) of a saturated bipolar transistor is going to be greater than 0.2 volts, so you are not really shorting Dim+ to ground.So when you say backwards, do you mean it just inverts the PWM duty cycle? Or like.... does the driver actually flip polarity on its outputs? Inversion I can deal with- but flipping polarity just... sounds like something the driver should protect itself against? AKA impossible?
Ok, cool... so it sounds like im on the right track then, so If i go the single transistor route, this should really be about it right? The shared ground should drain any additional current from the base, but still leave an unimpeded path from the DIM+ to the DIM- when the base is hot?
EDIT: (the 'common' ground here would be the arduino/pi ground) and yes, it will invert the duty cycle
yes, here shown with 75K resistorShouldn't the Dim 10volts be modeled as a 0.1 milliAmp constant current source with 10v at 100k and 1v at 10k? The Vce (sat) (voltage between collector and emitter) of a saturated bipolar transistor is going to be greater than 0.2 volts, so you are not really shorting Dim+ to ground.
Such an idiot, this makes so much more sense now. I keep forgetting a power source has to be either a voltage or current source. So DIM+ isn't a 10V source, its a 0.1mA source. Holy fucking shit, this kinda makes sense now. So any 0.1mA source with a 10k resistor is 1V. My god.Shouldn't the Dim 10volts be modeled as a 0.1 milliAmp constant current source with 10v at 100k and 1v at 10k? The Vce (sat) (voltage between collector and emitter) of a saturated bipolar transistor is going to be greater than 0.2 volts, so you are not really shorting Dim+ to ground.
Ok, so I think I feel better using a transistor now that I know what the hell the dimmer actually is. Sharing a ground should be fine then?yes, here shown with 75K resistor
View attachment 3827592
and this is the phase correct Dimmer with a 10V source
View attachment 3827600
and without
View attachment 3827612
You can buy an Arduino Pro Mini for 1.50. Add a clock module and a relay and you have a light controller. Or get a "dim-to-off" compatible driver and leave out the relay.arduino seems a tad overkill for htis application... second the single bjt orbetter aFET
show up your skills, here is the LT.spice fileIf you share a ground you should add a 0.1uf cap on the positive leg and a 10uf cap on the ground side to isolate noise and feedback.
Awesome, thanks!I believe 500ma is a good target for your circuit. You can got to easyead.com and make the circuit board or you can use pcb blank. Nice job.