Timeout (again)

friis

Senior Member
Hi AllyCat,
Thank you for your remarks. I have checked the power consumtion 08M2 and get the following:

pause M16 1.14 mA
K250 0.27 mA

sleep M16 0.07 mA
K250 0.07 mA

So it seems that the job is to reduce the power consumption of HC-12 and the H-bridge/valve.

I am trying a transistor switch for that - without much luck so far.
torben
 

inglewoodpete

Senior Member
Hi AllyCat,
Thank you for your remarks. I have checked the power consumtion 08M2 and get the following:

pause M16 1.14 mA
K250 0.27 mA

sleep M16 0.07 mA
K250 0.07 mA

So it seems that the job is to reduce the power consumption of HC-12 and the H-bridge/valve.

I am trying a transistor switch for that - without much luck so far.
torben
I'd suggest a high-side switch. The HC-12 needs up to 200mA, depending on transmit power level, but can work OK down to 3.2 volts. So a small signal NPN (Eg BC548 or equivalent) driving a slightly stronger PNP (Try a BC327 or equivalent) should do the trick.
HighSideSwitch.JPG
 

AllyCat

Senior Member
Hi,

Yes, those current drains look about right. The 70 uA during sleep is probably because some hardware functions on the chip are still active, for example the Watchdog timer and Brownout detector. There are other functions such as the FVR and Comparators, etc. which might be active, but it's not clear (to me) which are included in the datasheet specification, or enabled/disabled by the PICaxe OS firmware.,

If you want to switch the HC12 supply, then certainly a high side switch is highly recommended, but a simple NPN emitter follower might be sufficient if the PICaxe is being supplied by 4 volts or more. However, the HC12 does also have an "ultra low power" mode (but not at 9600 baud, or for a high data throughput) and a "Sleep" command, but NOT a "Wake Up" command. So to wake up the HC12 you need to activate its command pin (or whatever they call it) and observe the specified delay periods (40 ms, If I Recall Correctly).

Cheers, Alan.
 

friis

Senior Member
Hi inglewoodpete and AllyCat,

I am at the moment looking at activating a H-Bridge/valve and for that I need the high-side switch.
Can one say something about the values of R1, R2 and R3 when the load resistance is 5 kOhm? Actually one of the H-Bridges I might use shows OL for the resistance between the + and - terminals.
I think that I have cooked some transistors and would like to start with reasonable values.
torben
 

inglewoodpete

Senior Member
Hi inglewoodpete and AllyCat,

I am at the moment looking at activating a H-Bridge/valve and for that I need the high-side switch.
Can one say something about the values of R1, R2 and R3 when the load resistance is 5 kOhm? Actually one of the H-Bridges I might use shows OL for the resistance between the + and - terminals.
I think that I have cooked some transistors and would like to start with reasonable values.
torben
I would use a 1k to 4.7k resistor for R1. Try 4.7k for R2 - this can be reduced as low as 1k if Q2 does not turn on sufficiently. R3 is just to ensure that Q2 turns off fully, so I'd use 10k.
 

friis

Senior Member
Hi AllyCat,
I have bought two variable resistors and I get as optimum:

R1 = 4.12 Ohm
R2 = 0.375 Ohm
R3 = 10 kOhm

Entrance to Q3 when Q3 is shut off: 4.59 v
Entrance to Q3 when Q3 is open: 4.13 v
Exit from Q3/entrance to load when Q3 is open: 4.13/0.001 v

I am loosing 0.46 v in Q3. Is there anyway I could avoid that? If not, I shall have to use a step-up converter to make sure I have enough voltage even when the batteries get weak.
torben
 

friis

Senior Member
Hi AllyCat,
Please disregard the previous reply. Here is what it should have been:

I have bought two variable resistors and I get as optimum:

R1 = 4.12 kOhm
R2 = 0.448 kOhm
R3 = 10 kOhm

Entrance to Q2 when Q2 is shut off: 4.59 v
Entrance to Q2 when Q2 is open: 4.34 v
Exit from Q2/entrance to load when Q2 is shut off: 0.001 v
Exit from Q2/entrance to load when Q2 is open: 4.11 v

I am loosing 0.48 v in the system. Is there any way I could avoid that? If not, I shall have to use a step-up converter to make sure I have enough voltage even when the batteries get weak.
torben
 

AllyCat

Senior Member
Hi,

It wasn't actually my circuit or recommendations, but those resistor values look "about right". Probably any values between 2k2 and 10k should be fine for R1 and R3. R2 is the only slightly "critical" value and is normally chosen to deliver between 1/10 and 1/20 of the collector current of Q2 into its base. However, you haven't told us what is the maximum collector current in Q2, nor which device you're using.

100 mA seems to be a commonly quoted maximum drain of the HC12, but Pete has suggested 200 mA, so perhaps we should assume at least a 10 mA requirement for the current in R2. It will drop about 4 volts (the remainder is mainly the Vbe of Q2), so a value of about 400 ohms looks right (personally I'd just shove in a fixed resistor of 390 or 470 ohms).

So now you need to choose a SUITABLE PNP transistor (or logic-level P-channel FET) for Q2. Looking at the data sheet for the BC558, the "saturated" collector-emitter voltage drop is only specified as <650 mV @ 100 mA, so is probably NOT good enough (and is consistent with your "losing" 480 mV). A BC327 as suggested by Pete should drop something nearer to 100 - 200 mV, or if you want lower then maybe look at the BD series such as BD132 (or some subsequent even numbers). Or "go the whole hog" with a modern logic-level MOSFET (at some time I put the data for an AO4409 in my folder, but I've never used it).

Cheers, Alan.
 

friis

Senior Member
Hi AllyCat,
Right now the load is an H-brige/latching solenoid valve. The whole equipment draws 260 mA when a pulse is sent to the bridge/valve. The valve draws 255 mA when a pulse is sent.

Code:
                        No pulse            Pulse
                        v                   v          mA
Q1       Base          0.000               0.727
         Coll          0.056               3.098

Q2       Base          3.868               3.446        7.25
         Emitt         4.590               4.300        257
         Coll          0.001               4.100        257
My question is: Can I get Connector = Emitter voltage given the equation Ic = Ie - Ib or will I always have to accept a difference? How small can I get it? Is it worth going for the last 0.1 v?

(The [code],[/code] tags did not work).

Fixed that for you - probably a mix of tabs and spaces in there

torben
 
Last edited by a moderator:

AllyCat

Senior Member
Hi,
Can I get Connector = Emitter voltage given the equation Ic = Ie - Ib
That is a CURRENT equation so can tell you little about voltage drops. What Q2 are you using?

You will need a fairly decent power/driver transistor for 255 mA. The data sheet should give typical Vce "saturation" voltages or Vce/Ic graphs for say 10 mA base current.

Cheers, Alan. (from my mobile phone)
 

inglewoodpete

Senior Member
My question is: Can I get Connector = Emitter voltage given the equation Ic = Ie - Ib or will I always have to accept a difference? How small can I get it? Is it worth going for the last 0.1 v?
You have remember that any transistor is a SEMI-conductor, so will never have zero resistance. As Alan says, very low 'on' resistance can be achieved with a suitable MOSFET but selecting a suitable one can be a challenge.

I've only done a speed-read of this thread and didn't find details of the power source voltage you are using for your project.

I had not seen the AO4409 MOSFET before. It looks like a good performer but needs a Vgs of about 4v to get a very low 'on' resistance. It is also only comes is a surface mount package, which makes it a little more difficult for experimenters/hobbyists to use.
 

friis

Senior Member
Hi AllyCat and inglewoodpete,
I have settled for:
R1 = 4.7 kOhm
R2 = 470 Ohm
R3 = 4.7 kOhm

With that I get a consumption of 10 mA when the valve is activated and between 0.10 mA and 0.60 mA when it is at rest. I get that with a frequency of k250 and using Pause.

If the consumption of the valve is ignored that should give a consumption of appr.
0.60 x 24 x 30 x 7/1000 Ah = 3 Ah for a year. That should be alright.

I am now using a 3v valve.

Thank you very much for your help.

torben
 

AllyCat

Senior Member
Hi,
.... should give a consumption of appr. 0.60 x 24 x 30 x 7/1000 Ah = 3 Ah for a year. That should be alright.
A "year" of 7 months. ;) Presumably the "cold" ones, or when there's insufficient solar power?

Don't overlook the "self discharge" of some cells. NiCd, NiZn and NiMH rechargeables are particularly poor (the "hybrid" LSD type are rather better). Primary Alkaline and Lithium types should be fine of course, but not very "green".

BTW did you see this recent thread on the forum ?

Cheers, Alan.
 

friis

Senior Member
Hi AllyCat,
Yes, it is for a watering system I use it - hence the 7 months.

Power consumption is a rather complicated issue. I think, however, that I am safe using k250 and Pause. Incidentally, fernando_g's power consumption of 0.15 mA for k250 is'nt far from mine of 0.10 mA.

I am using 3 C-type batteries which contain about 8000 mAh. I may be able to get away with smaller batteries - experience will have to show. I need to get something up and running.

torben
 
Top