2n2222 circuit not working

Thread Starter

Nik@

Joined Apr 1, 2021
29
I have connected on a pic 16f18346 a sensor BH1750 and trying to control it with a 2n2222 transistor but i fail. I get calculations from some tutorials but i am not sure where i am wrong. The output from the IO pin is measured 4.97vdc. The BH1750 Operating current: 120uA (typ) 190uA (max). Is possible someone to help here with the calculations of the resistors as swon on the schematic please.

1753308555525.png
 

WBahn

Joined Mar 31, 2012
32,703
Even if that's not the case and the module has a ground elsewhere, the TS needs to be sure that the module behaves properly when whatever input that is is left floating.

It would also be nice to know what "trying to control it" means, and what "failing" means.

Providing a link to the parts being discussed, such as this BH1750, would be a bonus, instead of expecting people being asked for free help to go searching out what our best guess is that they mean.

If it's the BH1750 that I tracked down, this it's far from unclear what two pins are that he is pulling down with that transistor. About the only possibility, though, is that he is hard shorting the module's 3.3 V output to the module's ground, and then either pulling them both down to the microcontroller's ground or letting them float. Of course, doing either of those makes zero sense, but that's the best guess I can make since my mind-reading skills aren't up to what the TS is expecting.
 
I have connected on a pic 16f18346 a sensor BH1750 and trying to control it with a 2n2222 transistor but i fail. I get calculations from some tutorials but i am not sure where i am wrong. The output from the IO pin is measured 4.97vdc. The BH1750 Operating current: 120uA (typ) 190uA (max). Is possible someone to help here with the calculations of the resistors as swon on the schematic please.

View attachment 353147
Lower R7 to increase the bias current.
 

Thread Starter

Nik@

Joined Apr 1, 2021
29
Lower R7 to increase the bias current.
Hi all. Thanks for the inputs. Unfortunately all was a mistake by me. The R7 by some kind of mistake in all circuits was 100k. I messed the bags when i stored them. So now everything works. The puspose of all this was to save a bit battery and then i found that the senso's by themselves have eco modes or they shut down. So i left the approach with the transistor switch and i coded with the eco modes.
Thank you for your inputs and the time you spend, sorry because was a faulty alarm.
 
Top