SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By KennyRogers
#199818
Hello,

I have a transducer that I am attempting to sample with a microcontroller(Arduino/Omega/Pi) and I am planning on utilizing a battery to power the device. In order to conserve power, I am trying to shut the transducer off using a series of transistors (more on why I need multiple transistors to do this). My transducer requires 10 to 30 VDC and draws about 1mA. The output is a linear 0 to +5VDC. I initially wired up one BC547 transistor between the transducer and ground. The base was hooked up to a digitial output on my microcontroller which has a 3.0VDC base voltage (so high is 3.0V) Worked well...or so I thought.

However, I noticed that when the +P terminal and the sense terminal of the transducer remained connected, there remained some stray voltage in the sense wire (about 11.5VDC). The target board that I plan to use is only 3V tolerant on the analog read pins, so I had to step down the 5VDC output with a resistor-based voltage step down, but with the stray voltage present, it is about 5.5 VDC...not good. Plus, I figure I am wasting battery is there is stray voltage with drop from my battery (about 12.5VDC depending on charge).

I modeled up my circuit in Fritz...see below. I was thinking, if I cut the +P lead on the transducer, then the sense wire will drop to nothing since there would be no input power. Sounded great. I used a PNP transistor (S8550 PNP) and set the negative voltage from the BC547 side to the base of the S8550, however it still leaks current and I have a small amount of voltage being sent to the transducer.

Image

Let's put it this way, I know I have something wrong, but I am not seeing it. Any input from the group would be awesome. BTW transistors can get really hot if you hook them up wrong...similar to temperature sensors .
Image

THANKS in advance!
By KennyRogers
#199830
Yeah, I actually used a high side and low side transistor in an effort to cut both the positive and negative power. I see my pictures didn't load properly. I will attempt to correct that. Not sure what happened.

Here is a link to my original layout: https://i.imgur.com/qdTP6KY.png

Picture attempt #2:
Image

I made some headway...as I was spacing out today, I questioned how the transducer was grounded. It is made of metal and I figured that possibly they tied to ground. Well it wasn't, but what I did find out is that there was voltage leaking back through the sense wire when the +P side was plugged into power and the ground/-P was disconnected. I initially placed a diode on one leg of the -P cable and that worked, however I still had some stray current at my sense wire - not good.

So finally I wondered if in some way this thing is kind of like a reversed polarity ground. On a side note, I have worked with a number of transducers and I not know what blackmagic is inside this particular sensor, but I do know there is some circuitry inside of it. Turns out that when I disconnect the positive/+P side, the whole sensor turned off; no stray voltage either. So I set up a high side transistor switch to cut the positive/+P side. That did the trick.

However, since this thing runs off of 12.5VDC, I had to use a voltage divider to get the negative charge to close the high side transistor. BUT the controller digital I/O only outputs +3.0VDC on high, so I used a low side transistor to switch the ~-1.0VDC to switch the high side transistor. I am going to look into using an H-bridge and some voltage regulators to cut power consumption since I know the voltage divider can be quite inefficient.

Here is the latest iteration: https://i.imgur.com/0IIsHhS.png
Image

My only concern now is that in Sleep mode, I believe the controller sets the GPIOs to float mode since this produces the lowest power consumption state.
By UhClem
#199831
That image is not nearly as useful as an actual schematic. For example, what is the sensor part number? I looked up the part number shown and that is a 5VDC part.

The circuitry inside the sensor will not disconnect from its positive supply just because you removed its ground connection. So it could still pull its output up to the supply voltage. Which would be bad since the micro-controller has input protection diodes to clamp the input voltage to its power rails. So the sensor will forward bias the diode between the input and the micro-controller Vcc.

That protection diode is also why you need the NPN driver to control the PNP high side switch.
By jremington
#199845
Fritzing diagrams are misleading, confusing, often wrong and usually a horrible waste of everyone's time.

Yours is no exception. Please post a hand drawn schematic diagram of your circuit, with parts labeled by type and value. Indicate E,B,C or D,S,G for active components.
By KennyRogers
#199883
I should probably take a step back and give some detail. I figured Fritzing was an easy way to display the information and figured a hand drawn sketch might be too messy (my handwriting is terrible). The transducer is nothing that is readily off the shelf, though it outputs 0 - 5VDC and requires a 10 to 30VDC input power. I have a separate power supply for the transducer (since it requires much more power) and power for (what I will call) my data acquisition system to measure the sense terminal of the transducer. I am attempting to reduce overall power consumption by disconnecting the transducer device since it draws a little over 1mA.

I am definitely not an EE, so I may be heading down an entirely wrong path with using transistors to accomplish this particular task. If there a better solution I am definitely open to it.

I will work on developing my existing circuit and get that posted.
By jremington
#199907
That won't work.

The NPN transistor is arranged backwards, with C and E swapped. It could be destroyed and might take the microprocessor with it, by feeding 12V into an output pin. See reply #1 for the correct way to connect it.
By KennyRogers
#200188
jremington set me straight. Thank you! Definitely had the NPN backwards. I was getting very confused, but I found the source; the C, B, and E pinouts on the transistors are NOT in the same order on the BC547 and the SS8550. However, in Fritz they are identified in the same order for the PNP and NPN. I had my circuit working good, but this was causing me to interpret it incorrectly. Thank you again for your help and guidance.