We are monitoring the current of an industrial-grade 15HP induction motor via a relay-based zero-cross switching system. Current detection involves employing a CT (Current Transformer) linked to an op-amp circuit, with climbing diodes utilized for conditioning, ultimately feeding into the ADC pin of the ESP32wroom microcontroller. Notably, no observable heating or component failure has been noted during operation. However, approximately 10% of our produced PCBs (out of a batch of 50) are exhibiting this problematic behavior.
In addition to current detection issues, we're also facing similar challenges with voltage detection. Initially, we utilized a transformer-based power supply. However, we transitioned to an isolated AC-DC module featuring a 230V/12V/5V dual output configuration. Regrettably, the problem persists despite this change in power supply.
More details :
We are encountering perplexing issues with our ESP32-based system, particularly concerning current and voltage detection. Despite extensive troubleshooting efforts, a subset of our produced PCBs exhibits erratic behavior in both current and voltage readings, posing challenges to the overall functionality of our system.
Current Detection Issue:
Approximately 10% of our PCBs are experiencing an anomalous behavior with current detection. Despite a stable input signal from the CT (Current Transformer) and accompanying op-amp circuitry, the ESP32wroom ADC reports a current value of zero on the serial monitor. This issue appears to be isolated to a specific subset of the manufactured PCBs, with the remaining 90% functioning as intended.
Voltage Detection Issue:
Similar discrepancies are observed in voltage detection across the problematic PCBs. Despite transitioning from a transformer-based power supply to an isolated AC-DC module, the voltage readings obtained from the ADC exhibit inconsistencies. On the affected boards, the ADC reports either zero voltage or provides significantly incorrect readings.
Troubleshooting Efforts:
We have conducted extensive troubleshooting measures, including component-level checks, signal integrity analysis, and firmware verification. Additionally, oscilloscopes and other diagnostic tools have been utilized to capture and analyze signal waveforms and voltage profiles. Despite these efforts, the root cause of the discrepancies remains elusive.
Inquiry Details:
Relay-Based Zero Cross Switch: We utilize a relay-based system for switching purposes, synchronizing its operation with the zero-crossing points of the AC waveform. This method is commonly employed for controlling AC power circuits efficiently.
Climbing Diodes: Diodes within the circuit are utilized for conditioning purposes, preparing the signal from the CT for accurate measurement and processing.
Probing and Troubleshooting: Our probing and troubleshooting efforts encompass comprehensive component inspections, signal integrity analyses, and validation of circuit connections. However, further insights and recommendations are sought to identify and address the root cause of the discrepancies.
Attached the Schematics.
ESP32wroom ADC Failure in Current and Voltage Detection
-
- Posts: 3
- Joined: Thu May 30, 2024 1:45 pm
ESP32wroom ADC Failure in Current and Voltage Detection
- Attachments
-
- Schematics-1
- Screenshot 2024-05-29 132543.png (100.77 KiB) Viewed 1253 times
-
- Schematics-2
- Screenshot 2024-05-29 132238.png (30.57 KiB) Viewed 1253 times
Last edited by Octane Circuits on Wed Jun 12, 2024 5:41 am, edited 1 time in total.
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32wroom ADC Failure in Current and Voltage Detection
You refer to 'problematic behaviour', but you never define it. What's the failure mode you're seeing?
-
- Posts: 3
- Joined: Thu May 30, 2024 1:45 pm
Re: ESP32wroom ADC Failure in Current and Voltage Detection
Thank you for pointing that out. By "problematic behavior," I mean that the ADC readings from the ESP32wroom are either:
Non-responsive: The ADC seems to stop responding entirely, providing no readings or zeros regardless of the input.
These issues occur intermittently across the affected boards, making it challenging to pinpoint the exact cause. We've ruled out heating and obvious component failures, as all other parts of the system appear to be functioning correctly. Any suggestions on what might be causing these ADC failures or how to further diagnose the problem would be greatly appreciated.
Non-responsive: The ADC seems to stop responding entirely, providing no readings or zeros regardless of the input.
These issues occur intermittently across the affected boards, making it challenging to pinpoint the exact cause. We've ruled out heating and obvious component failures, as all other parts of the system appear to be functioning correctly. Any suggestions on what might be causing these ADC failures or how to further diagnose the problem would be greatly appreciated.
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32wroom ADC Failure in Current and Voltage Detection
The ADC stops reading and is nonresponsive? As in the call to get an ADC value just never returns?
-
- Posts: 3
- Joined: Thu May 30, 2024 1:45 pm
Re: ESP32wroom ADC Failure in Current and Voltage Detection
Greetings,
We are encountering perplexing issues with our ESP32-based system, particularly concerning current and voltage detection. Despite extensive troubleshooting efforts, a subset of our produced PCBs exhibits erratic behavior in both current and voltage readings, posing challenges to the overall functionality of our system.
Current Detection Issue:
Approximately 10% of our PCBs are experiencing an anomalous behavior with current detection. Despite a stable input signal from the CT (Current Transformer) and accompanying op-amp circuitry, the ESP32wroom ADC reports a current value of zero on the serial monitor. This issue appears to be isolated to a specific subset of the manufactured PCBs, with the remaining 90% functioning as intended.
Voltage Detection Issue:
Similar discrepancies are observed in voltage detection across the problematic PCBs. Despite transitioning from a transformer-based power supply to an isolated AC-DC module, the voltage readings obtained from the ADC exhibit inconsistencies. On the affected boards, the ADC reports either zero voltage or provides significantly incorrect readings.
Troubleshooting Efforts:
We have conducted extensive troubleshooting measures, including component-level checks, signal integrity analysis, and firmware verification. Additionally, oscilloscopes and other diagnostic tools have been utilized to capture and analyze signal waveforms and voltage profiles. Despite these efforts, the root cause of the discrepancies remains elusive.
Inquiry Details:
Relay-Based Zero Cross Switch: We utilize a relay-based system for switching purposes, synchronizing its operation with the zero-crossing points of the AC waveform. This method is commonly employed for controlling AC power circuits efficiently.
Climbing Diodes: Diodes within the circuit are utilized for conditioning purposes, preparing the signal from the CT for accurate measurement and processing.
Probing and Troubleshooting: Our probing and troubleshooting efforts encompass comprehensive component inspections, signal integrity analyses, and validation of circuit connections. However, further insights and recommendations are sought to identify and address the root cause of the discrepancies.
We are encountering perplexing issues with our ESP32-based system, particularly concerning current and voltage detection. Despite extensive troubleshooting efforts, a subset of our produced PCBs exhibits erratic behavior in both current and voltage readings, posing challenges to the overall functionality of our system.
Current Detection Issue:
Approximately 10% of our PCBs are experiencing an anomalous behavior with current detection. Despite a stable input signal from the CT (Current Transformer) and accompanying op-amp circuitry, the ESP32wroom ADC reports a current value of zero on the serial monitor. This issue appears to be isolated to a specific subset of the manufactured PCBs, with the remaining 90% functioning as intended.
Voltage Detection Issue:
Similar discrepancies are observed in voltage detection across the problematic PCBs. Despite transitioning from a transformer-based power supply to an isolated AC-DC module, the voltage readings obtained from the ADC exhibit inconsistencies. On the affected boards, the ADC reports either zero voltage or provides significantly incorrect readings.
Troubleshooting Efforts:
We have conducted extensive troubleshooting measures, including component-level checks, signal integrity analysis, and firmware verification. Additionally, oscilloscopes and other diagnostic tools have been utilized to capture and analyze signal waveforms and voltage profiles. Despite these efforts, the root cause of the discrepancies remains elusive.
Inquiry Details:
Relay-Based Zero Cross Switch: We utilize a relay-based system for switching purposes, synchronizing its operation with the zero-crossing points of the AC waveform. This method is commonly employed for controlling AC power circuits efficiently.
Climbing Diodes: Diodes within the circuit are utilized for conditioning purposes, preparing the signal from the CT for accurate measurement and processing.
Probing and Troubleshooting: Our probing and troubleshooting efforts encompass comprehensive component inspections, signal integrity analyses, and validation of circuit connections. However, further insights and recommendations are sought to identify and address the root cause of the discrepancies.
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32wroom ADC Failure in Current and Voltage Detection
Can you replicate this behaviour with a minimal example, e.g. new project that only uses the one-shot ADC driver to read values and prints them?
Re: ESP32wroom ADC Failure in Current and Voltage Detection
ADC Max is Vref, which is 3.3v. You may be destroying the ADC after stressing it for a while (or just once, if the voltage fed to it doesn't exceed 3.3v then, all of a sudden, exceeds it. At least hang a 3.3v zener (and resistor, if you don't want to lose the diode) on the input. (You have no place for the circuit to get even five volts as a reference. 3.4v input from that 5v "AC-DC module" and the ESP32 chip is at least badly stressed. something around 4.8v? The ADC input is gone and you get whatever the equivalent of "open circuit" the silicon does.
Have you run a measurement on the current with a fast recording oscilloscope, looking for transients? Relays typically take 7-20ms from actuation to current flow (or break). At 60Hz, 7ms is almost half the wave form from 0 to maximum and back to 0, so it's possible that your circuit is actually switching at current maximum, generating transients that are blowing the input of the ADC. Even a zener isn't going to protect the ADC from a 200 volt spike.
Do a bit of redesign. The CPU can drive the zero-cross signal, but feed it to a MOSFET to control the power. We did that for a 10kW load (granted, not very inductive) load, back in 1977, so you should have no problem. 10 Amps is idling for high power, line voltage MOSFETS. (We had to use a TO-220 triac.) A snubber diode and resistor to protect the MOSFET and you get less than half a degree switching - no transients.
I think it's a pretty sure bet that something is rising above Vref, once in a while, taking the input out. And those - IO21 or IO22, as I read it, ADC1 - are the most likely failure points.
Have you run a measurement on the current with a fast recording oscilloscope, looking for transients? Relays typically take 7-20ms from actuation to current flow (or break). At 60Hz, 7ms is almost half the wave form from 0 to maximum and back to 0, so it's possible that your circuit is actually switching at current maximum, generating transients that are blowing the input of the ADC. Even a zener isn't going to protect the ADC from a 200 volt spike.
Do a bit of redesign. The CPU can drive the zero-cross signal, but feed it to a MOSFET to control the power. We did that for a 10kW load (granted, not very inductive) load, back in 1977, so you should have no problem. 10 Amps is idling for high power, line voltage MOSFETS. (We had to use a TO-220 triac.) A snubber diode and resistor to protect the MOSFET and you get less than half a degree switching - no transients.
I think it's a pretty sure bet that something is rising above Vref, once in a while, taking the input out. And those - IO21 or IO22, as I read it, ADC1 - are the most likely failure points.
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32wroom ADC Failure in Current and Voltage Detection
Just responding to this: there are two diodes to 5V and GND, so the voltage there can't go over 5.7V. After that, there's a resistive divider formed by R64/R65, meaning the voltage on the ADC can't be more than 2.9V. C13 should take care of transients from there on. All in all: I don't think there's anything wrong with the schematic OP provided.Rukbat wrote: ↑Thu Jun 13, 2024 3:04 amADC Max is Vref, which is 3.3v. You may be destroying the ADC after stressing it for a while (or just once, if the voltage fed to it doesn't exceed 3.3v then, all of a sudden, exceeds it. At least hang a 3.3v zener (and resistor, if you don't want to lose the diode) on the input.
Who is online
Users browsing this forum: Dennie and 121 guests