I have been making more progress. I wanted to post this video for two reasons: 1) to show the corrected output of the single sensor configuration, which was a blinking problem in the last video. & 2). to demonstrate the successful test of a dual sensor configuration. Having two sensors next to each other makes calibration much more difficult as the ambient environment is now changing around the sensor while it is trying to nail down a solid reference value. I imagine the calibration code working acts much like an under-dampened transform, but since everything is happening so fast, our patience is not too tested.
I apologize for the background noise. I am current out at sea, onboard a ship in the Gulf of Mexico. That noise which sounds like an electric motor in the background, is just that. The vessel's bow thrusters (multi-ton AC motors) are running and, even though they are way down in the engine room, they are still loud enough to be heard and felt throughout the vessel. Seas are a bit more rough today.
Let me also add a note about the vertical lines in the video, which the camera picks up from the LED dimming code. The brightness of the LED is set, not through hardware PWM, but done in the main code. An internal 8 bit timer counts up (0 to 255) and issues an interrupt which simply advances a "count" variable (which is also an 8 bit wide variable (256 values)). While the count variable is incremented by the timer overflow interrupt service routine, at certain count variable values, the LED is turned on or off. The time spent on or off is different depending of what the value of the brightness is assigned. So the LED could be ON between count variable values 1 to 2, and then off between 2 to 4, and then on again between 4 to 8, and maybe still off again from 8 to 16. The count values are 1,2,4,8,16,32,64,128,255. So you can see that the if the LED is on between counts 128 to 255, and off during the rest of the counts, then that would give a 50% brightness because it is on half the time. The average time it is on is the key aspect of this. Got the idea from this guy at this site,
http://www.batsocks.co.uk/readme/art_bcm_1.htm
Go there for a better explanation.
I believe my code is different (and not as efficient as his)
ANYWAY, the vertical lines that the camera picks up from the LEDs (if you look closely), you can see the lengths of the streaks, and how they are different. This physically shows you the time spent on and off by the LED. If you can make out a pattern to the streaks, that pattern is being repeated at a frequency of 122Hz, which is fast enough to not notice flicker. The blinking blue LED at the end, you can clearly see the vertical lines are mere dots b/c the LED is off most of the time. The actual blinking you can see is simply the brightness value swinging widely and the fact that people can perceive differences in dim light better than differences in light that is already bright.
how do I figure out voltage and amperage that will be sent OUT from a charged capacitor? does it depend on the voltage/amperage that its charged with? I dont get the whole farad/volt labels on the capacitors. im just trying to use a solar 1.5 volt panel to charge a capacitor, then use that charge (when there is no sunlight, with a photo-resistor) to power, say, a wrist watch. but i dont know either if a resistor will slow the rate of discharge, or just dissipate excess charge... thanks!
devil614 1 year ago
@devil614
Use it to charge a battery. Capacitors don't store much power, and they leak really bad.
grahmaustin 1 year ago
each sensor module uses a 556 timer. One timer (of the 556) is used to make a triggering cycle while the other is used as a monostable (one shot) where the sensor plate is connected. The output of the astable triggering cycle timer is connected to the trigger pin on the monostable timer.
grahmaustin 2 years ago
Cont'd:
The external components needed by the second timer only consist of a 1 MEGohm resistor, and the sensor plate is the capacitor.
For details of wiring timers in astable or monostable mode, just google that. The output of the second timer is an increase in duty cycle with an increase in sensor plate effective capacitance. This PWM signal goes through a 100k res and to a 1 uF cap to turn it into a linear DC signal.
grahmaustin 2 years ago