Delayed switching

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?

Thanks!

Is this peripheral in any way connected to the Arduino?

Yep, by one pin (it’s an IR receiver).

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.

Got it backward.

Is there any valid reason why the Arduino and IR receiver can't be powered simultaneously?

1 Like

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.

See my previous answer but the LyraT doesn’t really have pins available!

Use this module, controlled by the Arduino, to power the rcvr and have the Arduino turn it on after a delay of 2 seconds

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.

IO12 seems to be used to read the position of one of the switches that are used to select which mode the SD card is in.

Hardware Reference: https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/board-esp32-lyrat-v4.3.html

Below is an extract from the schematic:
The full schematic is at https://dl.espressif.com/dl/schematics/ESP32-LYRAT_V4.3-20220119.pdf

1 Like

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!

So use the pololu switch board, better than a relay.

Thanks Jim but I’m not sure how that would work - as I don’t have any other pins available?

(Arduino or ESP32 type)

So exactly what board are you using?
Hard to believe you used every pin on a Mega or ESP32.

It’s a LyraT 4.3… see posts #7, #12 and #13 (if you are on the web forum).

Are the UART and I2C pins used?

I2C pins will (hopefully) have an LCD display attached.

UART pins wouldn’t be used but I don’t see them in the ‘Allocation of ESP32 Pins’ in the Hardware Ref.

It's bad luck anyway with the I2C pins IO23 and IO18. These are used on the ES8388 I2S Audio Codec Chip peripheral.