0

To preface I am a software developer, not an electrical engineer so please go easy on me as there are likely gaps in my knowledge here.

I am utilizing an nrf52832 SoC (specs: https://github.com/redbear/nRF5x/tree/master/nRF52832) to send sensor readings over bluetooth. My sensor is a MaxBotix MB1043 HRLV-MaxSonar-EZ4 (datasheet: https://www.maxbotix.com/documents/HRLV-MaxSonar-EZ_Datasheet.pdf) I want to set a pin high on the SoC to turn on the sensor.

My initial research shows that a 2N2222 Transistor with a 1kOhm resistor would be appropriate for this task.

Updated from feedback:

schematic

simulate this circuit – Schematic created using CircuitLab

My question is: Is 2N2222 appropriate and is a 1kOhm correct (based on rule of thumb from my research) or can a more precise value be calculated here that would be better? Does my circuit look correct?

Thanks!

SHeinema
  • 103
  • 3
  • 3
    Not exactly. You might want to hook up the V+ of your sensor to your AA battery (+) side and move the Q1 collector to the GND pin of your sensor. To start. – jonk Oct 18 '17 at 23:01
  • 1
    Continuing what jonk said, this way when you turn Q1 on, you'll just short V+ to Ground through Q1. – Wesley Lee Oct 18 '17 at 23:02
  • Thank you both, how silly, that seems very obvious on second look. I have updated the diagram. Am I on track with the transistor/resistor selection? – SHeinema Oct 19 '17 at 15:12
  • 1
    A MOSFET would make a much more appropriate switch than a BJT. If you can use active low instead of active high, this would be trivial. The circuit you have now is pulling some hard to define current out of the ground pin on the sensor (based on the unknown/unstable Hfe of Q1). – evildemonic Oct 19 '17 at 15:28
  • Makes sense to me, thanks. Does the IRF540 I selected seem appropriate? The datasheet has min threshold voltage @ 2V, max @4V. I'm measuring P1 @ 2.7V when high. And am I correct that I no longer need a resistor here? – SHeinema Oct 19 '17 at 21:05
  • 1
    That looks like it would work, however, I would put a resistor (maybe 10KΩ) from the gate to GND to ensure you can turn off the MOSFET completely. – evildemonic Oct 20 '17 at 19:40
  • 1
    @SHeinema, you need the 10k pull-down resistor between the MOSFET's gate and GROUND to ensure that V_GS is, by default, "pulled down" to 0V (V_GS=0V) when the microprocessor's digital output pin is not actively driving either a logic LOW or a logic HIGH onto the gate (e.g., during boot up). – Jim Fischer Nov 14 '17 at 07:38
  • 1
    @SHeinema, the gate threshold voltage V_GS(TH) is where the transistor just begins to conduct current through the drain-source path (e.g., I_DS=250 uA). The IRF540 is spec'd as 2V <= V_GS(TH) <= 4V. So it could be that with V_GS=2.7V, the IRF540 will only just begin to conduct and it won't fully turn on; it won't be operating in triode (a.k.a., ohmic) mode (which is desired). My suggestion is to find a part whose "gate charge vs. gate-to-source voltage" graph has its Miller plateau (the horizontal part of the curve) at or below the microcontroller's digital output V_OH spec. – Jim Fischer Nov 14 '17 at 07:48
  • 1
    @SHeinema, you might consider this part: INFINEON/International Rectifier IRL3103PbF (PbF = lead free). Newark.com SKU# 63J7752. Caveat: I have not tested/used this part myself, so I can't offer any experience-based opinions regarding its suitability for your project. – Jim Fischer Nov 14 '17 at 08:13

0 Answers0