Arduino Glow-plug Controller, Build & Walk-through

TheHappyHacker

Registered User
Joined
Nov 3, 2024
Posts
12
Reaction score
32
Location
Alberta/Newfoundland-Canada
Hi everyone, I'm starting this thread to help anyone who wants to build a glowplug controller from scratch. Personally I couldn't justify spending money on the 7.3 controller, when you can get similar results with a $10 arduino and a bit of wire. Currently I have a push button to run what plugs are left, but I'll be updating this thread as I build the system and get it installed.

The goal is to make this process as easy as possible. So that anyone who knows how to copy/paste, and use wire crimps, can follow along without issue. In this post I'll be going over the basics of the project, such as:

-*** is an arduino?
-what will it do, and how does it work?
-what parts and tools are required?
-How does this go in my truck?
-and how can we take this further?

Arduino, What is it and why should I care?
An Arduino is a small, programmable circuit board that lets you control electronic components like lights, motors, and sensors. You can code it to respond to inputs (like pressing a button) and create outputs (like flashing an LED), making it great for DIY projects and learning electronics. There are other threads on this forum with members using Arduino's in various ways, but they typically don't go into detail in a way that another average home mechanic could understand. However, if more people started to use these in their projects, we could see a ton of innovation in a very short amount of time. They can control almost anything you want, your imagination is the limit.

This is perfect for us because we can use it to run the glow-plugs, and even have it change the cycle length depending on the temperature. We can even include a "fail-safe" and have it cut the cycle if the glow-plugs get up to temp before the cycle is finished (like when you have 1 or 2 failed plugs in the system) thus preventing overheating and blowing up more glow-plugs.

Okay, So how does it work?

The way I'm going to set this up will be to use the Arduino as a basic logic controller. Once it gets power from the key, it will read the ambient outside temperature, as well as the temperature of the engine to determine how long to cycle the glow-plugs for. We can also connect it to the factory glow-plug light or buzzer, and have it work just like the stock system would. We will also probe into the power wire for the glow-plugs themselves, so we can read how much resistance there is. This will be how we detect a failed plug, and prevent ourselves from over running the remaining glow-plugs.

What parts and tools will i need?
Parts List: (estimated)
-Arduino (I'm ordering an ELEGOO UNO project starter kit {some parts may come in handy})
-Temp sensor (like the DS18B20)
-Current sensor module (like the ACS712 or INA219)
-22-24 awg wire for the Arduino
-12 awg wire for our custom glow-plug harness
-4 awg wire to feed the glow-plug harness 12v and handle current draw.
-Heat shrink tubes
-Electrical tape
-Barrel-connector type glow-plugs and dielectric grease (optional epoxy if you follow the upcoming epoxy waterproofing guide)
-Braided wire sleeves (to keep the harness neat and tidy)(optional)
-Mini Display screen (I'm installing this in the dash to show a timer, temps, and if there's a plug failure)(optional)
-LED bulb (if not using the factory glow-plug light/buzzer)
-Push button for manual over-ride (bypass the controller and run plugs manually in case of failure)

Tools List: (estimated)
-Basic PPE
-Any laptop/desktop computer
-Wire cutters
-Soldering iron (optional, can use crimp connectors but not recommended)
-Small torch/lighter
-Hot-Glue gun (for attaching Arduino to the inside of the gauge bezel by the g-p light)
-Multi-meter (to test the circuit and find any faults prior to install)
-Any wrenches/screwdrivers needed to remove the old g-p system (were only keeping the light and relay)


In the coming days/weeks I'll be updating this thread with Pictures of the build process and step-by-step instructions going over installation and troubleshooting. Tonight I'll be uploading a few simple diagrams depicting how the system will be laid out and wired in, as well as a few snippets of sample code for the Arduino. I can not stress this next point enough. You don't need to be a programmer or computer wiz to follow along! Once i place the order, and the Arduino arrives from Amazon, I'll test and upload my code so you can all copy/paste your way to success. I just hope this encourages a few of you to delve a bit deeper, and begin implementing these tools and techniques in your own projects. In the mean time, while I'm waiting for snail mail, I'll be scratching down some rough code and testing things. If you have any questions feel free to ask away. There's no such thing as a dumb question in this thread. If someone is wanting to understand more about the project or how they can apply this to another idea, I'll answer to the best of my ability. Also I'm definitely open to suggestions for extra functionality we can include.
 

TheHappyHacker

Registered User
Joined
Nov 3, 2024
Posts
12
Reaction score
32
Location
Alberta/Newfoundland-Canada
For anyone who's inclined, I had ChatGPT spit out some sample code in C++ to share as a brief example of what t would look like, and to tease a couple of the other circuts I'm adding in the mix. This is an untested example, and not the code i will be using in the project.

For those of you who don't really understand code, anything after a double slash (//) is a comment describing the corresponding section of code:

#include <OneWire.h>
#include <DallasTemperature.h>
#define TEMP_PIN 2 // Pin for temperature sensor
#define GLOW_RELAY_PIN 3 // Relay pin for glow plugs
#define FUEL_PUMP_PIN 4 // Relay pin for lift pump
#define FUEL_HEATER_PIN 5 // Relay pin for fuel heater
OneWire oneWire(TEMP_PIN);
DallasTemperature sensors(&oneWire);
// System Variables
int ambientTemp = 0; // Ambient temperature
bool engineWarm = false; // Flag for engine warm state
const int glowPlugTime = 10; // Time in seconds for glow plug operation
void setup() {
Serial.begin(9600);
pinMode(GLOW_RELAY_PIN, OUTPUT);
pinMode(FUEL_PUMP_PIN, OUTPUT);
pinMode(FUEL_HEATER_PIN, OUTPUT);
sensors.begin();
}
void loop() {
sensors.requestTemperatures(); // Request temperature readings
ambientTemp = sensors.getTempCByIndex(0); // Get temperature in Celsius
// Call each subsystem function
controlGlowPlugs();
controlAuxiliaryLiftPump();
controlFuelHeater();
logDiagnostics();

delay(1000); // Loop delay for stability
}
// Subsystem Functions
void controlGlowPlugs() {
if (ambientTemp < 0 || !engineWarm) { // Condition to run glow plugs
digitalWrite(GLOW_RELAY_PIN, HIGH);
delay(glowPlugTime * 1000); // Convert to milliseconds
digitalWrite(GLOW_RELAY_PIN, LOW);
}
}
void controlAuxiliaryLiftPump() {
// Logic for priming or auxiliary pump
digitalWrite(FUEL_PUMP_PIN, HIGH); // Example action
delay(500); // Delay for priming
digitalWrite(FUEL_PUMP_PIN, LOW);
}
void controlFuelHeater() {
if (ambientTemp < 10) { // If temp is low, turn on fuel heater
digitalWrite(FUEL_HEATER_PIN, HIGH);
} else {
digitalWrite(FUEL_HEATER_PIN, LOW);
}
}
void logDiagnostics() {
Serial.print("Ambient Temp: ");
Serial.print(ambientTemp);
Serial.println(" C");
// Additional logging for other systems could go here
}
 

Nero

HD Diesel nut
Joined
Jan 3, 2022
Posts
3,180
Reaction score
3,505
Location
OR
Hah. Nerd. Absolutely love it. Bit of new with a bit of old. When my GPC fails I might have to try this. Adding to bookmarks. Thank you for sharing!
 

TheHappyHacker

Registered User
Joined
Nov 3, 2024
Posts
12
Reaction score
32
Location
Alberta/Newfoundland-Canada
Hah. Nerd. Absolutely love it. Bit of new with a bit of old. When my GPC fails I might have to try this. Adding to bookmarks. Thank you for sharing!
Thanks! I always take the nerd jab as a compliment. :cheers: It's getting cold out, so I should have the rest of this project done shortly with the Instructions coming out as I go. Should have the wiring schematic and some diagrams up soon.
 

david85

Full Access Member
Joined
Feb 21, 2008
Posts
4,899
Reaction score
1,190
Location
Campbell River, B.C.
Ah...I miss bread-boarding. I'm interested in how this turns out. I have a solid state controller on the shelf but it won't work on my 6.9 IDI, especially since I switched to dual coil glow plugs. Would be nice to have automatic glow plugs because I want to add a remote starter eventually.
 

TheHappyHacker

Registered User
Joined
Nov 3, 2024
Posts
12
Reaction score
32
Location
Alberta/Newfoundland-Canada
I have started a Github Repository (fancy page for sharing code) here:


[/URL]



This is where I will be uploading all the code required for this project, among others. You will also be able to find diagrams, schematics, and printable guides as they become available. I created the project under the MIT open source license, to promote the free use of any project material. All of the Code, Instructions, Documentation, and Other aspects are 100% free, and yours to use and share as you see fit. (please see the license section on the git for more info)

It's a bit barren at the moment, but will be populated with the mentioned documents in the coming hours/days,
and I have also included links back to this thread in the main README.md file. The Github Repo will be updated along with this build/tutorial thread.

Thanks again everyone for checking out the project. More to come soon!

Ah...I miss bread-boarding. I'm interested in how this turns out. I have a solid state controller on the shelf but it won't work on my 6.9 IDI, especially since I switched to dual coil glow plugs. Would be nice to have automatic glow plugs because I want to add a remote starter eventually.
That would be sweet, probably wouldn't be too much harder to work a remote start circuit into this itself. I don't know why I didn't plan that in the first place lol
Thankyou
 

ifrythings

Full Access Member
Joined
Dec 17, 2011
Posts
743
Reaction score
499
Location
BC
You have a great project idea but you need to back up a few steps and solve some major hurdles that you haven’t mentioned yet. What are you going to do to run the arduino in a vehicle? You can’t just hookup the Vin to the fuse box and expect it to live very long with load dumps from the alternator, noisy electrical environment and most of the arduinos only have up to 13-14v input capability before you kill it.

What are you going to use to drive the glowplug relay? That thing draws 6-8amps and has the inductive kickback to light your bbq…. Your temp sensor is only good for in the cab, can’t stick it in the block either.

Current sensor won’t handle the initial current draw from cold glowplugs (my testing of the glow plugs showed a 50amp draw from one plug for a few seconds before going down to around 20ish amps when hot, 8x50amps=400amps) and isn’t water proof either.

One thing I would recommend is not get carried away and add a ton of random options to this, keep it as a glow plug controller and nothing else, you can add in a few temp sensors but really you only need one (the 7.3 PS just uses oil temp to control the glowplug time), I recommend using Ford temp sensors that are connected to the computers (2wire ones with water proof plugs) they are dirt cheap or even free at a lot of wrecking yards, they only need a few resistors to bias them to work, they practically never fail and come in a multitude of different packages.

I would skip the current measurement, it’s one of those neat to look at the first 5-10 times then you never look again.

If I were to do this I would look into smart high side mosfets, they have all the protection circuits built in so they don’t die if a wire shorts out, can tell you when the load goes open on them, they also have a current proportional output that you could measure and figure out the current flowing through the device, can easily be driven by the arduino itself but they do require a circuit board and aren’t the cheapest things to buy ($10 each and you’d need 8 of them).

I would also design it to fit in the factory location and use either LIN bus or CAN bus to talk to whatever display you have in the dash or just keep it simple and have it run a preset time when the ignition turns on.

Do keep in mind that the majority of guys on this site won’t be able to build this, it’s not like installing a light in a home where it’s 3 wires and a few wire nuts and it’s good to go. This is more like rebuilding a 10 speed transmission that scattered its parts down the highway and no manual to go with it.

Now if you were to make a product out of this that hooks up like the house light example above then I can see people getting on board more.

Sorry for sounding so negative but there’s lots of things to think about and a ton of “got yeahs” involved. I’ll try and help answer any questions you have and share the bit that I know.
 

Jesus Freak

Full Access Member
Joined
Apr 3, 2022
Posts
3,495
Reaction score
4,152
Location
Crestview, FL
Ya know, I thought I spent a lot of time "reinventing the wheel" and "going around my elbow to get to my rear end", but this takes it to the next level. @BlindAmbition has some stuff going on in this realm I believe.

Edit: please understand, I'm all about it though.
 
Last edited:

XOLATEM

Full Access Member
Joined
May 5, 2023
Posts
861
Reaction score
1,098
Location
Virginia... in the brambles
This is more like rebuilding a 10 speed transmission that scattered its parts down the highway and no manual to go with it.

You got my attention...
Is that a 5-speed with a high-low unit..? I would not mind tackling that one...

I might gripe a little at first...at the driver not knowing how to drive or the PM guy not keeping it full of oil...

and solve some major hurdles
I appreciate the thinking along these lines and if I was a sparkhead I would be doing the same thing (trying to warn someone of things that will destruct if it was not thought completely through..)...but...

Just like SpaceX probably had to lose some expensive hardware and time to accomplish what they finally have...I got the feeling that we all have to show some broken stuff so that all of us can learn...

has the inductive kickback to light your bbq…
I got a real chuckle out of this visual...I think that I would like to build a good potato cannon and power it up with some kind of electronic device...

If I were to do this I would look into smart high side mosfets, they have all the protection circuits built in so they don’t die if a wire shorts out, can tell you when the load goes open on them, they also have a current proportional output that you could measure and figure out the current flowing through the device, can easily be driven by the arduino itself but they do require a circuit board and aren’t the cheapest things to buy ($10 each and you’d need 8 of them).

I would also design it to fit in the factory location and use either LIN bus or CAN bus to talk to whatever display you have in the dash or just keep it simple and have it run a preset time when the ignition turns on.

All of this make my head want to explode...but...I am willing to learn...

Probably would be good to have a bit of this in my quiver...

Current sensor won’t handle the initial current draw from cold glowplugs (my testing of the glow plugs showed a 50amp draw from one plug for a few seconds before going down to around 20ish amps when hot, 8x50amps=400amps) and isn’t water proof either.

This is really good to know...Thank you for that bit of info...
You can’t just hookup the Vin to the fuse box and expect it to live very long with load dumps from the alternator, noisy electrical environment and most of the arduinos only have up to 13-14v input capability before you kill it.

That is also a very sobering piece of info...I feel my synapses getting exercised...
Now if you were to make a product out of this that hooks up like the house light example above then I can see people getting on board more.

This reminds me of an S-10 I worked on one time that had acorn nuts in the rats nest of wiring...I straightened it all up and hid it all in conduit...looked real clean when I was done...

Do keep in mind that the majority of guys on this site won’t be able to build this,

Maybe...you might be right...I would like to see how much response and enthusiasm is generated by this thread...who knows...might even pick up a few more members..?

It is super generous of the guy to make all of this effort for all of our benefit.

I may try to build this device and try it out...

Sorry for sounding so negative but there’s lots of things to think about
I think that your heart is in the right place and I am sure that the OP will agree...I just have to quote a fortune cookie I had a long time ago...

"Don't be afraid of adversity...remember...a kite rises against the wind..."

I’ll try and help answer any questions you have and share the bit that I know.

That is super generous as well....sharing the knowledge is a sincere form of caring for your fellow man....

Just my un-asked-for $ .02
 

KansasIDI

I hate printers
Supporting Member
Joined
Jan 21, 2023
Posts
1,651
Reaction score
1,470
Location
Wilsey, KS
Just like SpaceX probably had to lose some expensive hardware and time to accomplish what they finally have...I got the feeling that we all have to show some broken stuff so that all of us can learn...
Hell yes. Research and destruction. Then figure out how to fix it.
 

TheHappyHacker

Registered User
Joined
Nov 3, 2024
Posts
12
Reaction score
32
Location
Alberta/Newfoundland-Canada
Thanks for the feedback, I know things look loose at the moment, but I addressed a few of these hurdles last night while designing the schematic.
What are you going to use to drive the glowplug relay? That thing draws 6-8amps and has the inductive kickback to light your bbq…. Your temp sensor is only good for in the cab, can’t stick it in the block either.
* this will be controlled buy a gsv-1 relay between the Arduino and The main GlowPlug Relay (which has flyback protection) and a NPN Transistor to trigger said relay. (likely either a TIP120 or 2N2222) Once this system is tested It will be adapted to a PCB.

* The ambient Temp Sensor (DS18B20) will be the engine bay, but don't forget this is an ambient temp sensor, and is used in tandem with the block factory water temp sensor to determine the glowplug cycle. Its ment for environments like being submerged in water, or covered in dirt, so this should work great.
Current sensor won’t handle the initial current draw from cold glowplugs (my testing of the glow plugs showed a 50amp draw from one plug for a few seconds before going down to around 20ish amps when hot, 8x50amps=400amps) and isn’t water proof either.
*this will be read with the ACS712 module (avaliable rating from 5-30A(im using a 20a)), which will have a few other protections in place on the circuit. It will be integrated in the harness non-invasivly, and reads the current draw as an anolog voltage reading to one of the pins on the arduino..
I would skip the current measurement, it’s one of those neat to look at the first 5-10 times then you never look again.
*I'll be leaving this in the design, as it's not intended to be watched constantly, but so the arduino can indicate a failed glow-plug and stop me from potentially blowing more.
Do keep in mind that the majority of guys on this site won’t be able to build this, it’s not like installing a light in a home where it’s 3 wires and a few wire nuts and it’s good to go. This is more like rebuilding a 10 speed transmission that scattered its parts down the highway and no manual to go with it.
* I understand that most people wont be inclined to attempt a project of this scale, but really anyone who can use a multimeter, soldering iron, and wire snips should be able to pull this off without issue, and I'll be fumbling through the r&d so you don't have to. There re folders on the github page that will contain the Schematics, as well as Easy to follow instructions that can be printed off! These resources will be made available as they are completed, and i will update you all here once they become available.
Now if you were to make a product out of this that hooks up like the house light example above then I can see people getting on board more.

Sorry for sounding so negative but there’s lots of things to think about and a ton of “got yeahs” involved. I’ll try and help answer any questions you have and share the bit that I know.
Feel no need to apoligize, like I said before, there are no wrong questions and I'm openly welcoming any and all feedback. In the near future once I have finished testing the components, I could look into making some of the more complex circuits on pre-made PCB chips that anyone can order online. Theres lots of companies that will make you a circuit board from a design you send them, and the software I'm using to make the schematic has this feature to design said PCB from the schematic. (now if this really takes off after compleation, I might need to contimplate making kits)

Aside from the printable instructions and schematics, I'm now thinking about posting videos on YouTube to visually outline the process, as many of you (myself included) love learning on the university of YouTube. Thats where I learned how to use an arduino as a full blown stand-alone ECU for my last subaru (Speeduino)


Where things are now:

So far, I have the majority of the parts list completed, and I'm making headway with Designing the schematic. These, along with some of the other documentation will be made available very soon (possibly tonight/tmrrw mrning). The source code is soon to follow along with the Insructional documentation (need to order the arduino in the next day or two,then testing begins). A friend of mine (who's not on the forum) is hopping on board, and working on the code with me. This should speed up development. We are also planning out an introductional video to go over the basics, and to showcase the R&D side of the process. Followed by instructional videos as the install progresses. This may take a bit more time, but would help by significantly reducing the difficulty curve of the project for the average reader, if they had a video aid.

Thanks everyone for all the feed-back and support! more to come soon..
 

ifrythings

Full Access Member
Joined
Dec 17, 2011
Posts
743
Reaction score
499
Location
BC
I’m not sure exactly how you plan to use the ACS712 to measure glowplug current, it’s way too weak to even read one glowplug nevertheless 8, even using 8 ACS712 still won’t work. Look up

VN7007AHTR​

It’s a high side driver that has a ton of protections, current sense, can be driven from the arduino directly and gets rid of the fail prone glowplug relay, ya you need 8 of them but then you have 8 separate current sensors and switches in one with open load detection(burnt out glowplug detection).

One can spin a board out with 8 of those, an atmega328p and basic voltage regulator with protection fairy easily.

I’d recommend if you can look at the 6.0L/6.4L glowplug controller for ideas as that’s what they did(and no you can’t just use the 6.0L/6.4L controller on the idi glowplugs, they draw to much current and cause the glowplug controller to turn off right away, I tried this already), even the 6.7L uses the same type of circuit and control.

Also keep in mind break downs and part availability, Amazon is a week plus wait for me so a silly temp sensor failing isn’t as easy as walking into a parts store and getting a common temp sensor and most of the arduino stuff on Amazon/ebay/aliexpress is very cheap junk that barely works in your house never mind -40 to +200f temperature swings and harsh automotive environments.

Just keep in mind your goals for this project, reliability, ease of use, part availability and low cost vs the ford controller should be some main goals, again just my humble opinion.
 

divemaster5734

Full Access Member
Joined
Aug 23, 2009
Posts
305
Reaction score
250
Location
Olympia, Washington
For anyone who's inclined, I had ChatGPT spit out some sample code in C++ to share as a brief example of what t would look like, and to tease a couple of the other circuts I'm adding in the mix. This is an untested example, and not the code i will be using in the project.
Ha, that's brilliant, haven't tried AI to write a sketch, but haven't played with PLC's since attempting a Christmas
animatronic display. Sure beat's trying to Frankenstein pieces of others to custom fit.
Didn't read through this entire post but I'm guessing you'll make a filter for the cpu to smooth out the DC pulses and limit over voltage?
Cudos to you for posting this, will be following.
 

TheHappyHacker

Registered User
Joined
Nov 3, 2024
Posts
12
Reaction score
32
Location
Alberta/Newfoundland-Canada
Didn't read through this entire post but I'm guessing you'll make a filter for the cpu to smooth out the DC pulses and limit over voltage?
I'll be taking that into account yes, all of these extra little circuits involved will be included in the schematic that is soon to be added to the /docs folder in the github repo. Along with adding all the resistors, fuses, relays, etc to the parts-list. My truck Cheech is going to serve as a guinea pig, and were ordering a few extra arduinos lol
 

franklin2

Full Access Member
Joined
Feb 24, 2009
Posts
5,391
Reaction score
1,690
Location
Va
I am wondering about your theory on the amperage measurement and it's requirement.

You want to "protect" the other plugs if one goes bad? I do not see the other plugs going bad if you are using your temp sensors for the engine temp. If you have a time versus temp curve, I think that might work well, be more reliable, even if you have a bad glowplug or two. I do not see that prematurely blowing out the other good plugs. Unless there is something I am missing.

Keep your design to the bare minimum that will work. This will reduce cost, complexity, and have less failure points. Don't be like a lot of engineers I used to work with. They over engineered things because they were....well...engineers. If something simple worked, they felt the brass in the office would not be that impressed, even though the simple design worked better and lasted longer.
 

Forum statistics

Threads
91,933
Posts
1,140,547
Members
24,755
Latest member
Jt64

Members online

Top