Well, all we need to do is find and fix as many bugs as possible, and that's what we did, though maybe as a side-effect, but it's fine with melocalhorst wrote: ↑30 Jan 2024, 00:14 Wait, wait, wait!
Now I've set "Spare" to initial 5V as well. Tested again, coming up with all 5V except for Kinder still 2V.
Looked back in ioBroker and found this from testing:
Bildschirmfoto 2024-01-30 um 00.07.59.png
This cmd is containing:and going besides the MQTT Import plugin, kicking in right after booting and is responsible for the value 2V.Code: Select all
gp8403,preset,0,2
Emptied the cmd in ioBroker and checked again: all fine and like it should be.
Sorry for giving you a headache!
Analog output 0-10V?
Moderators: grovkillen, Stuntteam, TD-er
Re: Analog output 0-10V?
/Ton (PayPal.me)
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
That’s a very reasonable approach!
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu
Re: Analog output 0-10V?
But how do we fix those PEBKAC bugs?
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
Maybe creating a ESP unit which can be attached to the head, with servo and an arm with a hand, slapping remotely if needed?
You can send one out to me directly.
You can send one out to me directly.
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu
Re: Analog output 0-10V?
You need to implement AI in ESPEasy as an intermediate....
This solves every problem nowadays so I've heard.
Re: Analog output 0-10V?
Easy-AI
Yep working on it, but I'm having a hard time to fit it in those 16M flash units.
Also needs some extra RAM and a small datacenter.
Yep working on it, but I'm having a hard time to fit it in those 16M flash units.
Also needs some extra RAM and a small datacenter.
Re: Analog output 0-10V?
If anyone can fit all this together on an ESP it´s you.
[Feature request] Maybe while you at it you can add the option to generate images based on Plugin values.
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
I would love it, to be slapped with a fish!
And we need a sticker "industry 4.0" on it as well.
But back to topic:
When I came home today, the unit was frozen / not reachable anymore. Needed a hard start. Have been idling with 10V on all DAC channels before.
No idea where it came from. I've now enabled logging to my Synology. Should the log level be Info or better debug?
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu
Re: Analog output 0-10V?
@localhorst I've added documentation, can you please proof-read, and give feedback on this?
(The board doesn't allow .pdf files as attachment)/Ton (PayPal.me)
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
Looking good to me!
This is the only thing, what maybe could be added:
3.3V or 5VOutput - GP8403 Dual channel DAC 0-10V — ESP Easy 2.1-beta1 documentation.pdf wrote:and works from a single 3.3V power source
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
For "stress testing" the unit, I've made a script in ioBroker yesterday. It switches the output voltage of each DAC channel every minute to a random value 0-10V.
This morning the unit was dead again. Not reachable, the both LED of the LAN not flickering as normal, only periodically blinking - like every 2 seconds on/off.
On the DAC I measure 0V on both channel 0 - on channel 1 I can still measure 6V and 8V. This matches the last returned values to ioBroker.
The last things in the log:
But this doesn't help find the cause for the crashes. I'll change now to debug output.
Do you guys have any ideas, what could be the reason, that the board crashes frequently? Where I should start from?
This morning the unit was dead again. Not reachable, the both LED of the LAN not flickering as normal, only periodically blinking - like every 2 seconds on/off.
On the DAC I measure 0V on both channel 0 - on channel 1 I can still measure 6V and 8V. This matches the last returned values to ioBroker.
The last things in the log:
Code: Select all
2024-01-31 02:58:18 WD : Uptime 322 ConnectFailures 0 FreeMem 228016 EthSpeedState Link Up Full Duplex 100Mbps ETH status: Conn. IP Init
2024-01-31 02:58:00 EVENT: WZ_SZ#Kueche=2.00
2024-01-31 02:58:00 EVENT: WZ_SZ#WZ_SZ=7.00
2024-01-31 02:58:00 GP8403: 'volt' Output 0, value: 7.000V
2024-01-31 02:58:00 ACT : WZ_SZ.gp8403,volt,0,7.00
2024-01-31 02:58:00 EVENT: MQTT_ioBroker#WZ_SZ_Switch=7.00
2024-01-31 02:58:00 EVENT: MQTT_ioBroker#ESP32_VentSwitch/WZ_SZ/WZ_SZ_Switch=7
2024-01-31 02:58:00 IMPT : [MQTT_ioBroker#WZ_SZ_Switch] : 7.00
2024-01-31 02:58:00 EVENT: Kinder#Spare=4.00
2024-01-31 02:58:00 EVENT: Kinder#Kinder=10.00
2024-01-31 02:58:00 EVENT: Clock#Time=Wed,2:58
2024-01-31 02:58:00 GP8403: 'volt' Output 1, value: 4.000V
2024-01-31 02:58:00 ACT : Kinder.gp8403,volt,1,4.00
2024-01-31 02:58:00 EVENT: MQTT_ioBroker#Spare_Switch=4.00
2024-01-31 02:58:00 EVENT: MQTT_ioBroker#ESP32_VentSwitch/Kinder/Spare_Switch=4
2024-01-31 02:58:00 IMPT : [MQTT_ioBroker#Spare_Switch] : 4.00
2024-01-31 02:58:00 EVENT: WZ_SZ#Kueche=2.00
2024-01-31 02:58:00 EVENT: WZ_SZ#WZ_SZ=9.00
2024-01-31 02:58:00 GP8403: 'volt' Output 1, value: 2.000V
2024-01-31 02:58:00 ACT : WZ_SZ.gp8403,volt,1,2.00
2024-01-31 02:58:00 EVENT: MQTT_ioBroker#Kueche_Switch=2.00
2024-01-31 02:58:00 EVENT: MQTT_ioBroker#ESP32_VentSwitch/WZ_SZ/Kueche_Switch=2
2024-01-31 02:58:00 IMPT : [MQTT_ioBroker#Kueche_Switch] : 2.00
2024-01-31 02:58:00 EVENT: Kinder#Spare=10.00
2024-01-31 02:58:00 EVENT: Kinder#Kinder=10.00
2024-01-31 02:58:00 GP8403: 'volt' Output 0, value: 10.000V
2024-01-31 02:58:00 ACT : Kinder.gp8403,volt,0,10.00
2024-01-31 02:58:00 EVENT: MQTT_ioBroker#Kinder_Switch=10.00
2024-01-31 02:58:00 EVENT: MQTT_ioBroker#ESP32_VentSwitch/Kinder/Kinder_Switch=10
2024-01-31 02:58:00 IMPT : [MQTT_ioBroker#Kinder_Switch] : 10.00
Do you guys have any ideas, what could be the reason, that the board crashes frequently? Where I should start from?
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu
Re: Analog output 0-10V?
Technically that's correct, but when running the DAC board at 5V, then the I2C bus should use a level converter, as the ESP only accepts 3.3V on the GPIO pins, that's why I didn't mention 5V there. I'll add it to the documentation though, and probably add a picture of the board too (also mentioning the DFRobot source).localhorst wrote: ↑31 Jan 2024, 09:03Looking good to me!
This is the only thing, what maybe could be added:3.3V or 5VOutput - GP8403 Dual channel DAC 0-10V — ESP Easy 2.1-beta1 documentation.pdf wrote:and works from a single 3.3V power source
/Ton (PayPal.me)
Re: Analog output 0-10V?
When using the 'syslog' facility, there is a higher chance of networking/stack issues, as the syslog implementation has proven to be not really stable... but that was on ESP8266, where stack issues are more common because of limited memorylocalhorst wrote: ↑31 Jan 2024, 09:17 But this doesn't help find the cause for the crashes. I'll change now to debug output.
Do you guys have any ideas, what could be the reason, that the board crashes frequently? Where I should start from?
/Ton (PayPal.me)
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
Might this be a reason for my crashes? All, the board as the DACs, are getting 5V currently. Do I need some gentle, fishy slaps again?
I'll change to 3.3V now, disable logging and see...
The crash yesterday occured before I've enabled the logging.
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu
Re: Analog output 0-10V?
The ESP8266 should be 5V tolerant, as it has internal diodes to clamp to 3V3 if higher voltages are applied to a GPIO pin.
However this doesn't mean it is a good idea to do so as other I2C devices might not be 5V tolerant.
Also those diodes may pull the "high" level of the I2C signals to a level which may be close to the "low" level when considering 5V TTL level signals.
This can cause the I2C device and the ESP to get out of sync.
This should not cause hangs, but it can keep the ESP busy for too long so it can loose WiFi connection.
However this doesn't mean it is a good idea to do so as other I2C devices might not be 5V tolerant.
Also those diodes may pull the "high" level of the I2C signals to a level which may be close to the "low" level when considering 5V TTL level signals.
This can cause the I2C device and the ESP to get out of sync.
This should not cause hangs, but it can keep the ESP busy for too long so it can loose WiFi connection.
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
Thank you again!
So, from what I understand, it's in general not a good idea to power the ESP32 and the I2C devices with 5V.
So I'll leave the whole unit now running on 3.3V with ioBroker switching the output every minute. Switching with 2 sec offset each channel to a random voltage 0-10V. Let's see if it crashes again.
So, from what I understand, it's in general not a good idea to power the ESP32 and the I2C devices with 5V.
So I'll leave the whole unit now running on 3.3V with ioBroker switching the output every minute. Switching with 2 sec offset each channel to a random voltage 0-10V. Let's see if it crashes again.
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu
Re: Analog output 0-10V?
Powering the ESP directly with 5V (thus not using a voltage regulator) is absolutely a bad idea.
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
Thank you!
There we are...
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu
Re: Analog output 0-10V?
Consider it a miracle the board did survive higher voltages.
So maybe also go outside and buy a lottery ticket
So maybe also go outside and buy a lottery ticket
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
Luck with the board, no luck with the lottery. But I’m fine with it.
Last edited by localhorst on 01 Feb 2024, 12:26, 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
Re: Analog output 0-10V?
I think a little more nuance is needed here:localhorst wrote: ↑31 Jan 2024, 10:47 So, from what I understand, it's in general not a good idea to power the ESP32 and the I2C devices with 5V.
- In contrast to many Arduino boards, ESP mcu's are to be powered with 3.3V, and use 3.3V logic on input and output pins.
- ESP boards can be powered with 5V via the USB connector (when available) or the 5V pin on the board, as nearly all ESP (dev)boards have a voltage regulator on board to convert from 5V to 3.3V. Don't power the ESP board with 5V via the 3.3V pin! That'll damage the mcu!
- The DAC (board) can be powered from 3.3V (you can use a 3.3V pin from the ESP board) or 5V. When powering the DAC with 5V, a level converter should be used on the I2C pins, to protect the GPIO pins of the ESP and any other I2C devices against these too high voltages.
- ESP8266 chips have clamping diodes installed on (most) GPIO pins, that protects them from 5V input signals, but they can't properly deliver the 3.5V level required for a 1/HIGH level of a 5V device input, so that combination either does not work at all, or is working unreliably. It is strongly advised not to use 5V input/output signals, but to use a level converter if the connected device requires 5V signals.
Side note: Most (if not all) I2C devices support 3.3V VCC and 3.3V I2C signal levels. Some also support 5V VCC, and then also use 5V I2C signal levels.
/Ton (PayPal.me)
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
Thank you Ton!
Of course, I don't plug 5V on the 3.3V pin.
Since I changed to 3.3V, the unit is running fine. I keep it running with my test script over the weekend. If everything is fine / no crash occurs, I'll build it into my server cabinet / ventilation automation next week.
But as I'm measuring in between, coming back to the documentation:
I measure around 60mA on all 4 channels of both DACs.
60 mA seems to be the nominal output. Do you see the same on your DAC?
Of course, I don't plug 5V on the 3.3V pin.
Since I changed to 3.3V, the unit is running fine. I keep it running with my test script over the weekend. If everything is fine / no crash occurs, I'll build it into my server cabinet / ventilation automation next week.
But as I'm measuring in between, coming back to the documentation:
The output is marked with 20mA "least" in the datasheet.Output - GP8403 Dual channel DAC 0-10V — ESP Easy 2.1-beta1 documentation 2.pdf wrote:The outputs can supply up to 20 mA
I measure around 60mA on all 4 channels of both DACs.
60 mA seems to be the nominal output. Do you see the same on your DAC?
Last edited by localhorst on 01 Feb 2024, 12:25, 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
Re: Analog output 0-10V?
Ah, great, we already merged the plugin into the 'mega' branch, that also publishes the documentation to ReadTheDocs, so it's already available for anyone using the mega code branch Will be included in the next release.localhorst wrote: ↑01 Feb 2024, 10:17 Since I changed to 3.3V, the unit is running fine. I keep it running with my test script over the weekend. If everything is fine / no crash occurs, I'll build it into my server cabinet / ventilation automation next week.
Ah, I missed that, will update in a documentation update round,. I do from time to timelocalhorst wrote: ↑01 Feb 2024, 10:17 But as I'm measuring in between, coming back to the documentation:The output is marked with 20mA "least" in the datasheet.Output - GP8403 Dual channel DAC 0-10V — ESP Easy 2.1-beta1 documentation 2.pdf wrote:The outputs can supply up to 20 mA
I measure around 60mA on all 4 channels of both DACs.:
IMG_2820.jpeg
60 mA seems to be the nominal output. Do you see the same on your DAC?
That 20 mA is mentioned in some discussion I found on the DFRobot site, and I mistakenly took that for the maximum.
The documentation you linked is technically quite challenging to decipher, so I only had a quick look at it. All is based on the source code for their library, though I didn't (want to) use the sine/triangle/square-wave code.
/Ton (PayPal.me)
Re: Analog output 0-10V?
Hmm I find it strange that there is no mention of the max current on the outputs.
However there is a very important remark in the datasheet which must be taken serious:
It will break down (and recover, thus not like a single use fuse) when the voltage exceeds some threshold.
It protects both the GP8403 as well as the device you connect to.
When both devices are powered off when connecting, this is less of an issue and probably the devices acting on the 0...10V may also have a TVS present.
Maybe the board you're using already has one of these too?
They look like a beefy SMT diode.
Edit:
This board does indeed have the 10uF & TVS present.
See schematic: https://dfimg.dfrobot.com/nobody/wiki/a ... 8e8c79.pdf
However there is a very important remark in the datasheet which must be taken serious:
A TVS is actually like 2 zener diodes connected in opposite direction.When the GP8402 chip is used as an interface chip for the system, a 10uF capacitor and a 12V unidirectional TVS need to be connected to ground on the VOUT output pin, to ensure the chip hot plugging, static electricity, reverse connection and other protection.
It will break down (and recover, thus not like a single use fuse) when the voltage exceeds some threshold.
It protects both the GP8403 as well as the device you connect to.
When both devices are powered off when connecting, this is less of an issue and probably the devices acting on the 0...10V may also have a TVS present.
Maybe the board you're using already has one of these too?
They look like a beefy SMT diode.
Edit:
This board does indeed have the 10uF & TVS present.
See schematic: https://dfimg.dfrobot.com/nobody/wiki/a ... 8e8c79.pdf
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
Yes, this is indeed weird.
Great, thank you, this is good to know!TD-er wrote: ↑01 Feb 2024, 11:56This board does indeed have the 10uF & TVS present.
See schematic: https://dfimg.dfrobot.com/nobody/wiki/a ... 8e8c79.pdf
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
Already some wrap-up for this project, the unit is running fine since a couple of days and will be integrated in my automation next week:
If someone wants to build the same unit:
If someone wants to build the same unit:
- The original enclosure from Baptist (printed in green on the pictures)
- My adapter plate for 2x DAC + step-down module (printed in blue on the pictures)
- Attachments
-
- IMG_2829.jpeg (2 MiB) Viewed 2228 times
-
- IMG_2828.jpeg (1.62 MiB) Viewed 2228 times
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu
-
- Normal user
- Posts: 128
- Joined: 10 Jan 2024, 17:44
- Location: Hamburg,Germany
- Contact:
Re: Analog output 0-10V?
So today is the day and ESPEasy took over the control of switching my ventilation.localhorst wrote: ↑04 Feb 2024, 12:30 Already some wrap-up for this project, the unit is running fine since a couple of days and will be integrated in my automation next week
Not even a month later, since I started this thread. Thank you all so much again!
(German) documentation of making a decentralized ventilation system with heat recovery smart, based on CO2 sensors with ESP Easy: https://luft.breest.eu
Who is online
Users browsing this forum: No registered users and 1 guest