stupid automation tricks.....

greg nr

Well-Known Member
So for this grow, I decided to finally add some temp and humidity control to my nursery tent. It's in my basement, and while I have a full range of environmental controls on my big tent, I didn't have anything in the nursery. So temps swang from the low 70's with lights on to the mid 60's at night, and humidity was all over the map depending on when I last watered anwhether the lights were on (rh in the basement right now is about 30% +/-).

So I added a wemo mini using esp32 with a temp humidy sensor and added that to home assistant. I then used node-red to control the temp and humidity and it's doing a pretty good job so far.

Just dumb automation tricks. I guess I was bored.

small-h.JPGsmall-t.JPG
 

lazaah

Well-Known Member
Are you supplying the esp usb or vin power? I'm having a pain of a time trying to power them via vin. Think the wifi is browning out on boot
 

Kervork

Well-Known Member
ESP's are very sensitive to crappy voltage no matter how you power them. Don't be cheap.

Interval based PID controller would get rid of that 4 degree variance if you are bored and autistic. Don't think it matters to the plants but PID controllers are cool and NR has a bunch of them.
 

Henchman2one

Active Member
ESP's are very sensitive to crappy voltage no matter how you power them. Don't be cheap.

Interval based PID controller would get rid of that 4 degree variance if you are bored and autistic. Don't think it matters to the plants but PID controllers are cool and NR has a bunch of them.
Or could just change the PID constants in your code?
 

Henchman2one

Active Member
So for this grow, I decided to finally add some temp and humidity control to my nursery tent. It's in my basement, and while I have a full range of environmental controls on my big tent, I didn't have anything in the nursery. So temps swang from the low 70's with lights on to the mid 60's at night, and humidity was all over the map depending on when I last watered anwhether the lights were on (rh in the basement right now is about 30% +/-).

So I added a wemo mini using esp32 with a temp humidy sensor and added that to home assistant. I then used node-red to control the temp and humidity and it's doing a pretty good job so far.

Just dumb automation tricks. I guess I was bored.

View attachment 4801276View attachment 4801279
Cool
 

lazaah

Well-Known Member
Doesn't get much better power than that. What are the symptoms? What firmware you using?
Esphome, rasping, docker. Usually after the initial flash over wire, when trying to flash over the air the connection times out. The projects been on the back burner for a bit, as I didn't have time to find a way round the roadblock
 

greg nr

Well-Known Member
Are you supplying the esp usb or vin power? I'm having a pain of a time trying to power them via vin. Think the wifi is browning out on boot
Just usb, but it is off a very stable supply. Vin on these boards doesn't have any power conditioning; it relies on a clean supply v.

The 4 degrees is intentional. I don't want the heater chattering non stop. A small spread won't harm the plants any.
 

Henchman2one

Active Member
@lazaah

You could throw a cap + 5V zener across Vin to smooth any ripple. Oversize the cap, I'd try a 100μF to start and if I didn't have a scope to check.

You can add a cap + linear regulator between your PS and esp. Although might be less impactfulful than anticipated because LDO's are not very good ripple reducers.

I'm wondering what your input PS power looks like. You can get cheap single channel oscope for ~$20 to look and see what's going on.

You could try even a little buck-boost or a sepic converter between PS and esp to try to recondition the input power, but I'm wondering if its just your particular PS as the cheapy usb bricks seem to work well running my esp32's and their webserver sketches (I only flash using a wired connection, but the devices/Wi-Fi sketches work as intended when running off of a standalone usb power brick).

You're possibly gulping more current at times (during upload) than your PS is rated for and thus dropping out V. You could source a bigger wattage PS and see if that helps.
 
Last edited:

lazaah

Well-Known Member
@lazaah

You could throw a cap + zener across Vin to smooth any ripple. Oversize the cap, I'd try a 100μF to start and if I didn't have a scope to check.

You can add a cap + linear regulator between your PS and MC/computer. Although might be less impactfulful than anticipated because LDO's are not very good ripple reducers.

I'm wondering what your input PS power looks like. You can get cheap single channel oscope for ~$20 to look and see what's going on.

You could try even a little buck-boost or a sepic converter between PS and MC to try to recondition the input power, but I'm wondering if its just your particular PS as the cheapy usb bricks seem to work well running my esp32's and their webserver sketches (I only flash using a wired connection, but the devices/Wi-Fi sketches work as intended when running off of a standalone usb power brick).

You're maybe gulping more current at times (during upload) than your PS is rated for and thus dropping out V. You could source a bigger wattage PS and see if that helps.
It's a 30w meanwell psu, probably the most reliable power source you can get. There is a known issue with flashing via wifi and using Vin, I just haven't come across a known solution yet. I've tried many things as I've been using microcontrollers/plc for over 10 years, so have a good source of parts laying around to troubleshoot.
 

Kervork

Well-Known Member
If it happens with a decent USB power supply and multiple chips I would be inclined to suspect software or perhaps not enough room to store the firmware. Have you run other firmware? Did it ever work? If the problem happens with multiple boards and a decent USB power supply then it's not a power issue.

Sure the boards are real? Can't trust Gyna.
 

lazaah

Well-Known Member
If it happens with a decent USB power supply and multiple chips I would be inclined to suspect software or perhaps not enough room to store the firmware. Have you run other firmware? Did it ever work? If the problem happens with multiple boards and a decent USB power supply then it's not a power issue.

Sure the boards are real? Can't trust Gyna.
They work fine over usb. I've got 12 of them I need to set up, same issue with all of them.

I'm based in NZ, so it's either roll a dice and wait three weeks for shit from China or pay 4x the price for everything from a retailer.

This is a relevant thread to the issue.
 

Henchman2one

Active Member
It's a 30w meanwell psu, probably the most reliable power source you can get. There is a known issue with flashing via wifi and using Vin, I just haven't come across a known solution yet. I've tried many things as I've been using microcontrollers/plc for over 10 years, so have a good source of parts laying around to troubleshoot.
Some have thrown a 10uF cap between EN pin and GND pin which seems to alleviate the issue.
98296304-047f7100-1fb3-11eb-907b-333469357a62.jpg 98296301-021d1700-1fb3-11eb-84eb-9d165d9a8633.jpg

You can increase Vin to 5.4V-5.6V and some have found that to be a remedy. (After looking at your link it looks as if there's an extra diode in the esp32, and that would make sense as to why a bit higher V would alleviate issues, due to the Vf of the diode, but the higher V could also be offsetting a linear resistance instead of the diode Vf being the issue, just a musing I had, take it or leave it ha)

You could open up a USB cable and tie in your PS to the USB power wires to see if that works.

Depending on the resistance of your power supply leads and the resistance of your connection point, you may be dropping a decent chunk of V during high current demand times. Even if your PS has 6A to provide, if the total Ω in the power leads/connections is too high then a demand of only 0.5A will drop the V to unusable levels.

0.75Ω × 0.5A = 0.375V
Doesn't take much Ω before your [reliable PS + power leads] create a not so stable power output. The serial chip may be facilitating a slower startup when powering through USB compared to powering through Vin (as the serial chip is bypassed with Vin). If this were the case then current demands would be higher when powering up through Vin compared to less current and a slower power up through USB. This difference in current demand may be influencing your Vin depending on the amount of Ω in your PS leads and connection point. In any event with 10yrs experience it shouldn't be too complicated, these were just some things I thought were relevant. Good luck.
 
Last edited:

lazaah

Well-Known Member
Some have thrown a 10uF cap between EN pin and GND pin which seems to alleviate the issue.
View attachment 4803938 View attachment 4803939

You can increase Vin to 5.4V and some have found that to be a remedy.

You could open up a USB cable and tie in your PS to the USB power wires to see if that works.

Depending on the resistance of your power supply leads and the resistance of your connection point, you may be dropping a decent chunk of V during high current demand times. Even if your PS has 6A to provide, if the total Ω in the power leads/connections is too high then a demand of only 0.5A will drop the V to unusable levels.

0.75Ω × 0.5A = 0.375V
Doesn't take much Ω before your [reliable PS + power leeads] create a not so stable power output. The serial chip may be facilitating a slower startup when powering through USB compared to powering through Vin (as the serial chip is bypassed with Vin). If this were the case then current demands would be higher when powering up through Vin compared to less current and a slower power up through USB. This difference in current demand may be influencing your Vin depending on the amount of Ω in your PS leads and connection point. In any event with 10yrs experience it shouldn't be too complicated, these were just some things I thought were relevant. Good luck.
Cheers, I had tried grounding the usb to GND, as well as varying voltages, but had not come across the cap trick. I'll give that a go when I next sit down!

I would be very surprised of it was a psu resistance issue as I've tried supplying power via breadboard and using jumper cables directly. I'll keep it in mind though!

Cheers, I will get there eventually. I just had to stop spending time going around in circles with that project so I could maintain others. Too many projects!
 

Mak'er Grow

Well-Known Member
Have you tried to tie all the grounds together? ...fixed a problem I had with my relay boards and a Arduino Mega and separate PSUs.
 

Henchman2one

Active Member
Cheers, I had tried grounding the usb to GND, as well as varying voltages, but had not come across the cap trick. I'll give that a go when I next sit down!

I would be very surprised of it was a psu resistance issue as I've tried supplying power via breadboard and using jumper cables directly. I'll keep it in mind though!

Cheers, I will get there eventually. I just had to stop spending time going around in circles with that project so I could maintain others. Too many projects!
Haha projects??? Oh ya, I hear ya. One thing I've kinda noticed is that those breadboard connections are not great low resistance conductors. Those breadboard wires can drop more V than I thought typical and you have to take Ω from the wire going in and out into account. I've had issues with some of my sketches and projects only to find that it was the breadboard wires and holes that were messing with my intended operation. After soldering and sometimes using better wire my issues resolved.

I now cannabilize old Ethernet cable and use a lighter to burn the insulation off at either end and use those as my breadboard jumpers. More reliable and less issues. You may already be doing this but I just figured I'd mention it for others.
 

lazaah

Well-Known Member
Haha projects??? Oh ya, I hear ya. One thing I've kinda noticed is that those breadboard connections are not great low resistance conductors. Those breadboard wires can drop more V than I thought typical and you have to take Ω from the wire going in and out into account. I've had issues with some of my sketches and projects only to find that it was the breadboard wires and holes that were messing with my intended operation. After soldering and sometimes using better wire my issues resolved.

I now cannabilize old Ethernet cable and use a lighter to burn the insulation off at either end and use those as my breadboard jumpers. More reliable and less issues. You may already be doing this but I just figured I'd mention it for others.
Yeah, I've got strippers and all the wire jazz I need. I just wish there was a selection of breakout boards for the 32, as all the local blank pcbs don't lend to a tidy setup. I ended up cutting breadboard in half for my esps. I'll report back in when I dust them all off!
 

Henchman2one

Active Member
Yeah, I've got strippers and all the wire jazz I need. I just wish there was a selection of breakout boards for the 32, as all the local blank pcbs don't lend to a tidy setup. I ended up cutting breadboard in half for my esps. I'll report back in when I dust them all off!
Lol true story.
 
Top