An electronic device operates from a main supply MAIN_IN = 5 V or a backup battery BACKUP_IN = 4.2 V.
Using two diodes, design an automatic power-selection circuit for the provided R_LOAD = 1 kΩ.
- The main supply must power the load when available.
- The backup battery must automatically power the load when the main supply is unavailable.
- Prevent reverse current into either supply.
Example test cases:
MAIN_IN | BACKUP_IN | Expected VOUT |
|---|
| 5 V | 4.2 V | 4ā5 V |
| 0 V | 4.2 V | 3.2ā4.2 V |
| 0 V | 0 V | ā0 V |