What is the best most safe way to drive this Relay?
Re: What is the best most safe way to drive this Relay?
If you completely disconnect the relay board, do you still get that same 1.4V to 1.8V on the ESP32 development board output pin? If so, that proves the issue is nothing to do with the relay board. You seem to have data on that pin during setup and during I²S audio.
Have you considered controlling the relay from some other pin?
How are you supplying +5V supply to the relay board?
Have you considered controlling the relay from some other pin?
How are you supplying +5V supply to the relay board?
-
- Posts: 19
- Joined: Tue Mar 06, 2018 2:08 pm
Re: What is the best most safe way to drive this Relay?
Hi Archibald!
If i disconnect the ESP32 from the relay, and test the voltage on Pin 22, it indeed sits between 1.4v and 1.8v whilst audio is playing.
When audio stops, it sits at 0v.
If I change the ESP32 pin to 13 for the relay low, then this problem doesn't happen. What is it about pin 22 that causes this?!
I can't work it out? Please see this github project which recreates the issue :
Note to prove it works, just change the to and connect voltmeter to pin 13 to test.
If i disconnect the ESP32 from the relay, and test the voltage on Pin 22, it indeed sits between 1.4v and 1.8v whilst audio is playing.
When audio stops, it sits at 0v.
If I change the ESP32 pin to 13 for the relay low, then this problem doesn't happen. What is it about pin 22 that causes this?!
I can't work it out? Please see this github project which recreates the issue :
Code: Select all
git clone https://renegadeandy@bitbucket.org/renegadeandy/audio_bug_relay.git
Code: Select all
relayPin1 = 22;
Code: Select all
relayPin1=13;
Re: What is the best most safe way to drive this Relay?
Hi Andy,
Sorry, I've not been able to find what's driving pin 22.
Sorry, I've not been able to find what's driving pin 22.
-
- Posts: 19
- Joined: Tue Mar 06, 2018 2:08 pm
Re: What is the best most safe way to drive this Relay?
Does yours behave the same?
Re: What is the best most safe way to drive this Relay?
I am not using I²S. I'm taking .wav files from ESP32 flash memory, or from the internet via WiFi, and outputting mono audio from one of ESP32's digital-to-analogue converters. Anyway, checking on an oscilloscope, I am not getting any data or clock signal on the D22 pin.
However, I've recently had the same sort of thing happen. I'm driving an SPI peripheral using pin D13 for serial data (MOSI). I understand that's more-or-less a default pin for the HSPI bus (although I'm not yet using SPI library). I had not realised that the WiFi example code I had copied was also using pin D13 (to drive an LED if required). It took a while to work out why my peripheral was behaving strangely.
However, I've recently had the same sort of thing happen. I'm driving an SPI peripheral using pin D13 for serial data (MOSI). I understand that's more-or-less a default pin for the HSPI bus (although I'm not yet using SPI library). I had not realised that the WiFi example code I had copied was also using pin D13 (to drive an LED if required). It took a while to work out why my peripheral was behaving strangely.
-
- Posts: 19
- Joined: Tue Mar 06, 2018 2:08 pm
Re: What is the best most safe way to drive this Relay?
Perhaps literally just run my project and check the voltage on Pin 22....it shouldn't matter if you have the i2s hooked up to a dac or not.
Re: What is the best most safe way to drive this Relay?
I've been assuming you have checked that pin 22 is not one of the four pins set up in your I²S pin configuration.
-
- Posts: 19
- Joined: Tue Mar 06, 2018 2:08 pm
Re: What is the best most safe way to drive this Relay?
Absolutely, look at the source code!
-
- Posts: 19
- Joined: Tue Mar 06, 2018 2:08 pm
Re: What is the best most safe way to drive this Relay?
Does this happen when you run my project on your esp32 or anybody elses?
Who is online
Users browsing this forum: Bing [Bot] and 72 guests