Quantcast
Viewing all articles
Browse latest Browse all 30322

Final review before ordering

I'm retired these days so I have time to do what I want Image may be NSFW.
Clik here to view.
:slight_smile:
and I have 40+ years of getting answers from folks to pay forward ...

Yes, in fact here is a quick schematic of both for discussion:

the voltage divider is 168 ohms over 5V so 29.7 and change ma flowing. Thus we see 2.9 V at the 100 ohm resistor and 2.01 V across the 68 ohm resistor with 5V (and of course 0V at both and no current when 5 V goes away). So the micro input sees between 0 and 3V and is happy. You are correct, the CPU in the MKR 1000 has lower output drive, I think 8ma minimum from the data sheet. That is more than enough for the 2n2222, the value of importance is hfe (or current gain) at 50ma collector current it is at least 70 which means it will sink 70 times the base current. So 5ma in to the base will mean the transistor could sink up to 350 ma and we only need 50ma so 5ma would be lots of drive and not strain the cpu pin. Now we need to calculate the base resistor value, the emitter base junction will take about .6v of the 3.3v input leaving us 2.7v across the resistor. So if we choose a 470 ohm resistor (rather than the 330 shown) we get around 5.7 ma of base current and everybody should be happy. The diode across the relay coil absorbs the inductive kick when the transistor switches. If you replace the relay with the buzzer (which isn't inductive) you shouldn't need the diode.

Peter


Viewing all articles
Browse latest Browse all 30322

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>