niedziela, 9 marca 2014

the simplest (parallel) uC programmer

For AVR Tiny, Atmega and other microcontrollers

Various kinds!

The very simple, simplest BPW41 infrared reflective or trans photodiode interface to TTL or CMOS (uC, Arduino...) interface

Probably simplest BPW41 application.

 One day (in fact, it was a night) I needed simple and fast reflective transopto to precisely adjust a PWM RPM regulator. From scratch, like photodiode BPW41D i found. So I searched the net and found lots of schematics basen od op amps, bootstraps and so complex circuits. It seemed exaggerated to me. I measured that BPW generates 200-300mV static voltage  under IR diode light beam. Hey, it's very sufficient to open a transistor with a proper offset. So I made few tries and finally get a scheme like this. It worked!



The goal is to set the potentiometer, when dark diode, so base voltage is about 0,45V and Output voltage 4,5-5V.
Then with iluminated diode, base voltrage rises ca 100-150mV and output falls to 0,2 to 0,5V. Thats almost all I needed! Almost, beause of some noises on BPW input - I used speckled reflector which, together with fast (1-10MHz) diode, possibly made 400PMS counted as 17000 :).
(I suppose, when You use transreflective blend, it is not necessary)

So  I did a kind of filter to match the right range - just adding a cap (and resistor) to base. Worked great! With 100nF range is 0-2000rpm, with ab 33n 0-10000rpm. The 1K resistor is good idea, anyway, to protect BPW in a case of not proper mounting and/or setting 1,5M pot to 0.