ESP32 controlling 2 MW drivers and 2 AC infinity fans

Discuss garden automation systems and software here, including commercial products or Raspberry Pi and Arduino DIY setups.
Post Reply
zen0n
LED-Curious
LED-Curious
Reactions:
Posts: 1
Joined: Wed May 05, 2021 8:35 pm

Hey guys, just really getting into the whole esp stuff. Picked up a few 32s and have one up and running reporting temp and humidity into HA using a dht22 sensor. My electronics knowledge is rusty but buried in there so apologies if terminology is off.

In my tent I'm running 2 Mars hydro ts 3000 lights, each light has 2 meanwell xlg-240-h-ab drivers with each of their dimmer circuits connected, then feeds to the stock resistance pot adjuster. For air movement, I have 2 ac infinity 6" fans, one for each intake/exhaust. Tent is an 8x8 with 4x8 grow area currently.

The meanwells have 3 options for control, pwm 0-10v, resistance, or step voltage 0-10v. I'm not inherently opposed to connecting all 4 driver dim circuits together to control both lights as one if required, but would prefer not too and should have enough pins. Possibly thinking about using these digital pots for the lights depending on how many other parts I need for pwm to work.

https://www.dfrobot.com/product-1650.html

The ac infinity EC motor requires pwm 0-10v, there is a solid 10v dc power source coming from the motor that is usable.

Now, software wise in HA I think i understand how it all works. But the electronics side is still a bit fuzzy. For pwm dimming circuits, can you supply some voltage in the range of 0-10 and adjust the duty cycle as required? So can I use the gpio voltage to drive the dim/speed circuit?

I've also read it's a good idea to run the pwm output over an optocoupler, which if I'm understanding it correctly, only isolates the electronics from any mains noise. But signal in on one end is the same as the other end.

My googling seems to return some conflicting information on whether i would need to bump up the pwm voltage, some say I would need to, some make no reference and seem to just run it right from the pin.

Also, any downside from using the +10v DC power from the AC infinity fan to power the esp? I would assume AC infinity uses that 10v feed to power their own control units, as they don't have their own power source.

thx!
GreenThumb
LED-Curious
LED-Curious
Reactions:
Posts: 13
Joined: Mon Oct 04, 2021 8:51 pm

Hiya,

Wow there’s a lot going on here.

Meanwell drivers do pwm, I looked at that digital pot board too but I decided to use 0-10v pwm for everything.

You can apparently write code to create the pwm signal manually but I don’t think it’s recommended. It’s better to have an actual pin.

Ir arduino MCU should have pwm pins.

You then can connect any of the 0-5v pwm pins to a 0-10v converter. Amazon has two options I know of:

0-10 v pwm converter: it takes 14v-30v input, 0-5v pwm input from arduino and outputs a 0-10v pwm for the Meanwell. I believe you can connect multiple drivers to one of these:

DAOKI PWM to Voltage Module PWM to Vol ... F1R6899570

There’s another one that’s 4 channels, but it can output 3.7-27v pwm signals. You connect 4 pwm pins from the arduino to the inputs, and then a 3-27v power supply, and you get 4 pwm channels at whatever voltage you connected to the power supply input

PWM MOS FET Module,WALFRONT PWM 4-Chan ... W68C0P07XX

Here are single mosfet boards that work like the 4 channel but one channel:
5 Pcs 3.3V/5V IRF520 MOSFET Driver Mod ... SAVDGF2Q5P

So basically with those second two boards you’d connect a multimeter to the pwm output channel to ensure it’s a proper 0-10 v signal... you’d probably need to adjust the dimmer screw if you’re using a Meanwell psu or if you’re using a buck converter the set screw to dial in so the pwm signal is actually 10v


If you need more pwm pins, this take I2c and gives you 16 pins:
SunFounder PCA9685 16 Channel 12 Bit PWM Servo Driver for for Arduino and Raspberry Pi
Post Reply