I need to power up a peripheral with a delay of 1 or 2 seconds to allow a board (Arduino or ESP32 type) to boot first.
The peripheral will be powered from the same 5V rail that is supplying the board. So the user presses a master on/off button, the rail is powered up and the board boots.
My thinking is to use a time delay relay but is there a better / simpler / other alternative?
You should never have a powered device connected to an un-powered Arduino. If you do actually need to power the IR receiver first then you need to isolate it from the Arduino until the Arduino is powered.
What, a TSOPxxxx or similar IR receiver? If so, I can't imagine it needing to be powered up after the rest of your circuit. Of course, you can ignore any output it delivers for the first few seconds after booting if a stabilisation time is the issue.
Or are you using an ESP32 strapping pin for the IR receiver ?
EDIT
Depending on the IR receiver, it may not be wise to power it at 5v and apply the output directly to an ESP32 pin.
If the IR receiver has a low power consumption and can operate at 3v3, then you have the option of powering it from an ESP32 pin instead of a power rail.
Yep, it’s a LyraT (4.3) board, I’m using pin 12 which is also ‘Aux input detection’, and the pin shouldn’t be connected when the board boots. To quote the hardware ref doc ‘Otherwise the ESP32 may not be able to boot correctly.’ The documentation is rather obtuse but I’ve proved it, powering the receiver after boot works, powering it before and the board throws errors.
What IR receiver are you using (part#/link) ?
Do you know in what state the "pin12" should be in at boot time? High or Low ? And also the value of any pullup/down resistor on that pin ?
There may be a trick you can use depending on that apart from what has already been suggested.
Thanks John, yes, I have been using those documents, and doing extensive testing.
The DIP switch selects use (and mode) of the SD card or JTAG. There is a JTAG header, and putting DIP switch 5 to ON routes pin 12 to the JTAG header pin MTCK, as per the schematic.
So I’ve been through all that… the receiver can’t be live at boot time, but works fine powered up afterwards in that configuration.
To everyone - the LyraT is a very different beast, it’s an ESP32-WROVER-E on a big board with a lot of other hardware. Consequently there are very few pins available to use - probably just pin 12, although 13 may be a possibility (I haven’t got 13 to work though).
I suspect that a delay relay is my best option - just thought I’d ask!