View Full Version : turn on/off analog sensor
christree
27-01-2006, 02:53
In the datalogger example for the picaxe 08, is there a way to turn on/off the temperature sensor so that it does not use power when the chip is sleeping? The sensor has a direct connection to the + and -'ve terminals with a resistor in series.
Thanks,
Chris
??
________
Homemade Vaporizer Light Bulb (http://vaporizer.org)
christree
27-01-2006, 02:58
To elaborate... I am trying to save power while the chip is sleeping, so I think I need to turn off the temp sensor when the chip goes into sleep mode and wake the sensor when it is time to record data. Can I simply use another pin on the chip as a switch?
??
________
MARIJUANA VAPORIZER (http://weedvaporizers.org/)
kranenborg
27-01-2006, 07:11
Hi
I do not know which particular datalogger you mean (I only know the 18X based), but if the sensor consumes not more than 20mA you can use a PICAXE output as a power supply itself to the sensor; very easy and no other components needed.
I did this for the same reason once (long-term datalogging), see the following link ("Power-saving Temperature Monitor: <A href='http://www.kranenborg.org/ee/picaxe/tempmon.htm' Target=_Blank>External Web Link</a>
Regards,
Jurjen Kranenborg
http://www.kranenborg.org/ee/picaxe
Jeremy Leach
27-01-2006, 07:33
Regarding using a PICAXE output to drive other circuitry - how stable is the output pin voltage compared to the stability of the regulated supply?
I've thought of doing this, but was thinking that changes in current through the output pin might vary the output voltage slightly , which probably wouldn't affect DS18B20 but would other circuits.
kranenborg
27-01-2006, 07:49
Hi Jeremy,
You may have a point here when using analog sensors. I had a look in the pic16F88 datasheet, does Figure 19-19 apply here? If so this means that the picaxe output impedances are quite high and thus the output voltage varies significantly with loading (i.e. output current). So in that case the options are:
1) use an analog sensor configuration that does not put a high load on the picaxe output. This may actually turn up to be impossible: to my knowledge this might imply that (through the sensor circuit design) the resulting impedance of the input connection from the sensor to the picaxe gets too high as well, it should not exceed 10Kohm !) Using other words: since you need some input drive from the sensor this means that a significant sensor drive is needed as well.
2) use the picaxe output instead to drive a small-signal mosfet switch which in turn drives the sensor's Vcc.
3) use a digital sensor like ds18b20 etc. etc. (PS. the 9 mA power consumption I mention in my link is actually incorrect, it is more close to 2 mA, I'll have to correct soon). Note also that many modern I2C based sensors have a very low standby current as well (1 - 10 uA).
Thanks, I learned something again from this discussion
/Jurjen
Edited by - kranenborg on 1/27/2006 7:00:29 AM
Edited by - kranenborg on 1/27/2006 7:05:55 AM
BeanieBots
27-01-2006, 08:09
The output should be almost as stable as the power rail. It has an impedance in the order of 100R which might need to be taken into account for some sensors but will not be an issue with something like a DS18B20 temp sensor.
Maxim also has devices which can be powered "parisitically" - they are powered via the dataline. I've never used them before but as long as the PICAXE is asleep, the sensor should receive no power either, thus lowering power cunsumption.
<b><i>ylp88 </b> </i>
Jeremy Leach
27-01-2006, 14:20
Hmmm ... In my redesign I was planning on doing kranenborg's option 2 because I thought it might be better than driving from the PICAXE output - but since the output of the PICAXE will be mosfet driven anyway perhaps there's little difference (as long as the current demands from the sensors don't exceed the PICAXE output rating.
I'd like to know which one really is the better option - my humidity sensor isn't digital and relies on a stable input voltage.
kranenborg
27-01-2006, 15:11
Hi,
A small correction to my earlier post: the proper figure in the pic16F88 datasheet is figure <b>19-18 </b> (Vcc = 5V, the figure 19-19 is for Vcc = 3.3V)
You should consult this figure to see the loading effect on the picaxe output voltage, and it is a statistical figure. From this figure I calculate an apparent output impedance between 50 and 100 Ohms (variation in this range per device) . This range is valid for Iout somewhere between 0 and 5 mA. Thus a significant impedance is present.
Note also that the impedance of a good small-signal mosfet (my option 2) is much smaller (for example a BSS98 has R_DSon approx. 2 Ohm at Vgate=5V and small Id=5mA)
/Jurjen
Edited by - kranenborg on 1/27/2006 2:18:54 PM
Jeremy Leach
27-01-2006, 15:43
Good point. I'm planning on using a ZVP2106A, which (just checked datasheet) has Rds_on of about 6 ohms at 5V, 5ma (although it's off the graph).
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.