You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Custom board.
4 pcs pwm outputs, 0-10V out, digital in, analog in, I2C, onewire.
Hardware Configuration
PWM connected to base of fet transistor.
0-10V, averaged in files and amplified with OP amplifier.
Version
v2.0.6
IDE Name
Platformio IO
Operating System
Windows7
Flash frequency
40
PSRAM enabled
no
Upload speed
115200
Description
The unit has been running flawlessly for almost 2 years. Upgraded the kernel first to 2.0.5 then to 2.0.6. Since then the PWM and 0-10V outputs do not work. Have measured with an oscilloscope, the outputs are constantly at 0V.
Have tried
-To read back the status of the pins if they are still output, they are.
-To read back (ledcread) which reports the previous set value... Ie start value 0 I set 100 and I read back 0, I write new value 60 and I read back 100.
-To put several ledcwrite after each other. Does not make a difference on the pin, however, it can read back the data correctly. Not always but sometimes.
-Moving initiation of ledcsetup and ledcattatch from constructor to a begin function no difference.
Replaced ledcwrite with digitaWrite. Now I can change the pin state.
--------- IDE log ---------
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (5.3.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20006.221224 (2.0.6)
- tool-esptoolpy @ 1.40400.0 (4.4.0)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 50 compatible libraries
Scanning dependencies...
Dependency Graph
|-- PubSubClient @ 2.8.0
|-- ArduinoJson @ 6.20.0
|-- WiFi @ 2.0.0
|-- OneWire @ 2.3.7
--------- Board log ---------
Incomming SET JSON type
Incomming set value: 153, Readback LedCValue: 0, LedC freq: 0
Pin 32 is Input
Pin 33 is Input
Pin 34 is Input
Pin 35 is Input
Pin 14 is Output
Pin 18 is Output
Pin 19 is Output
Pin 21 is Output
Pin 12 is Output
Pin 13 is Output
Send Value list over MQTT
Value send:{"Type":"Value list","Function list":{"Analog out":{"Ch1":{"Value":15}}}}
JSON data
Filesize: 644
Check Ok
Incomming SET JSON type
Incomming set value: 317, Readback LedCValue: 153, LedC freq: 5000
Pin 32 is Input
Pin 33 is Input
Pin 34 is Input
Pin 35 is Input
Pin 14 is Output
Pin 18 is Output
Pin 19 is Output
Pin 21 is Output
Pin 12 is Output
Pin 13 is Output
Send Value list over MQTT
Value send:{"Type":"Value list","Function list":{"Analog out":{"Ch1":{"Value":31}}}}
JSON data
Filesize: 644
Check Ok
Incomming SET JSON type
Incomming set value: 491, Readback LedCValue: 317, LedC freq: 5000
Pin 32 is Input
Pin 33 is Input
Pin 34 is Input
Pin 35 is Input
Pin 14 is Output
Pin 18 is Output
Pin 19 is Output
Pin 21 is Output
Pin 12 is Output
Pin 13 is Output
Send Value list over MQTT
Value send:{"Type":"Value list","Function list":{"Analog out":{"Ch1":{"Value":48}}}}
Read sensor
Temp: 26.950001
Pressure: 101922.492188
Humidity: 24.541016, Old: 24.713867
JSON data
Filesize: 644
Check Ok
Incomming SET JSON type
Incomming set value: 634, Readback LedCValue: 491, LedC freq: 5000
Pin 32 is Input
Pin 33 is Input
Pin 34 is Input
Pin 35 is Input
Pin 14 is Output
Pin 18 is Output
Pin 19 is Output
Pin 21 is Output
Pin 12 is Output
Pin 13 is Output
Send Value list over MQTT
Value send:{"Type":"Value list","Function list":{"Analog out":{"Ch1":{"Value":62}}}}
JSON data
Filesize: 644
Check Ok
Incomming SET JSON type
Incomming set value: 398, Readback LedCValue: 634, LedC freq: 5000
Pin 32 is Input
Pin 33 is Input
Pin 34 is Input
Pin 35 is Input
Pin 14 is Output
Pin 18 is Output
Pin 19 is Output
Pin 21 is Output
Pin 12 is Output
Pin 13 is Output
Send Value list over MQTT
Many thanks. That was the mistake. Now it works.
I was unsure when I created the code about 2 years ago, it became a bit of "double security" and has worked.
Undefined behavior sometimes works, but is subject to change when the APIs change. Following the examples in the repo should give you better results than random (old) internet code...
Board
ESP-WROOM-32, custom board
Device Description
Custom board.
4 pcs pwm outputs, 0-10V out, digital in, analog in, I2C, onewire.
Hardware Configuration
PWM connected to base of fet transistor.
0-10V, averaged in files and amplified with OP amplifier.
Version
v2.0.6
IDE Name
Platformio IO
Operating System
Windows7
Flash frequency
40
PSRAM enabled
no
Upload speed
115200
Description
The unit has been running flawlessly for almost 2 years. Upgraded the kernel first to 2.0.5 then to 2.0.6. Since then the PWM and 0-10V outputs do not work. Have measured with an oscilloscope, the outputs are constantly at 0V.
Have tried
-To read back the status of the pins if they are still output, they are.
-To read back (ledcread) which reports the previous set value... Ie start value 0 I set 100 and I read back 0, I write new value 60 and I read back 100.
-To put several ledcwrite after each other. Does not make a difference on the pin, however, it can read back the data correctly. Not always but sometimes.
-Moving initiation of ledcsetup and ledcattatch from constructor to a begin function no difference.
Sketch
Debug Message
Other Steps to Reproduce
case #5306 feels similar.
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: