Patrol 4x4 - Nissan Patrol Forum banner

1 - 16 of 16 Posts

·
Registered
Nissan Patrol 2011 CRD Ti
Joined
·
33 Posts
Discussion Starter · #1 ·
I've always been a tinkerer and looking for a boost gauge solution and I heard of Arduino a while ago so I looked it up. Amazed how cheap this stuff is and info readily available for just about anything. I've been fine tuning a boost gauge and dual battery setup on a small 1.3oled which will fit nicely in the square blank on the driver side near the hazard button.

Have a 3 bar sensor which will be used for boost signal and 2 - 24V sensors for the voltage. 1 12v-5v step to power the unit 24X7 off the second battery displayed on a 1.3 Oled. All of which cost me about $20

I wanted something small and unobtrusive to fit in a carling switch blank and came up with this. Here's a small video of it in action as well. Arduino Boost Battery I will one day look at obd2 solutions but for now happy to tinker with my own sensors.

Maybe it gives someone inspiration to learn something new in this time where our bums are on seats more often than not.

Cheers

518514
 

·
Registered
Nissan Patrol 2011 CRD Ti
Joined
·
33 Posts
Discussion Starter · #3 ·
Cheers @AndrieK. I'm looking to add more screens and just build on this. Ammeter is next. I too looked at EGT and will definitely look at when get a bung in.
 

·
Registered
All work done the hard way
Joined
·
502 Posts
Nice one. Any chance you could put up a more detailed "how to"? That looks awesome and I would be interested in learning how it was done.
 

·
Premium Member
2016 CRD wagon
Joined
·
1,453 Posts

·
Registered
Nissan Patrol 2011 CRD Ti
Joined
·
33 Posts
Discussion Starter · #9 ·
Ok here goes a 101 on Arduino but before I start I want it to be known that most of this stuff I have learnt by trial and error using other peoples sketches. Then tweaking/piecing together all the bits I want to make the final product and how I want it to operate and look. The sky is the limit really with this stuff its just up to your imagination.
From my original post I have snow balled out of control with different screens, touchscreen lcd's and all sorts of sensors but Ill take you back to where I started which could inspire any one of you guys.

So for this particular project you'll need
1 Arduino Nano
1 128X64 Oled with a SSD1306 driver
2 Arduino voltage sensors 0-24v
1 Pushbutton
1 100ohm resistor
1 Generic Boost Sensor 0-5V output. (Search this in ebay "3 Bar Map Manifold Absolute Pressure Sensor Turbo Boost")
Various jumpers and breadboard to assemble to test before final assembly (fully soldering)
Arduino program to load sketches and write them ---> Arduino - Software or from the windows store (Free!!)

Computer with 1 USB port to allow you to run the Adruino program.

You will require the Adafuit_GFX and Adafruit_SSD1306 Libraries

Once you have everything you can wire up as below.
522169


My code is a bit messy but basically what i set out to do was create a procedure (void) for each thing I wanted to do, and cycle through them with a push button. The code writes the logos at the startup then only writes the readings over the top of themselves. This ensures a very quick refresh rate. To create the logos I just used paint to resize a patrol logo to 128X18 or whatever size then convert to binary. There are many websites that can do this i used marlinfw.org. Once you have it converted you tell the sketch where to draw it via cursor position. You can see the binary code for each logo at the top of the sketch, you can also see the drawbmp command at the top of each procedure.

Most sensors are 0-5 volts output which the Arduino reads from 0-1024 on the analogue pins. So lets say you have Boost at 28PSI which is the max that my sensor can read, it sends 5v to the Arduino, the Arduino reads it as 1024. Your sketch formula calculates the boost reading to display the boost with some simple math. If it sent 2.5 volt to the arduino it would read 512 therefor your boost would be 14psi. Hope that makes sense and this is the case for all analog pins.

I have attached my code as a TXT you will need to rename to a .ino or simply copy and paste into a new Arduino sketch. Its a simple sketch you can easily build more menus by changing the pushbutton reset to 4 and adding another if function ==3. Then place your new procedure in there. Once you open the sketch and look right at the end this will make sense.

But basically if you get all these components, wire them up and load my sketch to the nano it should work just like mine in the video..(I think) You may need to adjust the analog pins for battery1 and battery2 in the sketch. I think from memory I used a pentameter (variable resistor) to simulate all these sensors off analog(0) until i got them.

If anyone needs a hand let me know.
Gav
 

Attachments

·
Registered
2005 Patrol ZD30 DI
Joined
·
122 Posts
Great write up! There's no reason it wound work with an Uno as opposed to a Nano is there?
 

·
Registered
All work done the hard way
Joined
·
502 Posts
Hey Gavcan, that's brilliant, concise write up. Great work! When I have finished some of my (many) current unfinished projects I will definitely give this a go, I have been interested in Arduino for a little while but haven't ever done anything about it. Keep up the good work! (y)
 

·
Registered
Nissan Patrol 2011 CRD Ti
Joined
·
33 Posts
Discussion Starter · #13 ·
Great job Mate! I tried something similar for an EGT gauge using a K-Type probe and a simple 16x2 LCD display but couldn't get accurate temp readings, so I eventually gave up. Boost was next on my list.

Yours looks really nice, especially the PATROL logo. (y) (y) (y)
Hey @AndrieK i got the egt working with a Max6675 sensor and any k-type probe with a temp range to suit.
My temps are around 280-300 mark cruising @100 and it I put the boot in gets over 400. Haven’t towed anything as yet. I’m guessing those numbers are about right for anyone else following this thread?
 

·
Registered
Nissan Patrol 2011 CRD Ti
Joined
·
33 Posts
Discussion Starter · #14 ·
I’ve been playing more and have nearly got to the stage where enough is enough but as with these things ill get another idea and so on and so on. Here's the latest.

Arduino Combo Gauge

522618


to add to the existing project-

BME/BMP280 sensor $5
Max6675 sensor (to read k-type sensor probes for EGT or any other thing you want to measure.) $10 each
uBlox neo6 GPS ~$40 can get cheaper
Changed to a Arduino Mega for more sensor inputs
Using tft 2.4 shield v3 as the screen. It has touchscreen capabilities but I had issues reading data while waiting for touch inputs so reverted back to push button.

The EGT Max6675 sensor seems to be very accurate at lower temps as it reads exactly the same room temp as my BME sensor. I'm going to use a second Max sensor with k-type to measure outside ambient temp.
The BME sensor reads barometric pressure which I think will come in handy when determining inclement weather.
 

·
Registered
'14 Y61 ZD30 CRD M/T ST
Joined
·
2,674 Posts
Hey @AndrieK i got the egt working with a Max6675 sensor and any k-type probe with a temp range to suit.
My temps are around 280-300 mark cruising @100 and it I put the boot in gets over 400. Haven’t towed anything as yet. I’m guessing those numbers are about right for anyone else following this thread?
That's great! I also used a Max6675 with a k-type probe but couldn't get stable temp readings. But that could've been due to multiple reasons, most likely I think, a dodgy probe... It's a while ago now so can't really recall.

Your EGT's seem a little low, I think, but it depends on where you fitted the probe. I might be speaking out of turn here but I think generally peak EGT's on a ZD30 is somewhere between 450 and 500 with the probe ~50mm from the turbo flange. But with most things like this, the exact value is less important than stable consistent readings.

You're on to a good thing here. Lots of possibilities. ;)
 

·
Administrator
Y2KGUII ZD Wgn
Joined
·
48,221 Posts
That's great! I also used a Max6675 with a k-type probe but couldn't get stable temp readings. But that could've been due to multiple reasons, most likely I think, a dodgy probe... It's a while ago now so can't really recall.

Your EGT's seem a little low, I think, but it depends on where you fitted the probe. I might be speaking out of turn here but I think generally peak EGT's on a ZD30 is somewhere between 450 and 500 with the probe ~50mm from the turbo flange. But with most things like this, the exact value is less important than stable consistent readings.

You're on to a good thing here. Lots of possibilities. ;)
550c with sensor within 100mm of the turbo flange is considered safe max for DI and 650c for CRD.
 
1 - 16 of 16 Posts
Top