Analog output 0-10V?

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Analog output 0-10V?

#1 Post by localhorst » 13 Jan 2024, 15:33

Hey there,
I'm searching for a solution to get an 0-10V output, which can be controlled via ESP Easy.
I've already searched through the devices page, but didn't found anything. I'm not sure if I simply don't understand enough.

The background:
Again my decentralized ventilation system with heat recovery.
The controllers (I have three, as I have three zones) of the ventilation system are having an analog input, where 0-10V can be given. Needs to be active, means I need the current. Different Voltages are defining different ventilating modes.
Currently I'm running with Z-Wave Qubino ZMNHVD1 Flush Dimmer modules, doing the job quite well. But only after two years, already one of them was not able to go above 6 volts anymore, so it was useless / defect, as I couldn't set important ventilation modes anymore (in the range above 6 volts), and I needed to replace it. I guess parts of the internal 10V power supply were defect.

So now I'm hoping I can build my own device with ESP Easy and a fitting extra module. I guess the 0-10V module will need an extra power supply, but this would be fine.

Do you have any ideas how I could realize it? This would be so great!

Thank you and have a nice weekend!

Kevin
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#2 Post by TD-er » 13 Jan 2024, 16:16

How many discrete steps do you need?
ESP32 does have a DAC which could be used to generate an analog voltage, but it might not be very linear and maybe also not really 'clean'.
So you might want to add some filtering over it to make it more stable.
But I do think it is probably more stable than PWM output.

Then a simple opamp to scale it to the right range.

You can search for PWM Arduino 0 10V output on Google images for ideas.
I think the ESP32 DAC is actually just an I2S signal and if so then you can somewhat compare it to PWM.
But if the signal from the DAC is already being filtered using some capacitor, then I think you should pick those schematics using an opamp instead of a simple transistor design.

How much current do you need?
I guess it is probably not that much, but since your controllers already had failed power supplies, you might also check those requirements to make sure there isn't some short somewhere.
Maybe also check the existing controllers without any load to see if they can get upto 10V without load.

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Analog output 0-10V?

#3 Post by Ath » 13 Jan 2024, 16:28

A quick search found me this DFRobot I2C device: https://wiki.dfrobot.com/SKU_DFR0971_2_ ... DAC_Module (shop link to have a price indication). Usually, a local distributor can also supply these, as adding shipping costs from abroad isn't very "interesting".
The shop link also has documentation, and one of the answers at the bottom of the page states it can supply max. 20 mA of current.

Only issue is that it's not (yet) supported by ESPEasy, but that looks to be quite simple :oops:
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Analog output 0-10V?

#4 Post by Ath » 13 Jan 2024, 16:37

And we have support for the Analog input - PCF8591 that also has an 8 bit digital to analog output that can be controlled by commands, but the output voltage is limited to ~3.3V, so some amplification will be needed.
/Ton (PayPal.me)

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#5 Post by localhorst » 13 Jan 2024, 17:27

TD-er wrote: 13 Jan 2024, 16:16 How many discrete steps do you need?
I need 1V steps:
Bildschirmfoto 2024-01-13 um 17.26.49.png
Bildschirmfoto 2024-01-13 um 17.26.49.png (162.85 KiB) Viewed 20761 times
TD-er wrote: 13 Jan 2024, 16:16You can search for PWM Arduino 0 10V output on Google images for ideas.
Thank you - I'll do it!
TD-er wrote: 13 Jan 2024, 16:16How much current do you need?
I haven't found anything regarding this in the documentation yet, but it won't be much. It's just for the signal. The ventilator controllers are having their own power source.
Ath wrote: 13 Jan 2024, 16:28 A quick search found me this DFRobot I2C device: https://wiki.dfrobot.com/SKU_DFR0971_2_ ... DAC_Module (shop link to have a price indication).
This looks pretty much exactly what I'm looking for!
I'm surprised, nothing to find on AliExpress. But I'll dig deeper, where I can get those without shipping costs from abroad.
Ath wrote: 13 Jan 2024, 16:28Only issue is that it's not (yet) supported by ESPEasy, but that looks to be quite simple :oops:
Well, as this would be a preventive action and the system is currently running fine, I would have the time to test and debug. ;)
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#6 Post by TD-er » 13 Jan 2024, 17:40

With so few steps you probably won't have any problems with linearity.
Only problem could be the highest and lowest values.
So take a close look at those.

Also take care of what is actually ground as that might not be the same when you connect the ESP to something else like your computer.
When testing do not connect to a computer which is also powered from mains or in any way connected to something else.
Or use one of those USB isolators.

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Analog output 0-10V?

#7 Post by Ath » 13 Jan 2024, 17:49

Just check what distributor in your proximity has it available, or can order it for you (and probably combine it with other products to reduce shipping costs): https://www.dfrobot.com/distributor
/Ton (PayPal.me)

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#8 Post by localhorst » 13 Jan 2024, 18:15

Great, thank you!
Looks like I could get them here.
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#9 Post by localhorst » 14 Jan 2024, 01:02

Ath wrote: 13 Jan 2024, 16:28Only issue is that it's not (yet) supported by ESPEasy, but that looks to be quite simple :oops:
Well, I guess I would give it a shot - do you think the Wemos D1 / 8266 is a good companion? Or would you suggest something else / better?
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#10 Post by TD-er » 14 Jan 2024, 01:51

If you have it laying around, then go for it.
If you need to buy a board, please go for newer ESP32-like boards, preferrably with 16M flash as you don't have to worry about builds not fitting.
But 4M flash will also do just fine.

Right now we support ESP32 (classic), ESP32-C2/C3/C6/S2/S3 See: https://espeasy.readthedocs.io/en/lates ... chips.html
But I advice not to go for ESP32-C2 as there is a big chance you may end up with 2M flash.

ESP32-C2/C6 boards are only recently added, so you might want to pick ESP32 classic or ESP32-C3 or S3.
S2 is a bit of an odd one as it has nearly no usable new features over the ESP32 classic and those that are have a bit of an odd implementation.

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#11 Post by localhorst » 14 Jan 2024, 10:58

Good morning,
TD-er wrote: 14 Jan 2024, 01:51 so you might want to pick ESP32 classic or ESP32-C3 or S3.
I don't have anything laying around, so I think I'll go for those. Thank you!
From the specs the ESP32-S3 seems to be the newest and most powerful. I guess this would be the one to choose?
But wait. The ESP32 classic supports Ethernet. This would be nice. 🤔

One more thought I just had, as all controllers and everything is in one place / in my server cabinet:
Would it make sense to go with just one ESP32?
this module supports 8 different I2C addresses, which can be changed using the on-board DIP switch, allowing a cascade of 16 devices
Image
As it has 2 channels, does it mean I can connect two ventilation controllers to one DAC module and control them seperately?

Do you think it's possible to go with one ESP32 and 3 DAC modules (as I have 3 ventilation controllers)?
Or even one ESP32 with 2 DAC modules (using 2 channels from one, and 1 from the second DAC)?

Or should I rather go for 3 ESP32 with one DAC module each? Maybe avoiding possible trouble with power supply?

Once the hardware is finally defined and running, I'll design and print a housing for it. So this is not a problem and will simply follow from what is needed in hardware.

Have a relaxed Sunday!

Kevin
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#12 Post by TD-er » 14 Jan 2024, 13:43

As long as a common ground is not an issue, then yes you can use whatever combination you like.

When looking for Ethernet, the common ground becomes even more important, so make sure you don't (!!!) use shielded ethernet cables
If you plan on powering the ESP via PoE, then either look for ones with isolation on the PoE circuit, or make sure to isolate the rest of the circuit.
However isolating I2C isn't that simple as you need a special isolation chip for it and also use an isolated power (DC/DC converter module with isolation, can be had upto 1 Watt)

Anyway, did I mention isolation? ;)
Really you should look into this when trying to combine stuff with 0...10V controlled devices as those often have either their own ground or floating but with quite some beefy leak current when trying to connect some ground.

ESP32 classic has pins for RMII Ethernet chips, but there are also SPI Ethernet modules which will be added in the near future.
Then all ESP32 will have Ethernet options (I already have an Ethernet ESP2-C3 board with PoE)

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#13 Post by localhorst » 14 Jan 2024, 13:45

Me again, I'm sorry.
But as I started researching for ESP32 - with ethernet and POE, I came across this one:
https://shop.everythingsmart.io/en-de/p ... ment-board
Stating, that it supports ESP Easy. And POE. Is it fully supported by ESP easy?

Or, as alternative, what do you think about these ones? Would they work with ESP easy and the ethernet is supported?
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#14 Post by TD-er » 14 Jan 2024, 13:49

With LAN8720(A) or LAN8710(A) it will work.
But as stated, this is not isolated, so there is a direct connection to the PoE injector or switch.

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#15 Post by localhorst » 14 Jan 2024, 14:01

localhorst wrote: 14 Jan 2024, 13:45Or, as alternative, what do you think about these ones? Would they work with ESP easy and the ethernet is supported?
Those seem to have LAN8720A and no PoE.
And I could support power directly via 3.3 or 5V.
Only: no USB connection. How do I get ESP Easy on it?
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Analog output 0-10V?

#16 Post by Ath » 14 Jan 2024, 14:02

localhorst wrote: 14 Jan 2024, 10:58 From the specs the ESP32-S3 seems to be the newest and most powerful. I guess this would be the one to choose?
But wait. The ESP32 classic supports Ethernet. This would be nice. 🤔
Be aware that the Ethernet support on ESP32 takes a lot of GPIO pins, that can't be used for anything else.
We are planning to also support SPI-connected Ethernet solutions, probably W5500 and DM9051NP based devices first, where SPI uses less GPIO pins, that can also be combined with other SPI devices (if any), only the CS pin is separate per device.
localhorst wrote: 14 Jan 2024, 10:58 One more thought I just had, as all controllers and everything is in one place / in my server cabinet:
Would it make sense to go with just one ESP32?
this module supports 8 different I2C addresses, which can be changed using the on-board DIP switch, allowing a cascade of 16 devices
Image
As it has 2 channels, does it mean I can connect two ventilation controllers to one DAC module and control them seperately?

Do you think it's possible to go with one ESP32 and 3 DAC modules (as I have 3 ventilation controllers)?
Or even one ESP32 with 2 DAC modules (using 2 channels from one, and 1 from the second DAC)?

Or should I rather go for 3 ESP32 with one DAC module each? Maybe avoiding possible trouble with power supply?
It depends, as usual :D In this case it's important to know how far the ventilation controllers are apart from each other, as using long cables for analog signals, like the 0-10V you need here, might cause issues if too long wiring is used. Having a single ESP with 2 such DACs would be feasible if they are in rather close proximity (next to each other/only a few meters away), but if the distance is over 10 meter, I'd suggest to use a separate ESP/DAC per ventilation controller. The analog outputs can be controlled independently.
As the ESPs can be in the same ESP P2P Network, over WiFi/Lan, they can easily communicate with each other, transporting sensor values between each other without much work in setup, and as the cost of ESP controllers is relatively low, that could be a viable solution.
If space is an issue, then the ESP32-C3 mini boards are a very usable option, as these boards are quite small, and still have 8-12 GPIO pins available to connect sensors/switches.

NB: I've ordered that DAC board at komputer.de, as it's probably cheaper and faster to NL than ordering from either NL local (didn't find a distributor yet that offers it), Aliexpress (couldn't find any boards) or DFRobot directly.
I have some ideas on what plugin settings would be useful to have, and what commands to support.

I've reserved ID P166 for this plugin ;)
/Ton (PayPal.me)

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#17 Post by localhorst » 14 Jan 2024, 14:43

To give you an insight in my setup.
This is my server cabinet:
IMG_2742.jpeg
IMG_2742.jpeg (3.06 MiB) Viewed 20140 times
On the lower end, underneath the Synology, are the 3 ventilation regulators with the 0-10V analog input port (on the left - white), and the Qubino Actors (on the right - blue), who are currently giving the 0-10V signal (and should be replaced)
IMG_2743.jpeg
IMG_2743.jpeg (1.15 MiB) Viewed 20140 times
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#18 Post by TD-er » 14 Jan 2024, 14:49

That's some clean setup you got there :)
It is by far the easiest to have the ESP (even if you're using Ethernet) powered via an external 5V power supply.
This way the isolation part is less of an issue given that you have these 0...10V units powered probably from the same phase/group.

When using PoE you may introduce a "ring loop" where the ground will pick up all kinds of noise and/or currents which will eventually destroy electronics.

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#19 Post by localhorst » 14 Jan 2024, 15:25

Ath wrote: 14 Jan 2024, 14:02 Be aware that the Ethernet support on ESP32 takes a lot of GPIO pins, that can't be used for anything else.
We are planning to also support SPI-connected Ethernet solutions, probably W5500 and DM9051NP based devices first, where SPI uses less GPIO pins, that can also be combined with other SPI devices (if any), only the CS pin is separate per device.
As long, as I can still connect the DACs, I'm fine.
This device will have this only task, to provide the 3 times 0-10V controllable to my ventilator regulators. Once this is working, there will be no playing around or adding new tasks to it.
It should just reliably do what it has to do, as it is really a core component in my automation.
Ath wrote: 14 Jan 2024, 14:02 It depends, as usual In this case it's important to know how far the ventilation controllers are apart from each other, as using long cables for analog signals, like the 0-10V you need here, might cause issues if too long wiring is used. Having a single ESP with 2 such DACs would be feasible if they are in rather close proximity (next to each other/only a few meters away), but if the distance is over 10 meter, I'd suggest to use a separate ESP/DAC per ventilation controller. The analog outputs can be controlled independently.
Like it can be seen on my photos in the post before, we are talking in my setup of just a couple of centimeters. The ventilator controllers are side by side.

So I guess, I'll order 3 DAC modules and also 1 ESP32 with ethernet. Starting to test with one ESP32 and 3 DAC modules connected to it.
Ath wrote: 14 Jan 2024, 14:02 NB: I've ordered that DAC board at komputer.de, as it's probably cheaper and faster to NL than ordering from either NL local (didn't find a distributor yet that offers it), Aliexpress (couldn't find any boards) or DFRobot directly.
So I'll go and do the same today. :)
Ath wrote: 14 Jan 2024, 14:02I have some ideas on what plugin settings would be useful to have, and what commands to support.
I've reserved ID P166 for this plugin
Fantastic, thank you very much! :)
I can contribute on GitHub directly, I'm saint-hh there.
TD-er wrote: 14 Jan 2024, 14:49 That's some clean setup you got there :)
Thank you! :)
TD-er wrote: 14 Jan 2024, 14:49It is by far the easiest to have the ESP (even if you're using Ethernet) powered via an external 5V power supply.
This way the isolation part is less of an issue given that you have these 0...10V units powered probably from the same phase/group.

When using PoE you may introduce a "ring loop" where the ground will pick up all kinds of noise and/or currents which will eventually destroy electronics.
That sounds logical to me, thank you. For PoE I would need an injector anyways, so I'm not that eager to have it. Ethernet itself is just perfect in my cabinet. No need to put more load on the Wifi, as well as it's maybe even more reliable.

But still the question: how to flash ESP Easy without any USB port?
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Analog output 0-10V?

#20 Post by Ath » 14 Jan 2024, 16:42

localhorst wrote: 14 Jan 2024, 15:25 So I guess, I'll order 3 DAC modules and also 1 ESP32 with ethernet. Starting to test with one ESP32 and 3 DAC modules connected to it.
2 DACs would be just fine, but it's always nice to have a spare ;)
localhorst wrote: 14 Jan 2024, 15:25 But still the question: how to flash ESP Easy without any USB port?
The WT32-ETH01 board does have RX0 and TX0 connections, so using an USB-Serial adapter, like this one, will work just fine, but you'll have to manually set it to flash-mode by connecting IO0 to GND and then reset the board, just before the upload starts. Once the board is in flash mode, or during flashing, you can release IO0. Not sure if the board has a Boot button, if so, then that's connected to IO0 and wired to connect to GND when pressed.

Edit: Don't try to power the board from the serial adapter, the USB port probably won't deliver enough stable power to reliably run/boot the ESP.
/Ton (PayPal.me)

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#21 Post by localhorst » 14 Jan 2024, 17:49

Ath wrote: 14 Jan 2024, 16:42 2 DACs would be just fine, but it's always nice to have a spare ;)
I see, we are thinking the same way. ;)
Just placed my order for 3 DAC at komputer.de

So, I've made my shopping list for the rest of the components: What do you think? Something not good / overseen / probably not working?

Maybe I also should get myself a USB to 3.3V power source as well, for setting up, flashing and testing.

*edit*
In order to meet your comment:
Ath wrote: 14 Jan 2024, 16:42Edit: Don't try to power the board from the serial adapter, the USB port probably won't deliver enough stable power to reliably run/boot the ESP.
I just buy two of the USB Adapter with CH340G Converter. One for data from the MacBook, one for power supply directly from a USB charger. It's 4€...
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Analog output 0-10V?

#22 Post by Ath » 14 Jan 2024, 19:23

The ESP should have 5V power, it has a 3.3V regulator onboard, AFAICS. Not sure if the ethernet part requires 5V :?
/Ton (PayPal.me)

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#23 Post by localhorst » 14 Jan 2024, 20:18

localhorst wrote: 14 Jan 2024, 17:49 1x DC-DC Buck Voltage Converter Power Module / adjustable Step-Down-Modul
This guy should support 4-40V input and 1,25-35V output. So I can choose.
Apart from ethernet, what I read, the ESP32 can be powered by both, 3.3 or 5V.
But thank you, then I'll start directly with 5V, if it might be needed for the ethernet. Better safe than sorry...
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#24 Post by TD-er » 14 Jan 2024, 21:57

ESP32 alone can briefly peak at 500 mA when starting the WiFi.
Normal load is around 100 mA.
Some USB to serial adapters can handle this, but for sure not all.
And even worse, there are USB to serial adapters where the voltage regulator isn't outputting 3V3 but just 5V when the regulator is overloaded.
And some can be set to 3V3 but still output 5V, so always (!!) measure the output voltage of those adapters if you try to power the ESP using those. Never assume the correct voltage with those.

Still the flashing may succeed, but when you try to configure the ESP, WiFi or Ethernet may be started and then those voltage regulators just can't handle the required power.
When using Ethernet, your ESP board will draw about 250 mA continuously.

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#25 Post by localhorst » 15 Jan 2024, 11:12

Thank you again for your advices, again very helpful! :)
After a night sleeping about it, I just fired up the order. At least the board etc should be here this week (for the DACs I received an email, that they are processing the order).
Instead of ordering two USB to serial adapters, I just ordered one. Additionally I ordered another 230V to 12V transformator, just the same as I have in my server cabinet already running with the Qubino Z-Wave actors. Who should later take over for the ESP32 anyways.

As the Buck Voltage Converter / adjustable Step-Down-Modul is a double pack and I will have two, I'll use one with this coming 12V transformator as a test / flash / tryout setup for power supply. This combination should be able to deliver up to 3A. And will be the same as later in the end place / server cabinet.

Until the parts arrive, I need to go back to my SCD30 setup, which is just running very smooth the last days. Now giving a shot adding back the BMP280 and SHT21 on the same I2C. After having a result, I need to exchange in 3 more devices the SenseAir S8 against the SCD30 (and maybe remove the BMP280 + SHT21, let's see).
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#26 Post by localhorst » 17 Jan 2024, 13:38

Got a message from the vendor, the DACs are out of stock, but he is getting new ones by the end of the week and they'll be shipped immediately.
But the WT32-ETH01 board, power supply, etc has arrived, ready to be flashed.
Would this be a good version to get EasyESP already on it, doing a basic setup and later continue flashing OTA?
ESP_Easy_mega_20231225_normal_ESP32_4M316k_ETH.factory.bin
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Analog output 0-10V?

#27 Post by Ath » 17 Jan 2024, 14:12

localhorst wrote: 17 Jan 2024, 13:38 Got a message from the vendor, the DACs are out of stock, but he is getting new ones by the end of the week and they'll be shipped immediately.
Got the same message, this Monday :?

You could download from this Github Actions run (assuming you have a Github account, and are logged in), making you another beta-tester ;) (that PR is close to being merged, it is stable, and has some stability and other improvements), but you can also install the Christmas 2023 release, as that's currently the latest.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#28 Post by TD-er » 17 Jan 2024, 14:41

Please use the build linked by Ton as that one contains some fixes regarding factory default settings.
Later you can simply perform OTA updates.
Initial flashing of that WT32-ETH01 board is a bit tricky as it doesn't have an USB port.

You can also try the web flasher: https://td-er.nl/ESPEasy/latest/
Doesn't have the latest fixes of that PR linked above, but perhaps it is easier to flash compared to using the Espressif download tool.

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#29 Post by localhorst » 17 Jan 2024, 14:48

As I'm having a MacBook, I need to go through Python / esptool.py
TD-er wrote: 17 Jan 2024, 14:41 You can also try the web flasher: https://td-er.nl/ESPEasy/latest/
Oh, that's interesting - I'll try this first, I guess.
For the moment, I just want to have ESPEasy running, basically set it up and connect it to my LAN. And be able to flash via OTA, preparing for Aths magic, once the DACs are there. :)
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#30 Post by TD-er » 17 Jan 2024, 15:02

You may need Chrome for web flasher to work.

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Analog output 0-10V?

#31 Post by chromo23 » 17 Jan 2024, 17:15

localhorst wrote: 17 Jan 2024, 14:48 As I'm having a MacBook, I need to go through Python / esptool.py
Or you could try: https://github.com/Jason2866/ESP_Flasher/releases

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#32 Post by localhorst » 17 Jan 2024, 18:54

That's a nice one, thank you! Seems to work, unfortunately not successful, as I seem to have bricked the device. Same error as with the esptool.py - but seems to be much handier.
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#33 Post by localhorst » 18 Jan 2024, 13:54

Luckily the board has not been bricked, now I have two working boards.
Ath wrote: 17 Jan 2024, 14:12You could download from this Github Actions run (assuming you have a Github account, and are logged in), making you another beta-tester ;) (that PR is close to being merged, it is stable, and has some stability and other improvements)
Did so and flashed the ESP_Easy_mega_20240116_normal_ESP32_4M316k_ETH.factory.bin.
Any more action on Github required, or should I get the files in future just from that URL?

For now it looks like we both just have to wait for the DACs...
hamster wrote: 04 Feb 2021, 21:38 I created a nice enclosure for the WT32-ETH01 + Relays
see thingiverse.. https://www.thingiverse.com/thing:4750234
I guess in the meantime I just print this enclosure, to get already an idea what needs to be modified.
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Analog output 0-10V?

#34 Post by Ath » 18 Jan 2024, 14:02

localhorst wrote: 18 Jan 2024, 13:54 Did so and flashed the ESP_Easy_mega_20240116_normal_ESP32_4M316k_ETH.factory.bin.
Any more action on Github required, or should I get the files in future just from that URL?
Normally you can just get the published releases, but for testing purposes we could ask to test a fix or specific feature from such Actions run (or the web-flasher at https://td-er.nl/ESPEasy/latest/). The Actions run files there will be removed after 30 days, so are only 'temporarily' available. Releases will be available indefinitely, or until explicitly deleted (though that hasn't happened yet ;)).
/Ton (PayPal.me)

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#35 Post by localhorst » 18 Jan 2024, 22:57

I just realised that ESPEasy is fully responsive:
IMG_2769.png
IMG_2769.png (531.82 KiB) Viewed 17003 times
Respect!
Until know, I didn’t even came across the idea to use it with a mobile or tablet. But it’s really good and fast. 😊
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#36 Post by TD-er » 18 Jan 2024, 23:47

Hint... try the rules editor too :)

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#37 Post by localhorst » 19 Jan 2024, 00:21

localhorst wrote: 18 Jan 2024, 13:54
hamster wrote: 04 Feb 2021, 21:38 I created a nice enclosure for the WT32-ETH01 + Relays
see thingiverse.. https://www.thingiverse.com/thing:4750234
I guess in the meantime I just print this enclosure, to get already an idea what needs to be modified.
And done. @Ath: let me know if you need one too. ;)
What can I say? I'm ready - where are the DACs!?
TD-er wrote: 18 Jan 2024, 23:47 Hint... try the rules editor too :)
Woo, so much love! :)
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#38 Post by TD-er » 19 Jan 2024, 00:49

The rules editor, dark theme and responsive web page were mainly contributed by users (or was it only you, chromo?)
Anyway just take a look here: https://github.com/chromoxdor/easyfetch
It is just a plug-and-play add-on to create a dashboard for ESPEasy.
You can do some smart things with the task names and his JavaScript does detect it and create sliders, buttons, etc.

If you have multiple ESPEasy nodes, you can control them all via the same dashboard.

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Analog output 0-10V?

#39 Post by chromo23 » 19 Jan 2024, 09:01

TD-er wrote: 19 Jan 2024, 00:49 The rules editor, dark theme and responsive web page were mainly contributed by users (or was it only you, chromo?)
At least with the dark theme i can remember that @Ath did a lot of work too.
And let´s not forget, that you did a lot of work like integrating the rules editor into ESPEasy to make all this good stuff happen. :)

I recently tried on of the first ESPEasy builds just for fun and to get a perspective how far this project has come.
A lot has changed since then. Especially the hardware support of microcontrollers and external devices!
out.png
out.png (165.92 KiB) Viewed 16855 times

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Analog output 0-10V?

#40 Post by chromo23 » 19 Jan 2024, 09:09

The "advanced" page back then and now... :D


old new.jpg
old new.jpg (307.39 KiB) Viewed 16853 times

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#41 Post by localhorst » 19 Jan 2024, 19:22

Ath wrote: 17 Jan 2024, 14:12
localhorst wrote: 17 Jan 2024, 13:38 Got a message from the vendor, the DACs are out of stock, but he is getting new ones by the end of the week and they'll be shipped immediately.
Got the same message, this Monday :?
Just got the message, that mine have been shipped.
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Analog output 0-10V?

#42 Post by Ath » 19 Jan 2024, 19:35

localhorst wrote: 19 Jan 2024, 19:22 Just got the message, that mine have been shipped.
Yes, same here :D
/Ton (PayPal.me)

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#43 Post by localhorst » 24 Jan 2024, 19:21

TD-er wrote: 14 Jan 2024, 21:57When using Ethernet, your ESP board will draw about 250 mA continuously.
I can also see that it's giving over 20% of load to the system all the time. I leave it running since I've flashed it, no further devices connected - just a blank board with LAN and power connected to it (as I'm still waiting for the DACs). It's always over 20% - up to 30%.
Why is the LAN producing so much load? I thought it should be even less than WIFI.
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#44 Post by TD-er » 24 Jan 2024, 19:51

Please be aware that the "CPU Load" may not be exactly what you think it is.

ESPEasy has its own scheduler which is just a list of timestamps + actions of what to do.
So when running the loop() function, the next thing to do on this list is looked at and if nothing has to be done that loop will be counted as "idle".
Every N seconds (30 sec I think), I just add up all time spent in those "idle" loops and divide it over the total time since the last check. That's the "load".

Now look at the "LC" value (loop count, as in number of calls to the loop() function per second).
Typically on an idle system this is 5'000 - 40'000 (depending on lots of factors) when "ECO" mode is disabled (see tools->Advanced page)
In this scenario, the "idle" loop() call actually does nothing other than checking the scheduler list and performing background tasks.
With the "ECO" mode enabled, the "idle" loop() call does compute how much time is left till the next item on the schedulers list and call delay() for that amount of time.
This will also significantly reduce the LC, as it can be as low as <100.

That's all a lot of info to get to the really quircky behavior of the call to background tasks and Arduino's implementation of delay().

An ESP has to process incoming network traffic, keeping connections active, listening to WiFi access point beacons etc.
Every time delay() is called, this is also done.
Thus if you call it often, the duration of a delay() call is very close to what you actually specify (thus delay(1) takes roughly 1 msec)
If you call it less often, the amount of work to do adds up and delay() calls may take longer than specified by the parameter.

This behavior does very counter-intuitive things to the computed "load" as most calls to delay() are done in "idle" loop() calls.
The load value is not a proper indicator of how busy the system is for low load values (roughly < 30%) as adding some extra stuff to do may actually result in lower load values since some IO stuff also needs to call delay() or perform background tasks every now and then which takes away time spent for "housekeeping" from the "idle" loop() calls.

TL;DR
Don't pay too much attention to the load values when < 30%.

Now what also may keep the system occupied is handling ESPEasy p2p traffic.
But since you don't have a lot of other nodes, I guess this isn't really an issue here.
However if you see the LED on the switch port to your ESP flashing a lot, then there may be some UDP broadcast traffic happening or IGMP traffic (typically IP-TV multicast traffic), which does cause quite a lot of interrupts on the ESP.

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Analog output 0-10V?

#45 Post by Ath » 24 Jan 2024, 22:04

@localhorst I've created a pull request PR #4952, and the output will be available from this GH Actions run in due time.
When you have the hardware you can test it (I'll also test it myself once I receive mine ;)), but you can already review the task settings. It's available in the MAX and Collection G builds. Don't hesitate to give your feedback :geek:

The commands and values that can be used from the plugin are, for now, documented in _P166_GP8403.ino, but will of course end up in the RTD documentation.

There are a few TODO's, I'll be working on in the next days, so you might expect new builds over time.
/Ton (PayPal.me)

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#46 Post by localhorst » 25 Jan 2024, 15:36

TD-er wrote: 24 Jan 2024, 19:51Don't pay too much attention to the load values when < 30%.
Thank you very much for the explanation! I was just curious, as my Wemos D1 with the SCD30 are now using way less load - and this board, without any devices connected, is higher than those.
But perfectly makes sense, and yes: for a private network, there is some traffic here.
TD-er wrote: 24 Jan 2024, 19:51 Now what also may keep the system occupied is handling ESPEasy p2p traffic.
But since you don't have a lot of other nodes, I guess this isn't really an issue here.
Yes, only 5 nodes at the moment.
Ath wrote: 24 Jan 2024, 22:04 @localhorst I've created a pull request PR #4952, and the output will be available from this GH Actions run in due time.
When you have the hardware you can test it (I'll also test it myself once I receive mine ;)), but you can already review the task settings. It's available in the MAX and Collection G builds. Don't hesitate to give your feedback :geek:

The commands and values that can be used from the plugin are, for now, documented in _P166_GP8403.ino, but will of course end up in the RTD documentation.

There are a few TODO's, I'll be working on in the next days, so you might expect new builds over time.
Gorgeous - thank you very much!
The DACs just arrived and I'll start testing now. :D
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#47 Post by localhorst » 25 Jan 2024, 17:58

So far:
  • Updated to ESP_Easy_mega_20240124_collection_G_ESP32_4M316k_ETH Jan 24 2024
  • added the Output - GP8403 Dual-channel DAC 0-10V device
  • dipswitch settings on the DAC as default (0,0,0 --> I2C 0x58)
  • I've setup the I2C Interface and connected the DAC to:
    • SDA: GPIO-4
    • SCL: GPIO-14
I'm able to set voltage values to the DAC like (but it also accepts it if no DAC is connected):

Code: Select all

gp8403,volt,2,4
Bildschirmfoto 2024-01-25 um 17.49.29.png
Bildschirmfoto 2024-01-25 um 17.49.29.png (190.79 KiB) Viewed 15201 times
But unfortunately I cannot measure any voltage output from the DAC:
IMG_2802.jpeg
IMG_2802.jpeg (3.47 MiB) Viewed 15201 times
Any idea what is wrong here?
I've also tried with a different cable, a different DAC, changed to different I2C GPIOs, etc. Currently I have no idea what to test / change.

And: anytime I change some setting of the DAC, the device shows as disabled. I have to do a reboot every time, then it shows enabled again.
But the interface looks nice and very handy - especially those definable preset values are nice. :)
Last edited by localhorst on 25 Jan 2024, 18:06, edited 1 time in total.
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#48 Post by TD-er » 25 Jan 2024, 18:04

I think you should try another GPIO pin for the I2C as GPIO-4 has an internal pull-down.

See: https://espeasy.readthedocs.io/en/lates ... e-on-esp32

When running an I2C scan on the tools page, you should see the device appear.

And maybe you should wait for Ton to test his device too, as the plugin has been implemented without any hardware to test.
So better let Ton test it first as he hopefully knows what could be wrong when testing with real hardware.

localhorst
Normal user
Posts: 118
Joined: 10 Jan 2024, 17:44
Location: Hamburg,Germany
Contact:

Re: Analog output 0-10V?

#49 Post by localhorst » 25 Jan 2024, 18:15

Learning everyday with ESPEasy...
TD-er wrote: 25 Jan 2024, 18:04When running an I2C scan on the tools page, you should see the device appear.
Yes, I do see the device appear. :)
And I can see what tricked me - the dipswitches of the DAC have been set to 0x5F instead of 0x58.
Once set properly - I'm getting my voltage perfectly: :D
IMG_2803.jpeg
IMG_2803.jpeg (2.04 MiB) Viewed 15169 times
TD-er wrote: 25 Jan 2024, 18:04And maybe you should wait for Ton to test his device too, as the plugin has been implemented without any hardware to test.
So it looks like Ton already made a top job. 8-)
TD-er wrote: 25 Jan 2024, 18:04 I think you should try another GPIO pin for the I2C as GPIO-4 has an internal pull-down.
Should I still change it?
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog output 0-10V?

#50 Post by TD-er » 25 Jan 2024, 20:16

I have to look into the datasheets to see why this pin is pulled down as it is often done for a purpose.
So just to be sure it is maybe better to use a pin which isn't pulled down and which doesn't matter when you pull it up permanently.

One of the most tricky pins to never (!!) pull up or down is GPIO-12 (on classic ESP32)
So as long as you won't pull that pin up or down, then the worst that can happen is that the ESP will not boot or run unstable.

Just pick an available pin from that page in the docs I linked and make sure to not pick one "input only" pins :)

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests