-->
Page 1 of 1

ESP-12 with AC relay, sketch goes wrong without serial line

PostPosted: Wed Mar 31, 2021 10:06 am
by jeffas
I'm using an ESP-12 with on-board AC relay as a thermostatic controller. Power requirement is specified as 7-30v.
I have two of these. One has a 6v power supply and works fine; the other has 12v and exhibits this problem.
It works correctly only when I have a serial/USB line connected. With the line connected, it works perfectly; without it, it does "strange things". Sorry I can't be more specific, but of course I have no serial comms available for debugging. It seems to be undergoing some sort of partial reset; losing some internal data, but not going right back to setup.
When I changed to a 6v power supply, the problem went away.
I have a vague recollection of a pin needing pull-up/down (CTS maybe?) when the serial pins are not connected, but I can't find that reference now.
I'm using GPIO13 for a OneWire DS temperature sensor.
An obvious solution is to use a 6v power supply, but for one thing I'm curious as to what might be going on, and for another I would prefer to provide the voltage level specified by the manufacturer.

Re: ESP-12 with AC relay, sketch goes wrong without serial l

PostPosted: Wed Mar 31, 2021 5:10 pm
by QuickFix
I'm getting mixed signals here. :?
  • An ESP-12 with relay on board?
    This is an ESP-12:
    ESP-12.jpg

    Please show us the actual board you're using and how (schematic?) you're using it
  • A power requirement of 7-30V?
    The ESP8266 (in any form) uses 3.3V±10%, nothing more, nothing less
  • You can't describe what "Strange things" it's doing, but you're also not able to tell what it has to be doing?
    Please include the sketch: it often says more than a thousand words

Re: ESP-12 with AC relay, sketch goes wrong without serial l

PostPosted: Thu Apr 01, 2021 3:39 pm
by jeffas
Apologies for my lack of clarity. It's a ready-made module that I bought, with an ESP-12F and an AC relay on it. Here's an ebay link to one such: https://www.ebay.co.uk/itm/DC-7-30V-ESP ... 2471613182
I was hoping that someone would suggest some interference between serial I/O and GPIO13 that is somehow sensitive to supply voltage, and that a pull-up/pull-down somewhere would fix it, but if so, I guess it's to do with my specific module rather than ESP8266 in general.
I don't think that the detail of the sketch would help much; as I said, it all runs fine with the serial I/O connected or with a 6v power supply. And I don't want to waste anyone's time here, since I do have it working correctly on 6v.
I'm happy to post the sketch if anyone's particularly interested, but we're probably at a dead end.
Thanks QuickFix for the response.