![]() |
Forum Index : Microcontroller and PC projects : My project: A simple LED tester.
Author | Message | ||||
OldMMUser Newbie ![]() Joined: 05/08/2014 Location: United StatesPosts: 6 |
Hello, I used my CGMMSTICK1 for this simple project: 5 n = 100 10 SetPin(1),1 30 GoSub 100 32 Print "LED Voltage is: ",Format$(v, "%.2f") 40 Pause 500 50 GoTo 30 100 avg = 0 110 For x=1 To n 120 avg = avg + Pin( 1) 130 Next x 140 v = avg/n 150 Return My LED voltages, yours MAY vary! No LED ~ 3.30 (Self Test) Red ~ 2.54 Yellow ~ 2.58 Green ~ 2.61 Blue ~ 2.90 White ~ 2.92 UV ~ 3.09 2014-08-11_171258_LED_CIRCUIT.zip Test those LED's in your junk box! Reversed, open or shorted LED won't hurt this. |
||||
OldMMUser Newbie ![]() Joined: 05/08/2014 Location: United StatesPosts: 6 |
Hello again, Please note that if you use this setup with a "flickering" yellow LED used in "Electronic Candles" it makes a 'pretty good' hardware random number generator! Enjoy! |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2927 |
Nice 'discovery' regarding the random number generator! ![]() Going to use your discovery to select my next lottery numbers ![]() |
||||
CircuitGizmos![]() Guru ![]() Joined: 08/09/2011 Location: United StatesPosts: 1427 |
Nice! That is an interesting approach - determining likely color based on voltage drop. Micromites and Maximites! - Beginning Maximite |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2946 |
Hi OldMMuser, A novel idea but I wonder about your logic of having the Analog Input at the junction or R1 and R2.. Should it not actually be at the junction of R2 and D1 (at D1's Anode)? That would possibly explain why your voltages are a bit higher than I would have expected them to be about 0.8v lower than what you show there. Take for instance a `standard' RED Led of 1.7v forward voltage that means that your 2k (2 x 1k) resistor would drop the other 1.6v. Using Ohms law: (V=IR) then 1.6/2000 = .0008A or 0.8ma With 0.8ma flowing in R2 (and R1) your Analog input would be 1000x.0008 or 0.8V higher than the actual drop at the LED.. Take 0.8 off your RED led reading and guess what ... you have 1.74V I would change your circuit to read at the junction of R2 and D1 instead then you will read the actual forward voltage of the LED. Now another point, I am not certain but the forward voltage may change slightly (not dramatically) at a higher current draw. Anyway good Idea, I like it. Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
> the forward voltage may change slightly > (not dramatically) at a higher current draw. Right. I use LEDs to bias amplifiers, and can adjust the voltage (to some extent)with the value of the resistor feeding it. |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2946 |
Hi Hitsware, Aren't LEDs a bit `noisy' for use in an amplifier or is that not an issue these days with more modern manufacturing processes? Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
Bypassed with a cap. Plus the advantage of the right choice of voltages. I use them in class AB output stage where noise is not so critical, but have seen them used in even phono preamp stages. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |