Bricknose Sender to Bullnose Gauge Interface

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Bricknose Sender to Bullnose Gauge Interface

Gary Lewis
Administrator
This post was updated on .
I'm going to document my research here regarding an interface between Bricknose fuel sending units and the Bullnose fuel gauge.  And the overall plan is to use an Arduino Uno to do the work.  Here's a block diagram, with the things in red being the added parts for the interface:



Next, here's the logic in doing it:

The resistance for the sending unit in the 1990 fuel delivery module I'll be using will be 22.5 ohms when the tank is empty and 145 ohms full - according to the 1996 EVTM.  One end of the resistor is tied to ground, so there will have to be a resistor from the 5v supply on the Arduino to the potentiometer/sending unit, meaning the circuit will go from the 5v supply through a resistor and connect there to both the analog input of the Arduino as well as to the potentiometer.

My calcs say that a 220 ohm pull up resistor will give .46v at empty and 1.99v at full, with a current flow of 21 and 14 milliamps respectively.

The resistance of the heating coil in the gauge is 12 ohms, and the Bullnose sending unit runs from 10 ohms at full to 73 ohms at empty.  That means with the 5.4v source we would have 250 milliamps of current at Full and 60 mills at Empty.  But if the digital output of the Arduino is turned on as a replacement for the sending unit it would be sinking 5.4 volts through 12 ohms, giving 460 milliamps.  So we need 60/450 or 14% duty cycle to generate enough heat to register Empty, and 250/450, or 55% to give Full.

But that current is too much for the outputs of an Arduino, so we need another board (shield) to sink the current.  Tindie makes a 16-channel shield, but it is $39.  However, I really don't need 16 channels, so I'll just need to find another one to reduce the cost.  In any event, shields plug into the Arduino (stack, actually) so no wiring is needed.  Just connect the wire from the gauge to the screw terminal, connect the wire from the sending unit to an input pin, provide power, program it, and go.

Now we need to create an equation that gives 14% at .46v input, and 55% at 4.98v input.  Assuming a straight line then we need y=mx+b, and an online calculator gives y = .27X +.02.  Plugging .464v into that equation gives 14.5%, and plugging 1.98v in gives 54.9%.  Plenty close enough since none of the components we are playing with are that precise.  Further, the transistor used to sink the current won't take the voltage fully to zero.  But we now have an equation and can tune the "m" and "b" parts of it as this is implemented.

The next step is to write a "sketch" as it is called in Arduino.  And here's the basic sketch, although later I'll probably add an I/O routine to allow fine tuning the M and B parameters on the fly:

int outputPin = 3; //Establishes an integer variable that is used for the output pin #
int analogPin = 0; //Establishes an integer variable that is used for the input pin #
float m=.27; //Establishes “m” as a floating point variable and sets its value
float b=.02; //Establishes “b” as a floating point variable and sets its value

 void setup() {  //Starts the setup section

pinMode (outputPin, OUTPUT) ; //Sets the pin called outputPin as an output
}

void loop() { //Starts the loop section.  This gets run continuously.

int reading = analogRead (analogPin); //Reads the sending unit & returns a value between 0 & 1023, with 1023 = 5v
float voltage = reading / 204.6; //Converts the reading to the actual voltage of the input
float dutyCycle = voltage * m + b; // Calculates the duty cycle needed to power the gauge
int result = dutyCycle * 255; //Converts the duty cycle to the output range of 0 – 255
analogWrite (outputPin, result); //Starts pulsing the output at the calculated duty cycle
}

Then the sketch above needs to be turned into machine code via compiling.  I downloaded the Arduino developer app and added it to the compiler, which quickly found a minor error - a missing ";".  Once that was fixed I downloaded an Arduino simulator and tested it.  It worked!

Here's a screenshot of the simulator showing the input voltage of .49v, which is as close as I could get to .46v with the little slider on the lower right, and a duty cycle of 15%:





And here's a screenshot of the simulator showing 1.97v and a 55% duty cycle.  It works!  

Gary, AKA "Gary fellow": Profile

Dad's: '81 F150 Ranger XLT 4x4: Down for restomod: Full-roller "stroked 351M" w/Trick Flow heads & intake, EEC-V SEFI/E4OD/3.50 gears w/Kevlar clutches
Blue: 2015 F150 Platinum 4x4 SuperCrew wearing Blue Jeans & sporting a 3.5L EB & Max Tow
Big Blue: 1985 F250HD 4x4: 460/ZF5/3.55's, D60 w/Ox locker & 10.25 Sterling/Trutrac, Blue Top & Borgeson, & EEC-V MAF/SEFI

Reply | Threaded
Open this post in threaded view
|

Re: Bricknose Sender to Bullnose Gauge Interface

ctubutis
Those Arduinos are neat & cool! I wish we had them when I was first getting into electronics as a 12-13 yo kid... but of course we didn't have peecees and Apple was a fruit, the "portable" computer on which I played Adventure(0) was larger than a suitcase.

~~

That MOSFET Nanoshield thing... shipping to the USA starts at $40? eeeeek. :(

~~

But why, Gary, are you not merely using the correct sending unit? Are there none available anymore?

~~

(0) host% /usr/games/adventure

Welcome to Adventure!! Would you like instructions?
yes

Somewhere nearby is Colossal Cave, where others have found fortunes in treasure and gold, though it is rumored that some who enter are never seen again. Magic is said to work in the cave. I will be your eyes and hands. Direct me with commands of 1 or 2 words. I should warn you that I look at only the first five letters of each word, so you'll have to enter "northeast" as "ne" to distinguish it from "north". (Should you get stuck, type "help" for some general hints. For information on how to end your adventure, etc., type "info".)

This program was originally developed by Will Crowther. Most of the features of the current program were added by Don Woods. Address complaints about the UNIX version to Jim Gillogly (jim@rand.org).

You are standing at the end of a road before a small brick building. Around you is a forest. A small stream flows out of the building and down a gully.

enter
You are inside a building, a well house for a large spring. There are some keys on the ground here. There is a shiny brass lamp nearby. There is food here. There is a bottle of water here.

get keys
OK
Reply | Threaded
Open this post in threaded view
|

Re: Bricknose Sender to Bullnose Gauge Interface

Gary Lewis
Administrator
Chris!  Where ya been?

Yes, the Arduinos are neat.  I built an 8085-based microcontroller years ago that is far less capable than an Arduino.  FAR  And I had to write the OS and do all the wiring.

As for the shield, that was just an example, and a bad one as it is for a Nano and I'm using an Uno.  But there are plenty more - with very little shipping.

On the sending unit, you'll need to read the EFI For Big Blue thread to get the whole idea, but I'll summarize.  

However, first I'm looking for a solution that will be easily maintained by my offspring in the years to come.  And that rules out options like piecing things together with a sending unit from here and a pump from there.  I want a bolt-in solution.

And the options I found were:

1985 460: Most would think the "correct" sender would be for an '85 460, which is what Big Blue is.
  But, I'm going EFI and need higher pressure than the 460's pumps give

1985.5-6: Next up would be the system for a 1985.5-6 5.0L as they have the right sender an a high pressure pump.  But, a thread on FTE a few years ago that you and Bill were involved in it determined that the required frame-mounted switching valve is NLA - and they were very problematic so replacement is a given.  Unfortunately, my recent investigation shows that there might be one available today.

1990+: But the 1990 and later system uses Fuel Delivery Modules that have the high-pressure pumps in the tank with a shuttle valve arrangement for the return in there as well.  So the external plumbing is simply a wye in both the supply and return.  Simple.  And readily available.

So, I'm going with the 1990+ FDM's, which have the sending units that have a range that is backwards to that of the Bullnose as well as wider.  Enter the Arduino that can easily translate and calculate the width of pulse required to simulate the Bullnose senders.  But the current is a bit much so an add-on shield is needed.

Gary, AKA "Gary fellow": Profile

Dad's: '81 F150 Ranger XLT 4x4: Down for restomod: Full-roller "stroked 351M" w/Trick Flow heads & intake, EEC-V SEFI/E4OD/3.50 gears w/Kevlar clutches
Blue: 2015 F150 Platinum 4x4 SuperCrew wearing Blue Jeans & sporting a 3.5L EB & Max Tow
Big Blue: 1985 F250HD 4x4: 460/ZF5/3.55's, D60 w/Ox locker & 10.25 Sterling/Trutrac, Blue Top & Borgeson, & EEC-V MAF/SEFI

Reply | Threaded
Open this post in threaded view
|

Re: Bricknose Sender to Bullnose Gauge Interface

Gary Lewis
Administrator
This post was updated on .
I'm thinking of more possibilities for the Arduino since it'll have lots of left over computational as well as I/O power.  And, here are two ideas:

Bullnose sender to Bricknose gauges: The 1987 EVTM says that the Bricknose senders are 10 ohm for Empty and 210 ohms for Full.  But, not knowing what the resistance of the gauge itself might be I've realized I can't calculate the current flow and, therefore, the needed pulse width.

Ammeter to Voltmeter: I researched this idea a bit today.  The ammeter obviously requires a negative current to show discharge and a positive one to show a charge.  I tested one of my ammeters and what it took to swing it full scale was surprising: 0.15v @ .9 amp to go positive, and 0.17v @ 1.0 amp to go negative.  I was hoping to drive it directly from the Arduino, but it will require a high-current source like the fuel gauge.  And, I don't think it is very feasible.

The issue is the requirement to have a reversal of voltages.  One way to do it is to have a reference voltage, say 2.5v, above and below which another port swings.  That's not easy, especially given the amount of current needed to take the ammeter to full scale in either direction.  To create the reference voltage via a resistor bridge would require pulling more than 10 amps through the bridge - which would generate way over 100 watts.  That's just not feasible.  I need to rethink this......
Gary, AKA "Gary fellow": Profile

Dad's: '81 F150 Ranger XLT 4x4: Down for restomod: Full-roller "stroked 351M" w/Trick Flow heads & intake, EEC-V SEFI/E4OD/3.50 gears w/Kevlar clutches
Blue: 2015 F150 Platinum 4x4 SuperCrew wearing Blue Jeans & sporting a 3.5L EB & Max Tow
Big Blue: 1985 F250HD 4x4: 460/ZF5/3.55's, D60 w/Ox locker & 10.25 Sterling/Trutrac, Blue Top & Borgeson, & EEC-V MAF/SEFI

Reply | Threaded
Open this post in threaded view
|

Re: Bricknose Sender to Bullnose Gauge Interface

NotEnoughTrucks
Gary, I've had some success with my analog approach. Possibly some of my findings may apply to an interface with an Arduino solution as well.

I did some testing with a gauge cluster out of my 86. It was working when I dismantled the truck and I did my testing by applying 12.6 VDC to the flasher style IVR.

A few notes, I did check the IVR output with a test light and it does flash at about a 1hz rate with a 30 to 40% duty cycle. Peak voltage of course equals applied battery.

I tested the high and low limits of the fuel gauge. I found I needed 9 ohms to ground for a full indication and 50 ohms to ground for an empty indication. I was aiming for the exact line. Of course, the gauge will travel past E and F in normal operation. There is a certain amount of settling time required for the gauge to reach a nominal reading. There also seems to be some hysteresis in the needle movement as the settling point may not be exact depending on whether you are increasing, or decreasing the sender resistance, however it is adequate for the purposes of the gauge. The readings are repeatable and do not seem to be affected by small variations in the battery voltage. I tested as low as 11.5 V and as high as 14.6 V with no noticeable effect on the gauge reading. Certainly, there would be a point where calibration would be affected, but for normal operation, it is stable enough.

My lack of recent activity in such a project was reflected by a longing for some of the equipment I used to have at my disposal. Got rid of a lot of it when moving 15 years ago. End result was a lot of flying connections, but I was able to prove the concept. Now it's time for the technobabble.

Basically, my arrangement is a TIP41C NPN transistor arranged as a collector current sink to ground with a 9 ohm series resistor to the fuel gauge.I have the base snubbed with 1K and a 0.1 mf capacitor to ground and I was able to prove I can drive the fuel gauge accurately with a base current variable between 1 ma empty and 3 ma full. The movement is linear with the current change. I tested this with a potentiometer substituting for the sender and I'm going to try again with an actual FDM. There needs to be a little more development with arranging the fuel sender, but it is simply a voltage divider with a series resistor to the base of the transistor. I will incorporate hi and lo reading adjustments into this part of the circuit to allow for calibration and there would be no need to substitute components for such a purpose.  I'm going to make some drawings and a video when I have everything tied up a little better.
Reply | Threaded
Open this post in threaded view
|

Re: Bricknose Sender to Bullnose Gauge Interface

Gary Lewis
Administrator
Ray - This sounds very promising.  VERY.  But how are you going to accommodate the reversed range of the FDM: 22.5 ohms empty and 145 ohms full?  You probably explained, but it went right over my head.
Gary, AKA "Gary fellow": Profile

Dad's: '81 F150 Ranger XLT 4x4: Down for restomod: Full-roller "stroked 351M" w/Trick Flow heads & intake, EEC-V SEFI/E4OD/3.50 gears w/Kevlar clutches
Blue: 2015 F150 Platinum 4x4 SuperCrew wearing Blue Jeans & sporting a 3.5L EB & Max Tow
Big Blue: 1985 F250HD 4x4: 460/ZF5/3.55's, D60 w/Ox locker & 10.25 Sterling/Trutrac, Blue Top & Borgeson, & EEC-V MAF/SEFI

Reply | Threaded
Open this post in threaded view
|

Re: Bricknose Sender to Bullnose Gauge Interface

NotEnoughTrucks
Use the sender as the lower leg of a voltage divider. I'm thinking 47 ohm 2 watt series resistor from batt+ to sender. When sender is low, resistance is low and voltage at sender will be low. When sender is high, resistance is high and 47 ohm resistor will pull voltage high. Higher voltage makes higher current into base of transistor, increasing current CE. Lower voltage at empty reduces base current and reduces current CE. 9 ohm resistor is to limit current at full. Sender/voltage divider is quite low source impedence and the drive to the transistor base needs to be 1 to 3 ma. All Ohm's law from there.

Transistors configured like the drawing I put up earlier invert input /output 180 degrees.
Reply | Threaded
Open this post in threaded view
|

Re: Bricknose Sender to Bullnose Gauge Interface

Gary Lewis
Administrator
Perfect!  I knew I was missing something and that you were ahead of me.  
Gary, AKA "Gary fellow": Profile

Dad's: '81 F150 Ranger XLT 4x4: Down for restomod: Full-roller "stroked 351M" w/Trick Flow heads & intake, EEC-V SEFI/E4OD/3.50 gears w/Kevlar clutches
Blue: 2015 F150 Platinum 4x4 SuperCrew wearing Blue Jeans & sporting a 3.5L EB & Max Tow
Big Blue: 1985 F250HD 4x4: 460/ZF5/3.55's, D60 w/Ox locker & 10.25 Sterling/Trutrac, Blue Top & Borgeson, & EEC-V MAF/SEFI