I designed a prototype circuit for my MSP430 and other components. It is powered by two voltage regulators and a current source. What confuses me is that after I remove the battery power (4.2V) from the circuit, it does not turn all the way off. V+ drops to 500mV and then drops so slowly that it seems permanent. After 5 minutes, it's still 350mV. Is this normal behavior?
I am a newly graduated bioengineer trying to do the job of an EE, so I'm sorry if this is a totally stupid question. I have no idea what is happening! I have an experimenter's board from TI (that I copied very closely for my circuit, especially the decoupling capacitors), and it does not do this. I am tempted to just add a huge resistor between V+ and V-, but I figured that that would be a bad plan.
Any help is much appreciated!
Could you post a schematic of your circuit with the components labeled and a bill of materials? With those things it will be a lot easier for us to help you determine why this is happening.
Thanks. Give me a little time, I'll take a look at them and see what I can find. The 500mV is probably a good clue.
My first thought is there may be something where the bulk of the voltage is dumped through a Schottky diode until it reaches its cuttoff point (near 500mV), but then there is a very slow leakage through it after that point that is dragging it down further after several minutes to the 350mV.
You are doing pretty awesome in my opinion if EE isn't your major. Your large resistor idea may not be silly at all, it all depends on the application and what's important to you.
Thanks for taking the time to look at it. As you'll see in the schematic, I don't have any diodes in the circuit, but any of the IC's could certainly contain something similar. Thanks for the compliment; I'm doing my best. With the large resistor, my biggest concern is losing power. Battery life is critical and it is already consuming around 55mA (204mW). I suppose, however, that a 10 Mohm resistor would only consume 1uW of power (while the power is on at 3.7V). I've just never seen that solution in a professional circuit, so it makes me nervous.
The constant current draw (even if it is small) was going to be a question I had for you regarding "what is important to you" in your design . There can be clever ways around the "constant" nature of the current bleed off as well.
I noticed there were no diodes present externally in your circuit. I was going to pick through the LTC3531 and NCP5030 datasheets to see if they show any diodes on the input voltage pins. Often things like that are placed there by manufacturers for IC protection schemes against over-voltages and such things (although they aren't always show in the datasheet).
It might not even be necessary to worry about any of this though, I suppose you should ask yourself a few questions up front to determine if you should.
Depending on how you answer these questions I can try to help you find a solution suitable for you.
On a side note I noticed that you have separate regulators for the LCD output and the MSP430. Are these different voltages entirely, or did you just do this because you wanted to be able to shutdown the LCD rail without shutting down the MSP430 rail?
Looking at the two regulators' datasheets, I don't see any internal diodes. Only op-amps and transistors.
1. The reasons I am worried about it are that (a) it's just odd and (b) I wonder if it could cause other problems in the circuit. Are there any issues that you know about that this could cause? The truth is, if you don't think that it will cause any problems, I can keep it as is. It just worries me and always pops up in the back of my mind when some part of the circuitry isn't working right...could it be the remaining voltage?
2. I am estimating the consant current draw to be 0.05 uA. I can't imagine that making any discernable difference. So...no.
3. I would be happy to modify the schematic if I could design a more elegant solution. This is not my final PCB for this device and I have other changes to make regardless.
You guessed it right on the two separate regulators. I want to be able to turn the LCD off when I put the MSP430 in extreme sleep mode.
Sorry it took me awhile to respond, I got a little sidetracked at work with something else.
The catch is that anytime you look at the "internal schematic" of the IC in a datasheet it's basically always a simplified block diagram. In other words it's the 30,000 foot view of how it works, just a black box representation. Any of the blocks, op-amps, comparators, etc are actually built out of transistors, and there are most likely other things not shown at all.
I don't think you need to be concerned about it anyway, in this case finding the cause may not be necessary and you can just treat the symptom if you've determined it's an issue. I just wanted to look at whatever internal schematics they provided to see if there was that "ah ha" explanation (I couldn't find one either ). The MSP430 design you took this from was optimized for extreme low power, so it's not surprising that they have eliminated as many current leakage paths to ground as possible which would of course include pull down resistors.
How you approach a solution depends mostly on what you would prefer.
You could just take the "if it ain't broke don't fix it" mentality. If you haven't found the voltage floating above ground after the battery is disconnected is a problem, and if you can't think of any reason why it would be, you could just make a "caution" note about the behavior and assume all is well until proved otherwise. I don't see any issue with it since the battery only appears to be connected to the Vin pins of the 3 regulators.
If you don't like leaving an unknown and can live with the Mega Ohm pull down to ground leakage, then go ahead with that. Whether it matters or not depends on your battery capacity. If you are using an ultra small uA hour capacity battery for something like an energy harvesting wireless sensor node, then an extra 50nA might be lot of current to have when everything is otherwise in sleep mode. On the other hand, if you have a hundreds of mA hour battery then the 50nA is irrelevant.
If you do have a very small capacity battery and therefore don't want the constant leakage you could make clever use of a different kind of switch in place of the one you have now for the battery. I didn't see the switch listed in your bill of materials, but if your schematic is true to life then it looks like a SPDT (single-pole double-throw). If you instead switched this to a DPDT (double-pole double-throw) you could add a pull down to ground connection for Vin when the battery is being charged instead. See the attached connection diagram for a DPDT wired like I'm describing to get the basic idea. If you wanted to go this route I could help you pick an appropriate switch.
The only reason I mentioned the two separate regulators was that if they are set for the same output voltage and you can get enough current out of one of them to power everything (MSP430 and LCD) then you might be able to replace one of them with just a single MOSFET. By that I mean you might be able to use a logic level MOSFET as a power cutoff switch for the LCD instead. It was just something I noticed that you might want to consider.
Does this answer your original question at least? If not, or if you have other questions or need other help, just let me know.
Using a DPDT is a brilliant solution! Thank you VERY very much for your help. My battery is a 2000mAh, so I can just stick on a huge resistor for now and it should be fine. However, when I order the next round of components, I think I will opt for the DPDT switch because it seems like a better solution and would help me sleep at night.
Would using a MOSFET to turn the LCD off be a more efficient setup? I thought about that, but I already knew how the regulator worked and I haven't ever used a MOSFET. I am attaching my best guess as to how that would be implemented. My only concern is if there is a voltage drop across the MOSFET, since my regulator puts out 3.3V and my LCD needs that exact voltage.
And yes, you answered my original question wonderfully. Thank you.
Your picture is pretty close to the right idea but not exactly correct. It's a matter of understanding how the Gate voltage needs to be referenced to the Source voltage and whether you would be using a p-channel FET as a high-side (what you show in your drawing) switch or an n-channel as a low-side (what would probably be the better option) switch. I can explain all this to you if you want, it's not nearly as confusing as I'm probably making it sound, I promise.
Using a MOSFET instead isn't so much about efficiency, I just thought you might like the idea of exchanging the second LTC3531 IC, its inductor, and its input and output capacitors for a single FET instead. More of a saving cost, board space, and complexity sort of benefit.
Any drop in efficiency will correlate directly with the amount of current the LCD draws and the "ON" resistance of the FET used. This drop could be miniscule though, as low as a small fraction of a percent depending mostly on how good a FET can be found for the task.
MOSFETs are fairly easy devices to understand and work with if they are simply going to be used as an ON/OFF switch. The most limiting factor for finding a really good (low "ON" resistance) FET is likely to be the 3.3V GPIO voltage from the MSP430, but that may not even be an issue depending on the current draw of the LCD.
Do you know what the maximum current draw of the LCD is? Not including the backlight of course.
If you can tell me that, I can point you toward a suitable FET and explain everything you would need to know to try it. I promise it's very simple once you understand a couple of basic things about how they work .
I just reviewed the LCD's datasheet, and it only takes 0.1mA to drive it (not including backlight). Wow, now that you mention that, I realize that we could probably just run the LCD straight from an I/O port on the MSP. In that case, we wouldn't even need a MOSFET. But if the I/O port thing doesn't work for some reason (can you think of a reason it wouldn't? The MSP says it can put out 5mA per pin), then a MOSFET makes sense. I agree that one simple FET is preferable to an IC and three passives.
There is, however, another place in a separate circuit for this project that I had been wanting to use a MOSFET. On this other circuit, I have one voltage regulator (same LTC3531) powering another MSP430 (1-2mA), a radio (17mA), and a wheatstone bridge (9mA), all at 3.3V. I would like to be able to turn the wheatstone bridge off when I put the MSP430 in sleep mode. For this I have been thinking of using a FET. Do you think that this would work? If the voltage into the bridge is closer to 3.2 or 3.1V, that's not a big deal. The biggest key is that the voltage into the bridge must remain as constant as possible, since every fluctuation introduces error into the bridge's output. Here is the schematic for the other circuit. I could definitely use some guidance as to: (1) does it make sense to use a FET here?, (2) can you point me to a suitable one?, and (3) can you show me very briefly how to put it in the circuit? In the last diagram I put up, I thought that picture was an nMOSFET when I used it. Ha, just goes to show how much I don't know about transistors.
I am sorry for the endless barrage of questions. You have no idea how helpful you've been.
That picture seems way too small, so here's a link to the pdf if you need it: https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BwYnpXVl5WiNMjg1NTNkMWEtMzNiYS00ZDY0LWFjMWItNmQ5MjdmM2U4ZmNk&hl=en
Wow, I was thinking it would be tens of mA at least when it was running, but if the LCD current is really that low then I don't see any issue at all with just driving it directly from a GPIO, no extra regulator or MOSFET should be necessary. 100uA seems unreasonably low to me, but I don't look at LCD screens often enough to know how low power they can get. Do you have a part number for the LCD itself just so I can take a look? I Only see the connector listed in your BOM.
Since a Wheatstone Bridge takes a differential measurement, and the MOSFET resistance would be common to both legs of the bridge, I would think using a MOSFET to cut off the current path through it should be possible without much, if any, negative effect on the accuracy. (1) That makes plenty of sense to me. (2) Yes I can. The IRLML6344 is a cheaper one in a common package that should work in your application. (3) Yes I can , see the attached schematic picture.
Actually, your previous picture does show one of the less common but valid ways to draw an n-channel FET. When I said, "what you show in your drawing," I was only referring to the fact that you show it connected in a high-side manner, and in your circuit that wouldn't have work properly with an n-channel. It would have with an appropriate p-channel FET, but the logic would be reversed (GPIO low would turn it "ON"), and that might not be okay when you put the MSP430 to sleep.
There are a couple of other things I noticed that you may want to consider for the accuracy of the Wheatstone Bridge and instrumentation amplifier though.
Don't worry about the "barrage" of questions. So far I've understood everything you've asked and why, and that's often a luxury in my line of work . If you need me to I can explain the basics of how to use MOSFETs as switches in more detail assuming my ramblings so far have left you confused. If anything else is unclear or you have other questions just let me know.
Yes, 0.1mA seems really low to me, too, but my previous LCD's datasheet says that it runs on 147uA and I was able to run it from a GPIO no problem. I wish that I could manually check the current, but unfortunately that part of the circuit is too deeply buried to disconnect and measure the current. It's a CrystalFontz LCD (CFAO14464A2-TFH). Here is a link to the datasheet; you are more than welcome to check it:
The diagram you sent and the MOSFET you recommend make perfect sense to me. I will be ordering some in our next Digikey order. I see what you mean about making the FET a "low-side" switch (I obviously didn't quite get this idea before). Thanks! I will try it and will let you know how it works.
1. The blank spots are indeed for sensors, as you guessed. I have four strain gages placed on a force sensor that I am trying to read. That is why I could not use a single IC package, since the strain gages have to be placed directly on the metal in four particular places. Thanks for the recommendation.
2. You make a very good point about potentiometers that I had not known. The one setting the INA's gain has already been replaced by a resistor, so that's not an issue. However, I was planning on leaving the one that balances the bridge in the final production circuit. The problem is that the reason that we have a potentiometer is because all of the strain gages are slightly different, so the resistance needed to balance them every time is different. I'm just not sure how we could balance it without doing it manually every time. I will have to think about that.
Thanks for posting the link. I see the 100uA listed in the datasheet. I asked one of the other engineers here at Digi-Key and he says he has used small LCDs with that level of current draw and powered them directly from an MSP430 GPIO pin without any problems.
I've never heard of a Wheatstone Bridge that just used 4 sensors and no known fixed resistors. I could certainly see why that would require the potentiometer to manually balance the bridge if the strain sensors vary (not surprising at all) in their unloaded resistance. I'm not sure there would be a more automated way to do that balancing without adding a lot of complexity (current sense resistors, current sense amps, digital potentiometers, etc.) to the circuit. It's just something to keep in mind in case regular calibration maintenance is required to prevent measurement error, which could be due to changes with the potentiometer and/or sensors over time.
Anyways, I wish you luck on your project. If you need anything else you can always post again.
I will definitely be keeping the potentiometer issue in mind. It will at the very least shed some light if we have problems with the calibration later on.
Again, your help is really appreciated. You've unstuck a lot of uncertainties I had in my circuit.
I am an oldtimer, but I like to add 2 comments
1. If that was correct on the test board, check what is the difference, considering the layout of the components.
2. A point many neglect, using part of the print (ground) for two different circles, forgeting voltage drop influance one upon the other.
If that helps - I am happy.
I meant that there is a point of voltage drop across the print of 2 Trn. circuits, apart on the board, Emitters to Grnd. on the same print line. Now, each produce a few millivolts between the emitter and the ground point, if one part of the print takes both currents, and the other one carries only its own current, this one's ground is not ground anymore because of the voltage drop from the first emitter. A few millivolts, but I have seen already there might be some how an amplification resulting changes of hundreds of mV.
I hope I explained myself.
The LCD specs 3.0 to 3.6 v for the Logic supply voltage and also 10.0 V for the “glass”. I guess the 10v is just a bias?
The MSP430 MCU can source or sink 6 mA for a GPIO pin, but specs the Vout at Vsupply -0.3 volts - which might put it out of spec for the LCD logic supply. I doubt that if will drop that much at only 100 uA, but it’s something to look at.
Good question. I am not sure what the deal is with the 10V, I only know that we haven't been supplying it and the LCD seems to create it on its own.
The 0.3V drop out of the I/O ports does make me a little nervous, but it should work fine. We are supplying the MSP with 3.3V from the voltage regulator, so 3.3-0.3V means 3.0V out of the I/O ports. It's not great that it's at the very edge of the acceptable input range for the LCD, but it *should* work, right? Do you think that's a bad design choice to cut it so close?
Well, it's a marginal design. I would test it and measure the actual voltage at the low current draw, to give you some confidence in the design margin - maybe even over tempterature, if you can.
The liquid crystals in the display typically require more than 3v or so to work properly. Your particular LCD assembly seems to include a charge pump, to develop that 10V from the 3V or so required by the logic circuit--makes for a very handy setup--much more handy for the user than asking them to procure a separate 10v supply...
As for the margin on the voltage, I think you'll be OK. You mentioned that the I/O pin voltage output spec is Vcc-0.3v, which I'm guessing is specified at some current draw significantly greater than 100uA. The I/O pin output transistors in the MSP430 (and most any other transistor for that matter) exhibit an increasing voltage drop with increasing current flow. Draw less current from the pin than the value given for the output voltage specification, and it's reasonable to expect the minimum "high" output voltage of an I/O pin will increase somewhat.
As to whether or not such an arrangement is a bad design choice, the universal answer for engineering questions is applicable here: It depends...
What are the consequences of the circuit not working properly? What conditions might cause improper operation and how likely are they? Is the risk acceptable, in light of what you stand to gain by doing it that way? If you're talking about life support or flight-critical systems, it's probably a terrible idea. If you're talking about cheap promotional trinkets that will sell for $0.25 and aren't expected to last for more than 2 minutes of use, it's a fantastic idea.
Assuming that the circuit will be operating at room temperature or thereabouts, and that anomalous operation is most likely an operational inconvenience rather than a grave hazard, I think its a clever solution. Something to be mindful of however is that digital circuits can both generate and be sensitive to noise on supply rails. The signal on the I/O pin could contain small glitches/spikes that may cause the LCD's controller IC to do unexpected things. One means of mitigating such effects might be to put an RC filter between the MSP430 and the LCD. 5 ohms and 10uF might be a good choice.
Thank you, Jim and Rick. Your responses are very helpful!
I will actually try the possibility of running the LCD voltage from an I/O port. I agree with your statements that the voltage probably won't drop all the way to Vcc-0.3V, since the current draw will only be 0.1mA. I am going to try it and see how it goes. Good suggestion of using an RC filter. I just have a (probably stupid) question about this: why would a bypass capacitor not perform the same function as the low-pass filter that you mention?
The consequences of the circuit not working properly are the same as an ipod, as an example. It's not life-or-death, but it needs to work consistently in reasonable outdoor temperatures. So...somewhere in between the two scenarios that you posited. I'm asking myself your question: what conditions might cause improper operation? All I can think of is: in extreme temperatures, output pins cannot source/sink as much current. But my current needs are nowhere near the limit, so I don't think that will be a problem. If the temperature is so hot or cold that the microprocessor starts to shut down, then it makes no difference what the LCD does. So, I am going to assume that it is a fine shortcut, until something tells me otherwise.
I have one more question that is unrelated to this LCD-powering question, but regarding a topic earlier in this thread. Alec recommended a low-side MOSFET switch to turn my wheatstone bridge on and off. I have bought some FETs and tried this out, and it worked like a charm. I have two other components that I would like to be able to turn on and off with the bridge: an INA and an op-amp. What I am wondering is: can I connect their ground pins to the MOSFET drain as well? It makes sense to me that I could do this, but it does make me a little nervous to apply a voltage to the power pin of an IC and not apply ground.
Thank you for your help!
Regarding the bypass cap vs. lowpass filter matter, they're sort of the same thing; a bare bypass cap just relies on parasitic impedances (inductance & resistance of PCB traces, device output resistances, etc.) as an element of the filter, whereas an RC filter makes that series element an explicit component. Because there's usually not a great deal of parasitic impedance available, it's difficult to get a filter with a long time constant using just a bypass cap. Since the noise you're trying to exclude is typically generated as a result of current flows through nonideal circuit elements, it's likely to have a spectral content that'll be difficult to eliminate using a filter that relies on those same circuit elements. By adding the resistor, you can make a filter with a 3-dB frequency of, say, 10 kHz, rather than 10 MHz.
On the power-from I/O pin matter, take a look at what the measurement conditions on the output voltage spec are. If the spec is guaranteed over a temperature range, you should be good to go over that temperature range. If it's only at room temp, you might have issues, since the saturation voltage characteristics of transistors tend to move a bit with temperature.
As far as disconnecting a power lead is concerned, the question to ask is where the remaining connected leads are going to and whether or not there's any possibility of current flow. Generally speaking, you don't want to apply an input signal to an unpowered op amp, especially through a low impedance, as you can fry the inputs that way. There are usually ESD protection diodes that shunt any input signals beyond the supply rail voltages into the supply rails. They're wimpy though, and you can end up powering a circuit in usuaual ways. If the only thing your analog processing is connected to is a high impedance ADC input, you might be able to get by though I'd advise caution and careful testing. A better option might be to look into an integrated load switch; we have a whole product category full of them, linked below. These should let you power a load on & off from the high side, with minimal voltage drop an only a logic level input needed.
Rick is right on.
Generally, I would not put a FET on the ground terminal of an op-amp as there are bound to be voltages applied to in- and out-puts that might damage and probably would destabilize the device. You could look at the absolute maximim ratings of the amp, but I just would not do that. Dot the amps have a disable pin?
You guys make very good points. The amps do not have disable pins. To be on the safe side, I think that I will use one of the high-side switches instead. Once I started looking at them, I realized that (at least the one I picked) they would make things pretty darn easy. I found this one:
which seems to be just fine for my application. Simple, no external components needed, very minimal power dissipation. I went through the drawing and I think that I even understand how the two MOSFETs inside work together. Do you see any red flags that I might have missed? I am not currently planning on adding external components C1 or R2, unless you think they might be needed to protect the circuit or filter the voltage to the bridge. The bridge MUST have a steady and consistent voltage, but I am assuming that the voltage regulator will be enough to ensure that. Here's how I am envisioning the switch going in my circuit:
As for the LCD powering filter, what you have said makes sense to me. I will try this out in my circuit:
Thanks for all of the help, you guys!
The FDG6331 would probably be a decent choice for a high-side switch. R1 is necessary to ensure turn-off, but C1 and R2 are optional to slow the turn-on time, which is often helpful for minimizing current surges when turning on highly capacitive loads. As for the stability of the voltage applied to your bridge, note that this load switch introduces about 1/4 ohm of series resistance. To the extent that the current drawn by everything downstream of the switch changes, the voltage applied to your bridge will vary. Assuming you have a 10mA variation in current across 1/4 ohm, that's a 2.5mV error in the 3.3v applied to your bridge; roughly 0.07% or slightly less than 1 LSB in a 10-bit measurement. If you need to do better, I'd suggest looking at your options for different reference voltage sources for your ADC. If you can use the actual excitation voltage applied to the bridge as the ADC reference, both measurement and conversion processes will be affected in equal proportion, allowing minor variations in excitation voltage to be rejected.
Good point about the current variation. I hadn't thought about that, though thankfully I don't think that that will be a problem in this case because there should be nowhere near that much current variation. The bridge draws 10mA and the other components total about 0.5mA. The other components are always on and doing the same thing, so there should be almost no current variation with them. The only changing thing would be the strain gage resistors, but their changes might end up at a total of 2 ohm, at very max. 3.3V over 349 ohms is 9.46mA, while 3.3V over 351 ohms is 9.40mA. Now we're talking a 0.06mA variation across the 1/4 ohm transistor, which only gives me a 0.01mV error. Looks negligible to me. Am I right?
The error due to bridge resistance variation causing changes in voltage drop across the switch is, by itself, probably negligible, since a 10uV error on 3.3V is much less than 1/2 LSB @ the 12-bit resolution of the ADC on your MSP430. It's not the only error source in the system however, so be mindful of the other ways that errors can creep into your measurement. The input offset voltage of the INA126 varies by up to 5 uV/°C for example, and since that's effectively summed with your measurement, it can become significant if your full-scale differential input is only a few mV.
There's also the question of dynamic current flows: the quiescent current draw of an amplifier is just what the device requires for it's internal biasing; any current leaving its output also comes from the supply rail. If you've got a significant amount of current flowing on a short-term basis, to charge the sample/hold capacitor in an ADC for example, that could add to I*R losses in the switch as well. It's likely to be a non-issue if you're doing low-speed work, but could prove problematic were you trying to do things at high sample rates. What qualifies as "high"? It depends....
All told, I'd say you're on the right track.
Very good advise.
I agree, the 100 uA draw will probably not pull down the voltage much. But it would be prudent to measure it once. As for the suggested filter, the 5 ohms will add only a half a mV drop, so no problem there, but I think a 1uf cap might be big enough for this application - preferably a ceramic. A 5 us filter.