Hello!
I am creating an LED circuit that can be brightened/dimmed using a simple DC dimmer module. The LEDs being used have resistors pre-installed to take 12v max, so no risk of thermal runaway when wiring in parallel. In addition, a voltage sensor (R1=30kohm, R2=7.5kohm) is wired into an Arduino Uno and OLED screen, which is meant to be displaying the voltage at any given moment.
Below is the wiring diagram and code for the project:
voltage_sensor_test.ino (815 Bytes)
When the circuit is at zero or full voltage, the sensor reads 0 and 10.1 volts as expected. However, when the circuit is at a voltage in between those two values, the values show extreme fluctuation and bouncing. See video: https://youtu.be/t59dP_0-oA8
Additionally, here are links to some of the hardware used:
Voltage Sensor: HiLetgo 5pcs Voltage Detection Module DC 0~25V Voltage Sensor for Arduino: Amazon.com: Industrial & Scientific
DC Dimmer: Amazon.com: Gebildet 3pcs Mini DC Motor PWM Speed Controller, DC 5V-35V 5A Speed Adjustable Switch Module, 6V 12V 24V Variable Voltage Regulator Dimmer Governor Switching Build with LED Indicator : Industrial & Scientific
Any idea what might be happening here, how I could fix it, or why this setup concept may just not work at all? And, if so, what could be another way to measure the intensity of the LEDs?
Thank y'all for your help!
