PWMOUT on C.0 and C.2 of a 14M2

I am trying to drive two glow plugs from a model airplane engine. Using a two MOSFETs (IRFZ44N) attached to C.0 and C.2 on a Picaxe 14M2.
I connected the gate of the MOSFET to C.0 and added a 10K pull down resistor. The source connected to ground and the drain to one of the plugs terminals. the other plug terminal is connected to 11.1V. I tried driving only one plug first (see code below)
I tried a wide variety of frequencies and duty values all to no avail. IT DOES NOT WORK. Except when I replace the glow plug with an LED, it will turn on the LED.
Code:
[INDENT=3][COLOR=#0000cd]#Picaxe 14M2
    #terminal 4800
    Symbol DTYO=W2
    Symbol DTY=W1
    Symbol ADC=W0
[/COLOR][/INDENT]
[COLOR=#0000cd][INDENT=4]pwmout C.0, 99, 199 ; 10000Hz at 50% @ 4MHz
        W0=0[/INDENT]
[/COLOR][INDENT=3][COLOR=#0000cd]MAIN:
Do
    [/COLOR][/INDENT]
[INDENT=4][COLOR=#0000ff]readadc10 B.1,W0
    Pause 500
    Dty=W0*10/26 Min 200 Max 380
    pwmduty C.0,Dty 
    'pwmduty C.2,Dty
    DTYO=DTY
    sertxd ("ADC ",#W0,","," Duty ",#DTYO,"%", 13,10)
    W0=0[/COLOR][/INDENT]
[INDENT=3][COLOR=#0000cd]Loop[/COLOR][/INDENT]
 
Last edited:

AllyCat

Senior Member
Hi,

What PICaxe supply rail are you using? How much current does the Glowplug require? Have you tried sending simple High / Low or PULSOUT commands to the PICaxe pin(s) ?

The data sheet of the IRFZ44N rates it at only just over 1 Amp at a nominal Vgs of 4.5 volts, so the FET may be hardly turning on at all (i.e. it doesn't appear to be a "Logic Level" FET).

Also, isn't one connection of the Glowplug to "Earth" (i.e. the engine head/block), how is it wired to the FET and battery?

Cheers, Alan.
 

oracacle

Senior Member
From my limited experience with nitro engines I think allycat has it right, and a P channel power MOSFET would be needed.

I have just built a clock, using some IRF9520, one that happily switches up 28 high brightness 10mm LEDs @ 6 volts. it probably wont be the best for the job but would be a better starting point than any n-channel FET
 

pxgator

Senior Member
Except when I replace the glow plug with an LED, it will turn on the LED.
This is because the LED only requires a small current. Your FET is not turning on fully
so it can't supply enough current for the glow plug. An N-Channel FET will work just
fine but it needs to be a logic level 'turn on' device.

Cheers to All
 

Circuit

Senior Member
What sort of glow-plug are you using? My experience with glow-plugs in model combustion engines for model aircraft is that they generally require a supply of 1.5 to 2 volts at around 2 to 4 Amps. I have not encountered a model aeroengine glow-plug that would remain intact at 11.1 volts. You may be using a type of glow-plug that I am unfamiliar with, but perhaps I could ask you to check that the specification requires such a high voltage on the plug (or for that matter one that can withstand 11+volts.) Also, if you test the plug for continuity, are you actually reading resistance?

The commentary on using a logic-level MOSFET also applies and it may be that you are getting such low current pass that the plug remains undamaged. I would suggest, as have others, that you swap to a different MOSFET that will have a lower "on-resistance" when driven by the <5 volts from a PICAXE pin. An STP36NF06L would do the job - it will handle 30 amps at up to 60 volts.

The purpose of driving a glow-plug with PWM is not clear to me - what are you trying to achieve with this arrangement? If you could enlighten us on your objectives then it would help in giving advice.
 
First, I want to thank you for all the input and recommendations.
To answer some of the questions.
The glow plugs are standard RC motor plugs. They glow without burning up with 1.2V to 1.7V and roughly 2A to 3 A
The reason for using PWM is to be able to supply with a high capacity 3S LiPo on board battery
The trim pot is used to adjust the duty to an optimum value
Regarding the MOSFET, I did not check (stupid me) the datasheet in detail
I am switching to a pair of IRL540 (logic level and 20A) http://www.mouser.com/ds/2/427/91300-61907.pdf
GLOW DRIVER SCHEMATIC.jpg

Thanks again to all of you

Andres
 
Last edited:

oracacle

Senior Member
so essentially a couple of switch mode power supplies.
How are you going to check for everything being correct?
In theory there is no reason why you cant have the picaxe monitor and automatically adjust the PWM to suit.
 
You are right it is a switch mode power supply.
To check or everything being correct, I'll start with a low value for the duty and gradually increase with the trimpot while observing the coil of the plug. I am a beginner in electronics but after 50 years in model aviation I know when a glow plug is bright enough.

Andres
 

AllyCat

Senior Member
Hi,

Hmm, that's what I guessed you might be trying, but IMHO a rather "risky" approach because it's not a real SMPS.

Firstly, if the glowplugs use tungsten wire (or a similar metal) then the "cold" resistance will be much lower than the normal (glowing) resistance, probably much less than an Ohm. Apply 7 volts to that and a current well above 10 Amps could flow (or try to). Then, the power dissipation is proportional to the square of the voltage, so quite a low duty cycle will be required.

A "better" solution would be to use a series inductor and flywheel diode (i.e. a "real" SMPS configuration) and monitor the actual "dc" current with a low value resistance, or at least the average (low-pass filtered) voltage.

Cheers, Alan.
 

inglewoodpete

Senior Member
If the cold-surge current is a problem when using such a high voltage, I suggest you configure the HEXFET as a switching current regulator.
 

pxgator

Senior Member
The simplest method would be to use low value series resistors between
the sources of your FET's and ground. Then read the voltage drop at the
source/resistor junction. Using ohm's law E = I * R. Lets say using a .25 ohm
3 watt resistor, a 3 amp current will give a voltage drop of .75 volts. If
you would use a FVRSETUP of FVR2048 that would give a readadc10 count
of 375. This way you could slowly ramp up the pwm duty cycle until a limit
is reached. Of course even lower values of resistors and an 8 bit readadc
could be used. Also, since the glow plugs are slightly inductive it would
be a good idea to parallel them with a 'flywheel' diode ...cathode to Vcc
...anode to FET drain. Just some ideas for you to tinker with...HTH.

Cheers to All

P.S. Here is a link to an example by AllyCat

http://www.picaxeforum.co.uk/showthread.php?28361-Measuring-(low)-external-currents-using-a-PICaxe
 
Last edited:

inglewoodpete

Senior Member
The simplest method would be to use low value series resistors between the sources of your FET's and ground.
The problem with that method, while simple, is that the load (glowplug in this case) varies its resistance according to its temperature. This can cause dramatic changes in current and therefore heat, required for the IC engine's ignition.

AllyCat's circuit is fine for driving a motor but risks 'blowing' the glow plug before the PICAXE can respond to a current surge.

A current regulator allows you to select the maximum current that will flow through the load, even in a short-circuit condition. My circuits allows PWM to modulate the current regulator, allowing control from zero to the limited current.

I have a circuit diagram (partly uploaded in fact :() but there is a problem with the forum's software or server which prevents me from getting is displayed here. I'll upload it when I can (if I remember).

@Andres - send my a PM with your email address and I'll email the circuit (as a JPG) to you.
 
Last edited:

AllyCat

Senior Member
Hi,

AllyCat's circuit is fine for driving a motor but risks 'blowing' the glow plug before the PICAXE can respond to a current surge.
Yes indeed, the emphasis on that post (title) was "Measuring.." (and Low), it wasn't intended to control high currents (nor really even to measure them).

If you don't use an inductor (i.e. do not use a PWM PSU configuration) then the basic design calculations are quite straightforward (e.g. Ohms Law I = V / R and Power = I * V). But all the resistors in this application look to be less than one Ohm (i.e. more than one Amp will flow for each Volt applied). So you may need to pay attention to factors that are normally ignored, such as conductor and connector resistances (and certainly PCB track resistance and current rating).

IMHO even 0.25 ohm between the Source and Earth is far too high. Any voltage across that resistor will reduce the Vgs applied to the FET, which ultimately could cause the FET to move towards its "linear" (analogue) region. That might then approach a "current limiting" configuration (which you might think is a good idea) BUT you cannot then know how much power is being dissipated (usefully) in the glowplug (load) and how much in the FET.

Probably around only 100 mV drop across the current-sensing resistor would be sufficient. Use READADC10 but only look at the low byte (i.e. 8 bits). Even with the ADC referenced to (the default) Vdd, the resolution (ADC step) will be 5 mV, or using FVR_2048 will give 2 mV/step. In practice, FVR_1024 can be used (i.e. 1mV/step) even though Microchip (and others) recommend against this. 5 mV steps will still give around +/- 5% current resolution (at 100 mV) and will you actually know the value of the resistance to better than one milliOhm ?

It's worth noting that the very high "inrush" current of incandescent lamps/glowplugs is potentially a "good" feature, provided that your circuit can tolerate it! It causes the filiament to heat up very quickly which then stabilises itself at a moderately "constant current" (the resistance of most metals rises as they heat up). [reminiscence] In my youth I encountered carbon filiament lamps, which have a negative temperature coefficient (they were "historic" even then, used as indicator lamps in telephone exchange switchboards). When voltage is applied the initial current is rather low, so they "warm up" very slowly, but if the applied voltage is too high then their resistance can fall rapidly, the current rises and they suddenly suffer "thermal runaway" and destroy their filiament. :( [/reminiscence]

Cheers, Alan.
 
Last edited:

pxgator

Senior Member
@Andres

Before you over complicate things it might be worthwhile to set up a test circuit with a single
FET. Instead of a glow plug use a 12 volt or lower high current halogen bulb and a 3s or 4s
Lipo power source. You might find that a simple low value source resistor solution will suit
your needs.....or not. Only experimentation will tell....proof is in the pudding.

Cheers to All
 
Top