Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/2qx/esp32-load-provision
Provision a load with a varying voltage randomly across an array.
https://github.com/2qx/esp32-load-provision
Last synced: about 1 month ago
JSON representation
Provision a load with a varying voltage randomly across an array.
- Host: GitHub
- URL: https://github.com/2qx/esp32-load-provision
- Owner: 2qx
- Created: 2023-04-07T15:18:04.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-04-07T16:28:45.000Z (over 1 year ago)
- Last Synced: 2023-08-17T04:12:52.518Z (over 1 year ago)
- Language: Python
- Size: 91.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a rough sketch of a circuit and scheme to provision an led array for a varying voltage input.
[Try it out on Wokwi](https://wokwi.com/projects/361196616225053697)
![Potentiometer, led, NeoArray, ESP32 and Display](docs/schematic.png "Schematic")
The microcontroller (ESP32) uses a simple read from an analog pin to estimate the current voltage. The potentiometer reading is mapped from 0-3.3V to 12-21V to simulate a higher voltage circuit.
The simulation doesn't factor in voltage drops from additional loads; in real life, provisioning more load would result in a slight voltage drop. Additionally, slight variability in the load may cause the need for load to be constantly toggled.
To address this, a simple low voltage disconnect scheme was applied to provision loads, at random, but only when the voltage changed significancy outside of the provided range.
![Provisioning and low voltage disconnect scheme](docs/lvd_fn.png "Provisioning Schema")
***
With a simulated voltage drop of 0.01 volt per micro-load, the control loop needed several iterations to account for large adjustments in voltage.
In addition, this sketch used an infinite loop to poll voltage every second. In reality, a voltage monitor on an interrupt for both up and down would be necessary to handle rapid changes in input.