Improving glow plug driver design for RC plane radial engine - Page 1
Forum section: electronics / projects

author: kikinou
author_rank: Contributor
timestamp: February 23, 2016, 09:33:09 am
content: Hi there,This is my first post here, aiming at showing some fun stuff, and getting some help - yep, I have some issues.The following image shows the ugly design that I am aiming at improving:It looks ugly but it works well enough for me. The following picture shows the plane flying, and the 3 cylinder radial engine.But I would like to add three functionalities (3 current sensors, 3 thermometers, and voltage regulators) because I wish to troubleshoot the engine. He (it) is moody. Sometimes, the glow plug filament is broken. Sometimes, it is not warm enough, or the opposite. Sometimes, the engine is too hot (mixture lean ?). Most of the time, one of the cylinders doesn't want to cooperate, and it is hard to know, even though I am now familiar with its roaring. Hence, I am willing to do my own clean PCB design. This is a first for me. I also get some motivation because that effort would also benefit the in-line twin engine that tracts a P51 mustang and the radial 9 a friend of mine just got. Another motivation to get a PCB done is to redo my ugly on-board glow driver : you might have notice the hot glue blob on the DC/DC converter in the above picture. The capacitors got unsoldered after about 50 flights. Now is a good time to invest some time in this project.So, I am giving a shot to the following PCB design project :A preliminary schematic draft is attached as a pdf file.The idea is simple :1. an attiny converts the receiver PWM in ON/OFF (0V or 5V) signals2. that triggers a relay to power up the 3 glow plugs (~3A each)3. an ATMEGA 328 is electrically independant and does the clever work :- 3.a - measure each cylinder temperature- 3.b - measure each glow plug current- 3.c - report the 3 glow plug currents on a 3 color LED- 3.d - report the 3 cylinder temperatures on a screen (on board / hot plug, don't know yet)Here is the idea behind the current measurement.When the cylinder is OFF, the glow plug current is about ~2.5A.When the cylinder is ON, the glow plug current is about ~2.3A.When the glow plug filament is broken, the current is exactly 0A.--> so I can make sure this when my engine is moody.Here is the idea behind the temperature measurement.- I can double check if a particular cylinder is ON or OFF (warm or cold)- I can make sure the fuel/air mixture is about right ( warm=lean , cold = rich)Here is the idea behind the UART and ISP connection- I use quite randomly expensive OS F plug (4 strokes) and very cheap hobbyking 2 strokes glow (it works fine for a third the price). So I need to adjust the firmware to account for this.- I will need to toubleshoot before it works.Here are the ideas behind using regulator :- LiFe (safer than LiPo) battery are by far lighter for the same energy storage, but their voltage is about 3.3V, or some multiple. So I would need to get the voltage down to 1.2V - 1.5V, depending on the glow plug brand / batch.- Three glow plug is up to 9 A @ 1.5V. The DC/DC converter is specified for 6A. I should be pulling about 7-9A through it (never measured it actually). It is warm but it works. There is a potentiometer to adjust the output voltage : that is necessary : some plugs likes 1.2V, some other 1.5V, and I like switching in between the cheapo and the expensive one.So far so good, but I am stuck:I have hard time to find a simple switched regulator that gives me 9A @ 1.2V-1.5V adujstable from a 3.3V or 6.6V battery. Would you recommend some ?- The LM1771 sounds great because it outputs low voltage (down to 0.8V) from 2.8V-5.5V (1S LiFe is 3.3V +/- 0.3V). The TI datasheet section 8.2.3 indicates it can delivers up to 5A @ 3.3V from a 5V battery.--> Can I get 9A @ 1.2-1.5V ?--> Can I put a couple of regulators in parallel ?--> Should I simply harve 3 regulators, one for each glow plug ?--> Can I simply design the circuit with figure 6 BOM : sounds complicated to me (2 FET, 3 caps, 1 inductor, 1 resistor, 1 pot).- The LM2576 datasheet suggests my life would be easier with this guy. Indeed, when I look at figure 33 of the TI datasheet, I readily find the circuit I need, and it is simple (2 caps, 1 diode, 1 inductor, 1 pot). It is less efficient but simpler : I like it. But it outputs max 3A. I would need 3 either in parallel, or one on each glow plug.--> Can I connect this guy in parallel ?- The LM338 is linear, even less efficient, but that is fine with me. Doubling the LiFe battery size is not a problem on that plane. According to the datasheet page 9 (1.2V–25V Adjustable Regulator figure), the circuit is fairly simple (2 caps, 1 potar). That's sweet for my PCB area, soldering skills, though I guess I can handle more. But the may point here is that I may be able to two of these regulators in parallel to output up to 10A.-->But can I put such a regulator (linear) in parallel ?Many thanks for your hints for theses issues. I hope there are quite interesting to you.May be I should get these various guys on a breadboard, and see how it goes. Would that be the path moving forward ?- kikinouPS : english is not my native language, so I welcome notification on sentences that should be clarified.

author: oldway
author_rank: Super Contributor
timestamp: February 23, 2016, 10:03:05 am
content: Why dc/dc 1,2V ?Nominal voltages of glow plug's is not 1,5V and 2V ?

author: Kleinstein
author_rank: Super Contributor
timestamp: February 23, 2016, 11:42:48 am
content: I would avoid using a relays - a MOSFET should be smaller, lower power and less trouble with variable contact resistance. Some DCDC converters may also have an enable pin, so that no extra power switch is needed.For just 6 inputs there is no real need for a 16 input MUX chips. The µC has enough analog inputs, and there are smaller MUX chips around with 4 or 8 inputs.

author: kikinou
author_rank: Contributor
timestamp: February 23, 2016, 01:13:05 pm
content: Quote from: oldway on February 23, 2016, 10:03:05 amBecause NiMh works fine with OS F and the Hobbyking#3 glow plug.Quote from: oldway on February 23, 2016, 10:03:05 amMy cox 0.06 and 0.02 sometimes needs higher. I don't really now the right voltage actually : I turn a knob or plug NiMh till it works.To mitigate the issue you are bring up, I like the pot I have on the DC converter shown in the above picture. I set it to the glowing red I like.

author: kikinou
author_rank: Contributor
timestamp: February 23, 2016, 01:20:05 pm
content: Quote from: Kleinstein on February 23, 2016, 11:42:48 amI'll do the extra effort to get it that way. Using a relay with an attiny was intellectually easier for me. I am going to use a breadboard this time and get the MOSFET right.Quote from: Kleinstein on February 23, 2016, 11:42:48 amThanks for the catch. That is much better. I'll update the schematic in the next few days.The truth is that I initially planned to do the board for the radial 9 (9 current sensors, 9 temperature sensors), so I needed the MUX. But that idea was too ambitious. So I got more modest now, and I am doing a first step with the 3,2 and 1 cyl first.

author: oldway
author_rank: Super Contributor
timestamp: February 23, 2016, 01:21:18 pm
content: I'm a former amateur of model aircraft and have significant experience with 2T glow plug and diesel engines.I do not understand where is your problem.Your 3-cylinders engine is a 2T or 4T engine ?With 2T engines, you need no longer supply the glow plug once the engine starts, so your project does not make sense.Regarding multi-cylinder engines 4T, it seems to me that the glow plug principle is not good and that you need to prefer a gasoline engine.In my opinion, the real solution would be to change the engine if it is a 4 strokes engine.

author: kikinou
author_rank: Contributor
timestamp: February 23, 2016, 01:42:41 pm
content: It is a four strokes with a gorgeous sound, and edgy power/weight ratio. It barely allows for looping : but that's quite realistic. Nevertheless, the whole point is that I love its roaring.Having an on-board glow driver has 3 advantages.1 - Flip a switch on the radio, flip the prop and here we go.2 - Much lower idle RPM, which is nice/required for taxing and landing.3 - In flight, there is always a cylinder that switches OFF below 25% power. It should not but it does. So I used to turn it back ON. Now I have the driver automatically ON when throttle is below 30%.Changing the engine, is a solution. But that would mean storing/selling this 520 EUR nitro engine and buying a 840EUR gasoline engine. The power is 20-30% lower and the plane would have hard time to take-off, and there is an additionnal 100g for the CDI (sparking ignition). I tried a compromise. I purchased a CDI ignition and use it with methanol/nitro (not gasoline). In principle, I should have los only 5% power (not 20-30%). But I failed getting all 3 cylinders running. Then the sunset came, and I put back my glow plug back the next day to have fun on the field right away.So, now I have this engine, which is a quite excellent value for the money, I stick with it, despite the few solid drawbacks your are pointing out.And, here I am with the strong desire to get my glow plug current monitored and cylinder temperature measured.

author: oldway
author_rank: Super Contributor
timestamp: February 23, 2016, 02:38:59 pm
content: To function properly, especially at low rpm's, the glow plug must remain sufficiently hot.This is easily obtained with the 2 stroke engines, but not with 4T engines.If you seek the maximum power / weight ratio, choose a 2T engine, not a 4T engine, there is no match at all.(NB: for exemple, OS 35AX 2 strokes with muffler: 3.52HP/Kg, OS FS95 4 strokes with muffler: 2.58HP/kg)In my opinion, you must have a reliable engine for the sake of your plane.For this reason, you should reconsider the choice of your engine even if it cost money.What you try to do is in french, "une emplâtre sur une jambe de bois", and that's never a good choice !

author: promacjoe
author_rank: Regular Contributor
timestamp: February 24, 2016, 03:50:52 am
content: have you considered running your Glow plugs in series. Then you could use a regulated power supply at 4 to 5V, 3A. to know which glow plug is not working, a simple LED and resistor across each glow plug, will work. when a glow plug is burned out, the LED associated with that glow plug will light up. the advantage to this is, if one glow plug is burnt out, the engine will not crank. also you reduce your component list. Only one power supply and current sensor is needed.

author: BurningTantalum
author_rank: Frequent Contributor
timestamp: February 24, 2016, 07:04:57 am
content: Kikinou-The Cox engines, being American and of old design, use 1.5 Volt glow plugs/heads as they were designed for zinc carbon cells.Most modern plugs are designed for 1.2 Volts as NiCad and NiMH are commonly used. I think that other voltages have been used in the past but I'm not sure.Regards, BT

author: oldway
author_rank: Super Contributor
timestamp: February 24, 2016, 07:08:07 am
content: Kikinou let me know by PM that he wants to use his 4T engine.We will than solve his problem, but not in the way he recommends.We are on an electronic forum and most of the participants do not know anything upon glow plug engines.It is therefore necessary to give some explanations about it.What is a "glow plug?It is a coiled rhodium platinum wire which is heated to red at start by an electric current and which is maintained at high temperature by the heat of explosions.The supply voltage of the glow plug is 1.5 or 2V according to brand and model.There are different types of glow plug from hot to cold depending on the engine type, fuel type, and so on...More details here:http://www.osengines.com/glowplugs/Why we need a glow plug?The glow plug engine is running on diesel engine principle but the compression rate is insufficient to ensure ignition of methanol.We need a hotspot to ensure ignition of the fuel mixture, this is why whe need a glow plug.Note that the diesel vehicle engines also use a hot spot for easier cold starting.The glow plug has another important function: to automatically adjust the timing of the engine.Running at Higher rpm makes the plug hotter and "fire" the fuel-air mix sooner. At lower rpm, the filament cools and the plug fires less frequently.But at low rpm, especially with 4T engines, the filament may became too cool to fire the mixture: that's the problem of kikinou.

author: oldway
author_rank: Super Contributor
timestamp: February 24, 2016, 07:33:35 am
content: How to solve this problem ?You should know that we can not constantly feeding the filament when the engine is running in full speed because the filament too hot, it becomes brittle and can break.That is why we remove the connection of the glow plug as soon as the engine is started.Whe also feeds the filament with constant voltage and not constant current because platinum has a positive temperature coeficient and the resistance of the filament increases as the temperature increases.This has a temperature regulating effect when feeding the filament with constant voltage.We can not connect the glow plugs in series as has been suggested because the hottest filament will have the higher voltage, what can dammage it.The solution proposed by kikinou is complicated, inefficient and dangerous.To detect the extinction of a cylinder by measuring its temperature is slow and complicated.If one of the cylinders is switched off, there is a lot of risk than the 2 other also risk to switch off and the engine can stop before the temperature detection does act.The solution of the problem is much simpler:Simply measure the engine rpm and energize the glow plugs if the rotation falls below a specified value.

author: oldway
author_rank: Super Contributor
timestamp: February 24, 2016, 07:43:25 am
content: How to measure rpm simply?By sensing the sound of the exhaust by a microphone.The microphone must be protected from the wind (protection with foam, placed in the fuselage).It needs an amplifier and a low pass filter.If there is no sound or if there is a low frequency sound, the glow plugs should be supplied at reduced voltage (1V, for example), just to help keeping the filaments at a sufficient temperature.

author: kikinou
author_rank: Contributor
timestamp: February 24, 2016, 07:58:15 am
content: It seems to me that my project description is poorly written. The topic is unfortunately drifting toward rc model stuff, as opposed to EE. Let me try to get back on track : circuit & PCB design.Basically, I am adding functionalities to that widely used thingy:http://www.hobbyking.com/hobbyking/store/__15517__Hobby_King_Onboard_Auto_Glow_Plug_Driver.htmlLet me briefly summarize their marketing.- The red and black leads connects to the glow plug (2 leads device), that itself is connected to the filament : a ~100 mOhm resistor that gets hot and glowing :- The three lead connectors (white/red/black = signal / 5V / ground) is plugged to a channel of the RC receiver. The signal is a PWM (20 ms period) with a duty cycle that commony varies in between 5% and 10% (1ms to 2ms).- When one flips a switch on the radio, this thingy powers the glow plug one can starts the engine by flipping the propeller.- When the radio throttle is low (below a value one adjusts to the engine behavior), this thingy also powers the glow pug and the engine can idle at lower RPM. That desirable when landing and taxiing.That works sweetly, and I already improved this design for the sake of my plane safety (the above corsair is an ~ 800 hours build). On this picture (of some other setup I built),Here is the schematic with an ATTINY85 that translates the PWM signalSfrom the receiver into 0V-5V on a MOSFET gateG.one may see that :- the glow plug battery is different from the battery of the receiver and servos---> the receiver battery is the 5V connector on the little above schematic---> the glow plug battery is the (drain / 10V) connector and the DC/DC converter (10V to adj. 1.2V) is hooked to the (GND / 10V) connector- the glow plug voltage is adjustableQuote from: Kleinstein on February 23, 2016, 11:42:48 amThere I used a MOSFET because I got smart enough that day. And indeed, this particular board has an enable pin, which I located, but my guts told me not to hack a board that works.There are more details on rcgroups, which is a sweet spot to talk about RC related subject such as model engine.http://www.rcgroups.com/forums/showthread.php?t=2228980My current project is to add temperature and current monitoring to my previous builts, which work wonderfully on 4 planes of mine, and two of friends. That sounds like an interesting project to me, but the circuit design challenges me.

author: kikinou
author_rank: Contributor
timestamp: February 24, 2016, 09:43:26 am
content: Quote from: BurningTantalum on February 24, 2016, 07:04:57 amMake sense. I always wondered why I had to crank up the voltage on my cox engines.

author: kikinou
author_rank: Contributor
timestamp: February 24, 2016, 09:50:34 am
content: Quote from: promacjoe on February 24, 2016, 03:50:52 amI don't really have the choice though : the plugs have a common lead that is the engine chassis itself. Please have a look on the following image of my engine :

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: February 24, 2016, 05:26:53 pm
content: thats a sweet looking engine. the sound must be amazing! i have some nitro engines but they are single cylinder, you dont get that awesome sound from those ones!

author: oldway
author_rank: Super Contributor
timestamp: February 24, 2016, 06:01:14 pm
content: Seems to be a Saito engine.

author: oldway
author_rank: Super Contributor
timestamp: February 24, 2016, 06:40:04 pm
content: http://www.sonictronics.com/xcart/home.php?cat=285Seems to be what you are looking for.

author: kikinou
author_rank: Contributor
timestamp: February 24, 2016, 07:20:17 pm
content: Quote from: BloodyCactus on February 24, 2016, 05:26:53 pmChristmas is 10 months ahead, so 52 bucks a month are worth it. These are rare and keep their value for second hand sale, I won't loose as much money as with common engine. I hard very hard time to get a saito twin. Go for it ! Go for it !

author: kikinou
author_rank: Contributor
timestamp: February 24, 2016, 07:43:13 pm
content: Quote from: oldway on February 24, 2016, 06:40:04 pmYes and no. I built this device for a third the price, and plenty of fun. This is the message I was trying to convey in my very first post. Here is a picture of my on board glow driver on my corsair (same picture as in post# 1).Now, moving forward, I have two goals :- put all these dangling electronics on a clean PCB ;- add temperature and current sensors to monitor each cylinder health (no plan for an IOS Icylinder app though)Thanks to Kleinstein, I am now in the process of improving the schematic posted above.And I think I made my mind regarding the regulator issue. I am going to use three LM2576 to get up to 3A at adjustable 1.2V-1.5V from either a 3.3V or 6.6V LiFe battery.But this LM2576 solds in various packages and output voltage (fixed 1.2V,5V,... andAdjustable). That is want I can understand from here :http://www.ti.com/product/LM2576/samplebuyHence, the one I believe I need is :- voltage adjustable- TO-220 [ --> sounds good for both breadboard and routing pcb 3A traces]- TO-220 (NDH) [ --> sounds good to save PCB real estate]=> TI part# LM2576T-ADJ/LF03 is my guy !But I don't know where I can buy this guy in France / Europe. Sounds to me I am way too demanding.

author: oldway
author_rank: Super Contributor
timestamp: February 24, 2016, 09:23:53 pm
content: The glow plug is a simple resistor, no need of filtering, you can feed it with a PWM signal.Use a logic level mosfet.

author: kikinou
author_rank: Contributor
timestamp: February 24, 2016, 09:32:20 pm
content: Yep.What would be the best way to get the components? I am planning to get these on ebay but one by one is a pain. Do you know of any ebay store that is large enough so I can get all very common diode, regs, caps, etc.... within a single order ?

author: TheSteve
author_rank: Unknown
timestamp: February 25, 2016, 06:52:08 am
content: You can always check Digikey or Mouser and see what shipping would be.btw, beautiful engine!

author: kikinou
author_rank: Contributor
timestamp: February 27, 2016, 10:11:30 pm
content: Thank you very much. Digikey shipping is free over 65 EUR, and the cart is 112 EUR for now. Tax might be another hidden cost though, I don't know. Thanks TheSteve for letting me check.DIY is surprisingly very expensive. Am I doing something wrong ?Attached is the updated schematic. I used the ON/OFF pin of the relay, as suggested.I plan to order all components and get the circuit working on a breadboard before routing a PCB. I feel like it is the right thing to do, but I am just guessing.

author: jwm_
author_rank: Frequent Contributor
timestamp: February 27, 2016, 10:42:04 pm
content: rather than dealing with the switching regulators, why not just measure your battery voltage and adjust the PWM rate for the glow plugs appropriately feeding them directly from your battery? You can just use a power mosfet per plug and drive them directly from the uC. It would make your design much simpler, more robust, and more efficient.

author: kikinou
author_rank: Contributor
timestamp: February 28, 2016, 11:42:33 am
content: I gave up doing so two years ago. I really tried, as can be seeing in the 2 years oldMOSFETS.pngpicture, and I failed, as I'll explain below. And then I moved on with an ebay bought DC/DC converter, because it was more straightforward to me, as can be seen in theglowing.pngpicture.Here are my two attempts, and my excuses.1. PWM right onto the MOSFET gate (MOSFETS.png&1.PWM-MOSFET.png).It worked on the bench for 1 minutes. Then, I blew up the filament, once I disconnected / reconnected the 5V battery.- In the RC plane, I plan to connect the LiFe 6.6V for all day, and carefully switch ON/OFF the receiver/servo 5V battery.- The filament blow up right away when one applies much more than 1.5V (such as 6.6V or 3.3V) to its 100 milliohm resistance.2. PWM right onto the MOSFET gate (2.PWM-MOSFET-PULLDOWN_RESISTOR.png).The prior test hinted me two possible issues:- the MOSFET gate voltage might be floating when the micro-controller is not powered (and the 6.6V still connected).- the MOSFET might be all over the place when I power-up the micro-controller (switch on the 5V battery with the 6.6V battery still connected). I think it was actually an arduino UNO, so the (mysterious to me) optiboot might apply funy voltages during boot sequence. I don't know.Hence, I attached a resistor (may be 10k or 100k) to the MOSFET gate. I powered the micro-controller to get first the PWM on the gate, then powered the 6.6V to on glow plug lead and the source (seePWM-MOSFET-PULLDOWN_RESISTOR.png), and I saw my beautiful filaments turning white hot and thus blowing up right away. I was sad : that was roughly my 4th filament I was blowing up that day. That's why I gave up and moved on with a commercial regulator, where I can read and understand the datasheet.That failure bothers me. Any idea as to what has happened ?3. A DC-DC converter is glow plug saver (3.PWM-MOSFET-DC_DC.png)I was exasperated after I had blew up several filaments, so I thought it would be safer hooking up a DC/DC converter right to the filament leads. That way, the filament won't ever again see more a voltage that I trimmed for sure myself - about 1.2V. Then, when working, I could use the trim-pot to adjust this voltage to the filament color I like best (seeglowing.pngpicture).Long story short, I have not been able to get PWM onto MOSFET working properly. But I would love to for the reasons you wrote, and that would also be cheaper and save PCB real estate. Plenty of PROS but one CONS : I failed.What did I do wrong ?

author: RobertBG
author_rank: Regular Contributor
timestamp: February 29, 2016, 01:37:40 am
content: Quote from: oldway on February 24, 2016, 07:43:25 amThis seems like a outdated method when it is so easy to use a non contact laser rpm probe.I'd also be concerned what effect misfires would have on such a setup and that is part of why I'm assuming he's interested in this.With a missfire you want glow plug heat on to help clear the problem and throttle position based systems can be useless here because of the need to throttle back even more to activate them,you risk stalling out.I used a hall effect setup on one of my planes and I was very happy but now I'd try and use a laser probe in order to not have to deal with magnet placement.

author: kikinou
author_rank: Contributor
timestamp: March 05, 2016, 09:26:32 am
content: Quote from: RobertBG on February 29, 2016, 01:37:40 amI can easily understand that in principle the sound should include an harmonic with the engine RPM. Though, in practice, I am wondering whether the spectral density is clean and clear enough to extract the right harmonics ? Would a PLL lock on it ? Would a FFT pick it ? I really don't know, even though I know that was widely used 15 years ago. Indeed, pylon racer pilot were actually recording the sound of their plane in order to trim their plane and engine. The guy I am acquainted with was using a popular software to check his pylon racing plane. But I did not quite get whether the software was estimating the doppler shift with a correlation calculus or with a FFT calculus. The former sounding quite more robust to me. Those explanations are personal speculation aiming at saying that method sounds quite tricky and time consuming to get it work.Another path sounds to me the way to go.Hall effect sounded and still sounds best to me, due to its signal robustness. But I ran into several practical issues :- I had to drill a hole in the prop driver to the right size : that was ok.- I put the magnet in the hole, but the magnet got demagnetized because either the driver was hot or I hammered it gently yet excessively. Damned.- I spent a whole afternoon building a hall sensor carrier that can be screwed on existing engine tap. At the end to the day, the hall sensor mount was fragile, though working.What a disappointment! Initially, that sounded straightforward, but the bill of materials ended up being expensive, and I quite failed to get the system to be reliable (on my beloved 800 hours build plane).As of today, hall sensor mount and prop driver with magnet are commercial though expensive, so that route sound clearly the best to me.But but but, one engine, one kit. Not quite there yet. I'd rather have a tachometer that works right way with any engine, like this one for instance:http://www.hobbyking.com/hobbyking/store/__10783__Turnigy_Multi_Blade_Micro_Tachometer.htmlIt works with a photo-resistance, as does the systems I DIY'd a while back which I ll describe in a following post. But this system still needs some brain power to make it as good as commercial ones.May benon contact laser RPM probeshould help me. Any part number you would recommend me ?

author: kikinou
author_rank: Contributor
timestamp: March 05, 2016, 09:54:52 am
content: Here is the RPM thing I built on my Zlin42, now crashed.I hope the attached pictures are self-explanatory.I programmed two modes : fast and slow.- fast : one sample every 100 us (or so, don't remember now)- slow : one sample every 1 ms (or so, don't remember now)--> The idea was to cover the RPM range from 1,000 to 15,000.The code (both the screenshot and the code sektch) shows the algorithm.1. The voltage divider (photo resistance in series with a resistor) hooked to the uC ADC stems this typical time series :532 532 532 532 532 532 532 532 532 573 573 573 573 573 532 532 532 5322. then I compare with the center value 532+(573-532)/2=533, and detect the rising edge at that 533 threshold and get :0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 ...3. then I count and convert the number of edges over my 40ms time series in RPM (of a 2 faces propeller over 1 minutes).And, eventually, I am find a way (help welcome) to improve that RPM meter so I can hooked it to an available pin (I2C/JP6 connector) of the main uC. Hence, the RPM would nicely be printed out on the screen (ECRAN in French) of my current project :- latest revision :https://www.eevblog.com/forum/projects/improving-glow-plug-drive-design-for-rc-plane-radial-engine/msg880251/#msg880251- attached png schematicThat would help checking engine performance (propeller size/pitch, compare fuel mixture...) beyond what can be done with current and temperature sensors (the plan for now).

author: kikinou
author_rank: Contributor
timestamp: March 06, 2016, 09:35:01 am
content: I started the breadboard. The attiny understands the RC signal signal and turns the red LED ON and OFF with the throttle stick. Working!Quote from: Kleinstein on February 23, 2016, 11:42:48 amSo I choose one with an ON/OFF pin which is hooked to the red pitch dip dwitch, and that indeed turns the converter OFF. Excellent!--> multimeter shows 0VThe LM2576-ADJ doesn't work yet. I feed it with 6.6V, and I get a funny 0.2V instead of an adjustable voltage.--> picture shows Vout = 0.2V on the multimeter--> but this voltage needs a few seconds to set.--> the pot on the feedback pin doesn't do any thing.--> I am puzzled.I am gonna hooked this to my oscilloscope...

author: kikinou
author_rank: Contributor
timestamp: March 12, 2016, 12:24:11 pm
content: Damned, my local electronic store sold me a LM2577 (volage up) instead of the LM2576 (voltage down) that I ordered. I wasted half a day to figure that out ! And on-site, in the shop, he already did three others mistakes that I fortunately double checked. But I missed this one out.Is digikey more reliable on this ?

author: oldway
author_rank: Super Contributor
timestamp: March 12, 2016, 06:56:21 pm
content: Blowing up glow plugs : as you need only a limited pwm range, why not use a NE555 + mosfet ?It would be far more reliable.low rpm detection by sound: it is my idea, i don't know if it could work, but I think that yes.advantages:- simplicity- low cost- low weight- no need to be nearby the propeller thus no negative modification of the external of your plane- also detect dead cylinder or without ignition

author: kikinou
author_rank: Contributor
timestamp: April 08, 2016, 10:02:07 pm
content: Quote from: oldway on March 12, 2016, 06:56:21 pmI tried and failed to bias the mosfet properly, as I was trying to convey in Reply #26.Here are some modest eye candy.Now working on the sensors. Varistor works. Current sensor chip is fried. My local electronic store drives me nuts. May be my handling was nuts in the first place. Anyway, more shipping waiting, more work.I feel like it is going to be hard to save real estate and pick-up the right components so they can handle the strong plane engine vibrations.

author: oldway
author_rank: Super Contributor
timestamp: April 09, 2016, 08:48:17 am
content: QuoteYou must use a Cmos version of 555 such as LMC555, not a bipolar one.

author: Buriedcode
author_rank: Super Contributor
timestamp: April 10, 2016, 07:36:03 pm
content: Whilst it seems this thread is full of people who know a lot about engines, and glow plugs (nice explanation of those btw!) I think you would get more people chiming in if you could detach it from the specifics of the engine, and put the problem in pure electronics terms of : this is input, I need this output. Although that's always dangerous - one should always see the bigger picture and everything involved in the application to stop one getting tunnel vision .I don't see how a CMOS version of the 555 would help with driving a MOSFET. If anything, its worse, as it has lower output current capability. With MOSFET's there is a trade-off between drain-source voltage breakdown, on-resistance, and gate capacitance. As you seem to be switching relatively low voltages, a 30V MOSFET is fine, which should mean a much lower on resistance, and lower gate capacitance - but always check the gate specs - many TO220 MOSFETS have wonderfully low resistance, but mahoosive gate capacitance as they're meant for low-frequency switching, that is, turning something on or off infrequently.A dedicated MOSFET driver will help, but I sometimes use a 555 for that for lower frequencyIt seems your glow plug won't mind a low frequency PWM, it is a heating element after all, so I'm thinking 1kHz tops. That should mean the FET has plenty of time to turn on, and off whilst still providing an 'average' power to the glow plug. Using a micro is very handy, but as you found out, can be troublesome if it is controlled power delivery. I realise others have banged on about the 555, but a simple circuit, driving a MOSFET, with a set frequency, variable duty, and the 'reset' pin as on/off control can provide a solid and predictable way to control the glow plug from feedback based on the RPM. You can still use a micro to measure the RPM and scale it to its owm PWM signal - but that is just used to bias the duty of the 555. That way the 555 has set limits (in hardware) for the duty cycle, but the micro is there to tune it. If that all works out well, then by all means, get rid of the 555 and go all micro.I *may* have completely misunderstood the problem.

author: kikinou
author_rank: Contributor
timestamp: April 10, 2016, 08:59:30 pm
content: My guess is you are spot on.My glow plug turns red, then white, then fried within ~100ms (my poor man estimate comparing what I saw and what a 5Hz blinking led looks like). So, with a 12 or 18% duty cycle (to convert respectively 9.9V or 6.6V -- respectively 2S or 3S LiFe battery), I thought I should be ok with an arduino UNO. I did not use the PWM output but simply programmed a digital IO to get 20ms ON, then 200ms OFF. Surprisingly, the MOSFET turned ON, and stayed ON. And my guess is the same as yours :gate capacitance.The glow plug is a roughly ~ 100mOhm (0.1 Ohm) resistor, so I choose a ~5-10 mOhm on-resistance mosfet. So, I would also guess that the transistor width is huge to get such a low value. And so is the gate capacitor, the voltage of which behaved badly with me. Poor me. I should have investigated this more, but I gave up and put in a DC/DC buck converter that was laying around.BUT, i would need three on my 3 cylinder engine, and 9 on my friend's radial. That's nearly insane money wise, PCB real estate wise (image breadboard_regulateur_attiny.jpg in Replay#33).So, I am really up for suggestions. But I think you spotted the issues : the gate capacitance makes it hard to get the straightforward inverter working without any clever trick to drive the MOSFET properly. And I don't know how to do that.

author: kikinou
author_rank: Contributor
timestamp: April 10, 2016, 09:50:54 pm
content: I made some progress on the front of the sensors side.Please have a look on the images/videos of :- 1 - the second breadboard, and- 2 - the log file as plotted on the computer thanks the data logging on the SD card.- 3 - testing the thermistor, bluetooth, and 3 color indicator (I warmup the thermistor by hand)https://youtu.be/62N5dmMsbIEAlso, for convenience and community sharing, I attached the arduino sketch (*.ino), and the python scripts (*.py) that makes all this working. Might be helpful to the community.a) fit_steinhart.py is a curve (varistor_10k.txt) fitting to get the right conversion resistance -> temperature in the MCU.b) log_serial.py is a simply displays in the console the bluetooth data, with some simple tricks to handle data and debugging flows.c) plot_logs.py read a cvs file (such as LOGGER11.CSV) and turns it into plot, for a start.Some future directions I am considering :- I think I am going to use the iPhone screen to check currents and temperature, that is so convenient. Right now, OS X can read bluetooth, but iOS cannot. I am waiting for a bluetooth BLE for that.- I am going to use 16 bit ADC to read the 3 current sensors with I2C protocol. That will save me ADC pins I so I can also monitor the batteries voltages.- Since I'll thus be in the I2C deal, so why not think ahead and envision to rebuilt my old tachometer with an I2C connection to this MCU. I might improve the counter algorithm, and replace the photoresists with IR emitter photodiode (more dynamic range I suppose). Not that useful, because our ears are actually more sensitive. To be more precise : sensitive enough for that purpose at least.

author: oldway
author_rank: Super Contributor
timestamp: April 11, 2016, 06:02:55 am
content: QuoteHigher output voltage.555 : Voh = 3.3V with 5V power supplyLMC555 (c-mos version of 555) : Voh = 4.8V with 5V power supplyQuoteWhat is a "mahoosive gate capacitance" ?IRF3708 30V 62A Rdson= 12 mR has a Ciss of 2417 pFIs that a "mahoosive gate capacitance" ?

author: kikinou
author_rank: Contributor
timestamp: April 11, 2016, 08:03:56 am
content: QuoteSo the questions are :- can this 2400pF @ 5V discharge in the arduino UNO pin within ~1ms ?- what happens when the atmega boots up ?

author: oldway
author_rank: Super Contributor
timestamp: April 11, 2016, 08:34:31 am
content: Quote from: kikinou on April 11, 2016, 08:03:56 am

author: kikinou
author_rank: Contributor
timestamp: April 11, 2016, 11:22:30 am
content: Quote from: oldway on April 11, 2016, 08:34:31 amI give it a shot ! Please have a look on the ebay order.

author: mikerj
author_rank: Super Contributor
timestamp: April 11, 2016, 03:10:27 pm
content: If you are going to have a switch mode regulator to provide variable drive to the glow plug, you could quite easily measure the glow plug resistance by also measuring current. Since the resistance of a glow plug will vary with temperature, this gives you scope to run a control loop in the micro to keep the glow plug running at a constant temperature irrespective of engine speed and load.

author: kikinou
author_rank: Contributor
timestamp: April 11, 2016, 03:15:45 pm
content: Hey, welcome on-board ! Did you notice the hall sensors (ACS712) on the bottom left of the schematic :

author: Buriedcode
author_rank: Super Contributor
timestamp: April 11, 2016, 07:48:21 pm
content: Note that a control loop using a microcontroller is slow. This is fine as you'll be limiting the voltage across the glow plugs , and hopefully, only vary the PWM slowly. Oscillation can be a pain in simple control loops, and a PID controller can be a hassle.I imagined to save board space you would have a single SMPS producing 1.2-1.5V at a high current, with the glow plugs switched across it using MOSFET's. As the three plugs are connected to the chassis, you'll have to use high side switching, That means either P-channel MOSFET's, which tend to have higher on-resistance (but even SOIC8 P-channels can have ridiculously low resistance) or using N-channel, with a boosted gate voltage. The fixed voltage would limit the max current for the plugs, and the PWM chops this to reduce it. The trouble with that is your current sensors would have to sense current during the on-time of each plug - and current sense amps/devices tend to have limited bandwidth and overshoot.So that leads me to think you've got the right idea by having 3 separate power supplies. The LM2576 is old, but it should do the job. The only trouble is you would need a way to control the current. I see you've got all the enable lines tied so the plugs are either all on, or off, but I don't think PWM can be applied to this pin - other switching IC's allow for PWM control, but I don't think this one does.Again, I may have missed something, but is that circuit just for controlling the glow plugs? Seems like a lot of IO for what should be essentially 'box' with power, 3 glow plug outputs, with a 'tach' input, and a control input for starting. If you know the max voltage and/or current you need for the glow plugs, then maybe you could get away with a single power supply.

author: mikerj
author_rank: Super Contributor
timestamp: April 12, 2016, 12:41:44 pm
content: Quote from: Buriedcode on April 11, 2016, 07:48:21 pmSlow relative to what? A small microcontroller would be more than adequate to run a PID control loop on something like a glow plug. The thermal time constant is likely in the 10's or even 100's of milliseconds.

author: Buriedcode
author_rank: Super Contributor
timestamp: April 12, 2016, 03:43:42 pm
content: Quote from: mikerj on April 12, 2016, 12:41:44 pmGood point. I still am a bit uneasy about having micros in control loops for power. Whilst for 'heating' applications with low time constants, as you rightly pointed out, they are more than fast enough.. for my own projects where I don't mind more complication for added safety (no-one likes breaking expensive parts) I tend to go with a basic analogue closed loop, that can be controlled by a micro. That is to say the limits are set in basic hardware, so any software screw ups don't destroy things.Ripple in the glow plugs current won't matter (unless of course its on stupid timescales like seconds) but my point was more aimed at powering the glow plugs form a supply that is more than capable of frying them, but reducing average current with PWM set to < 30%. One mistake in the code, the IO is in a fixed state, the glow plug gets full supply voltage across it and poof. I think several others have pointed out the use of the ubiquitous 555, or using a supply that itself is limited. It's much more comfortable to have something where the input can't actively destroy things.

author: kikinou
author_rank: Contributor
timestamp: April 13, 2016, 09:52:16 pm
content: I am not familiar with digital PID. In principle, is there some form of Nyquist sampling theorem thingy that one could apply ? Something like: assuming the heating time constant of the glow plug is about 100ms, the optimal sampling frequency should be this.Anyway, on a more intuitive ground, my thinking is that I should remove the D from the PID to make my life easier (PID stability easier, overshoot less likely, yada yada). When looping on the int i = analogread(); function a cycle takes about 100us.Code:loop(){int i = analogread() // takes ~0.1ms}It seems that could be speeded up with some trick I don't know/need. So, just addingCode:target = xxxxintegration = 0last_time = millis()loop(){error = analogread() - target; // takes ~0.1mserror_integration += error; // takes ~ 1 clock cycle (16MHz)analogwrite( P * error + KI * integration );}should not be much slower, say 200ms. Just to refresh, it seems to me the glow plug (0.2-0.5 ohm resistor) gets red-white-fried within 100ms, so Ifeel likethe uno should be fast enough by some very large margin.That would be convenient some king of theorem/formula thingy could tell us : your system time constant is T, so your PID should work with such and such sampling time constant.

author: Buriedcode
author_rank: Super Contributor
timestamp: April 14, 2016, 10:48:13 am
content: Ok, before you get bogged down in PID loops and specifics, some questions:What power supply are you using for the glow plugs?Is this current limited, or voltage limited?What is the maximum current, and voltage for the glow plugs?Using you ADC to measure current is all well and good, but what about scaling the current? Reference voltage?The ASC712 outputs a voltage relative to current, centered at 2.5V. 0.2V/amp. That gives you a huge range of currents to measure, and I know you can't use low-side current sensing because the glow plugs are all commoned, but also means if you need to limit the current to say 3 amps, you've only got 0.6V range. My point is, depending on what your PWM is controlling (voltage output of buck converter? or just a MOSFET switching the plugs across a common power supply) you should have set limits, and a 'default' value whereby its in steady state. Things get tricky if you're trying to measure in absolute terms

author: kikinou
author_rank: Contributor
timestamp: April 14, 2016, 09:52:53 pm
content: Quote from: Buriedcode on April 14, 2016, 10:48:13 amI like this idea of setting a 'default' value. Before the engine is started (that's flipping the prop hopping the mixture fires), I can measure the current and thus set the default current value of that particular glow plug for that particular regulator/pot setting. Then, if the current drops by say 5%, I do detect that the engine is ON. Yahoo ! That sentence may sounds stupid if you don't recall that I have multi cylinder engines. So one of my problems is to detect whether or not all cylinders are on, before taking off. Because, after taking off, it is pretty noticeable, but too late.If the current is zero in the first place : that will tell me that the glow plug is broken. And that is a winner because I will stop wasting my afternoon (removing tens of screws, engine cowl, pipes, servo connections and so on) trying to figure out what's going on.If the current is funny, that might also be a useful information. We'll see.

author: kikinou
author_rank: Contributor
timestamp: May 11, 2016, 10:43:32 am
content: Here are the schematic and board I sent for PCB manufacture.I moved on with a regulator (it adapts readily to various battery) though I give a try to the 555+MOSFET idea : sounds fun to me.I chose to build two boards : one of the glow plug driver, and one for sensors. I am hoping to get smart enough so I can daisy chain the drivers and sensors so the same hardware self adapts to the targeted one, two, three and nine cylinders.Circuit protection wonderingI hoped I got right the circuit protection with the D1 & D2 diodes and the PTC1 & PTC2 reversible fuse. This might be better than nothing, but I am wondering whether this could be improved.The PTC3 is supposed to cut above 5A within 10ms when the user creates a short-circuit (it is often quite hard to plug the cable in the engine cowl, so short-circuit are regular). During normal operation, the glow plug (a ~200-500 mOhm resistor) drains about 2.5-3A. But, when short circuit, the wires should be about 50mOhm, so the current could peak at about 1.5V/0.05 Ohm ~ 30A. This could kill the expensive current sensor as well as the regulator.How to improve this short circuit protection ?Optocoupler wonderingI regret I did not put an optocoupler in between the ATTINY MCU (pin 6) and the regulator (pin 5). They are powered by two individual batteries.- Would two individuals ground planes be better ?- Is it better to separate high power and low power circuits ?

author: kikinou
author_rank: Contributor
timestamp: May 27, 2016, 06:20:19 am
content: Components and PCB just have been delivered. I am getting nervous.

author: kikinou
author_rank: Contributor
timestamp: June 02, 2016, 09:18:56 pm
content: Yahhooooo ........... it doesn't work.Not even the simple ON LED that is just behind the protection circuit and a filtering capacitor.How to trouble shoot. My plan is to check voltages. For instance, the series resistor of that LED should be 5.2V, and it is around 3V. My plan is to use the multimeter to try to guess what's wrong, then pop components with the hot air gun. Remember, I had the circuit working on the breadboard. But I screwed up somewhere, somehow. But how many times ??I uploaded everything ongithub:

author: MrsR
author_rank: Regular Contributor
timestamp: June 03, 2016, 08:59:19 am
content: There is a commercial unit that will increase current/voltage to flooded Glow Plugs.Try DESERT AIRCRAFT AUSTRALIA they had a number of units last time I looked and are very help full.ALL THE BESTRachael

author: kikinou
author_rank: Contributor
timestamp: June 03, 2016, 09:34:20 am
content: Geeezz, that sounds like a fantastic idea.I did not know about it, even though I noticed I was kind of doing it manually. Indeed, somedays, I applied up to 3A through the ~200mOhm glow plug resistor on an eventually flooded cylinder. Sometimes, in particular when it is not the first flight of the day, I just need a more conventional 2.5A. Also, to improve the idling RPM (which I really need/like on some of my 4 strokes engines), a slightly lower voltage is needed. So I might also improve glow plug life time, though I don't really have such problems.How does their unit work ?I could / will upgrade the current design (seegithub) such that the attiny (that easily deciphers radio servo signals) can tweak the regulator voltage (with V_ADJ potentiometer on the schematic/board).I don't know yet which kind of modification I need. I am going to do some research.Many many thanks for that hint.Using an on board glow driver without this idea made me loose this "starter" functionality. And that was a downside.Many many thanks

author: Buriedcode
author_rank: Super Contributor
timestamp: June 04, 2016, 11:59:16 pm
content: Quote from: kikinou on June 02, 2016, 09:18:56 pmI really don't understand what you are trying to do on that schematic. If you were driving them with constant current, why is the microcontroller there? The comparator? Now you've made boards, of course its best to use what you have so not to waste anything, but I fear you may have done what we've all done at some point - got lost on the little things, the details, and lost sight of the bigger picture. I would have thought a small 'module' for each glow plug, perhaps with a control on/off signal, or simply an analogue voltage in that controls the current for each plug. Using a dedicated current monitor seems overkill.I'll re-read the thread to try and work out exactly what you're doing. As for your boards - what *exactly* have you designed them to do?

author: kikinou
author_rank: Contributor
timestamp: June 05, 2016, 12:22:44 am
content: Please don't re-read the thread : let me put together a concise drawing tomorrow.{" Yahooooo....." + nice picture + "it doesn't work "} was meant to be funny.You're right : I indeed moved on with little modules.I will put together a pretty drawing instead of thousand words to improve the thread and my thoughts. But long story short : one big MCU and a few littles ones. You guess this right.- The big one is for the screen, bluetooth, airspeed, barometer, thermometers, the SD card. That board is meant to be the same for the 1, 2, 3 and 9 cylinder engines. I started writing code for the AVR, but now I am playing around with a pi zero. A pi zero shield sounds like a more attractive way to go. It might be cheaper. Writing python code is faster, though I love C.- Each little module has an tiny MCU (attiny85 - 8 pins) that deciphers the PWM signal from the receiver. Then, it switches ON/OFF the glow plug driver. It also digitizes the sensed current and sends it back to the main board with the big MCU (it seems like I2C should work). The comparator simply switches a LED ON when there is current (more than ~1A) through the glow plug : so I know the glow plug and the connectors are not totally dead. I should have chosen an attiny84 (14 pins) to get more pins : I did not know about this one.But I will put together a drawing with functional blocs tomorrow. That will clarify my thoughts.

author: kikinou
author_rank: Contributor
timestamp: June 05, 2016, 09:45:26 am
content: Here are the ideas, as of now :Before flight:- cylinder running? --> with cylinder temperature and glow plug resistor value - mixture rich? --> RMP + temperature- readings? --> either smartphone, LCD screen, working fake instruments panelsAfter flight:- SD card --> use my laptop to plot the flight pattern (barometer height + airspeed) and check cylinder temperatures & RPM to improve or to make reliable the engine settings, trough the whole flight envelope.That sounds both crazy and realistic to me. For sure, I am having fun with this project. For instance, with the radial 3, I have trouble to know wether 2 or 3 cylinders are running. When the engine cowl is screwed, I don't have access to cylinder tuemperature. My ears have hard time to recognize the sounds. The RPM is an indicator, but I don't have one. I stalled just after take off, at 2 meters high, because I mistakingly thought I had the power of al 3 cylinders.