Custom car gauge help (new to picaxe)

electrince

New Member

I want to build a gauge like this: http://www.markdepot.com/multi/
I am undecided what platform I should use (arduino or picaxe)
Where is the best place to start? is there a kit or something I can buy?
The link above mentions this site: http://www.wulfden.org/TheShoppe/k107/bundles.shtml
Things is i don't know much about this, those sites look confusing, and I don't know if it includes everything I need
Any other tips would be helpful? This is all new to me.

It seems I need analogue to digital board? converter?. Items recorded will be water temp and volts for a start. Then Oil temp, oil pressure other possible future ones air/fuel maybe boost.

Update: car is year 1990 and does not have obd or obd2. I am wanting a 4x20 lcd to fit what I want and leave room for he future. LCD is likely to be black on green or preferably red on black to match the rest of the interior lights.
 
Last edited:

AllyCat

Senior Member
Hi,

Welcome to the forum. That's quite an ambitious project if you don't have any experience. To quote from your first link:

"Update 3/18/2008: I haven't touched one of these in almost two years now and I'm not really interested in developing them any further. If you have any questions feel free to email me but I never made any schematics and don't have the time to make one."

Even PICaxe has changed quite a lot in 8 years! But unless you can find an "off the shelf" Arduino Project that you can copy, then I'd suggest that PICaxe is the way to go. We definitely can (and will) offer advice on this forum on how to use that display for water temperature and battery voltage. Some of the other sensors might be quite tricky (e.g. there is a current thread on measuring high engine temperatures).

If you're located in NZ, then wulfden (in USA) is probably not the best source (I don't think he is selling complete kits). If you're a little patient (i.e. prepared to wait a few weeks) then most of the components (except PICaxe itself) can be bought from China via ebay. For example, I have one of those (20 x 4 backlit) displays which cost around £5 (~NZ$10) from a "reputable" seller. For PICaxe, look for your local distributor, and/or Techsupplies (from UK) may be worthwhile for a complete order. There are forum members in NZ who may be able to advise further.

In principle, all that you need is one of the PICaxe prototype/development boards (PICaxe can read Analogue signals directly) and a display. Some displays are much easier to drive than others, so IMHO you should "research" that some more, before you buy an expensive one.

Cheers, Alan.
 

Pongo

Senior Member
Be sure that whatever display you select can be read in the light conditions in a car, in the sun.
 

papaof2

Senior Member
I'm all for building when you can but if the vehicle has an OBDII connector (most 1996 and newer vehicles do), the ScanGuage II monitors everything you may be interested in and also computes gas mileage (instantaneous and by trip/day/tankful). It's not cheap (about $160US) http://www.scangauge.com/products/scangaugeii/

No connection with the company except as a satisfied customer; the unit in my truck has been in service about 5 years.
 

electrince

New Member
Vehicle is 1990 and does not have obd. I want a red or amber on black display to match interior lights.
I was looking at the $34 one at the bottom of this page: but not sure if it includes everything I need.
http://www.wulfden.org/TheShoppe/k107/bundles.shtml

Yes I am in NZ. I would start with smaller projects e.g hello world and work my way up.
Any recommendations of suitable boards / kits?
 

rossko57

Senior Member
I think I'd be worrying more about inputs at this stage. How much data you might acquire would influence how much you need to display? How you are planning on acquiring the data would influence what you need to do that e.g how many ADC channels, and so on.
With no OBD to interrogate, you are stuck with parasiting off existing engine sensors (which could be few in number) and/or adding your own new sensors. That's easy enough for say water temperature, more of a challenge for AFR. Have a think about what you can do.
 

electrince

New Member
For a start I will do just volts.... and then water temp.
All up I want the capability to include
volts
water temp
oil temp
oil pressure
AFR and / or throttle position

Less important / future maybe's
Boost
exhaust temp
Intake temp

So correct me if I am wrong but I will need at least 6 analogue inputs. Was planning to tap into existing sensors or use additional sensors. I would not be able to fit more than 8 values max on a 20x4 display.
 

AllyCat

Senior Member
Hi,

First, the wulfden module is basically just a "display", but the "backpack" should make it fairly easy to "drive" (from any microcontroller). The similar Techsupplies (PICaxe) backpack is obviously better known on this forum, but the k107 does appear to have an advantage that it can control the backlight (brightness). But IMHO, it's probably "too early" to buy a display, unless you are also buying other components from the same supplier at the time (or if it's very cheap and may take a month to arrive from China).

In addition, you will need (at least) a power supply (not trivial for a car because the battery supply can be very "dirty"), an assembled microcontroller board (PICaxe or Arduino, etc.) and suitable sensors. Six analogue inputs shouldn't be a problem, a PICaxe 20M2 has more than enough, but some sensors communicate by other methods such as I2C or SPI (also supported by PICaxe, but you might need to go to an "X2" variant). For PICaxe you will also need a programming cable/adapter.

Typically, it's "Easy" to measure Voltage and (moderate) Temperatures, but there are various different types of sensor and factors to consider (particularly for high temperatures). Pressures are significantly more difficult and personally, I wouldn't know where to start with APR and throttle position. Also:

Was planning to tap into existing sensors or use additional sensors.
You may find that members on this forum (and others) are reluctant to help with actions that are potentially hazardous, and might even be illegal (modifications to a motor vehicle).

Cheers, Alan.
 

Pongo

Senior Member
You can also use an analog multiplexer chip to expand the number of analog inputs to the picaxe.
 

electrince

New Member
You may find that members on this forum (and others) are reluctant to help with actions that are potentially hazardous, and might even be illegal (modifications to a motor vehicle).
Cheers, Alan.
Hi appreciate the advice however regarding tapping into existing sensors I fail to see what could be hazardous or illegal about it. Maybe in England vehicle modification laws are allot more strict? I cannot forsee any hazards, unless for example if I used a poorly setup oil pressure sensor which leaked everywhere is that what you mean?

As said before, for a start I am only doing volts and then I will try water temp. The only reason I am talking about oil pressure, tps etc now is I want to ensure the hardware (board) etc I buy now can support future expansion so I don't have to buy things twice.
 

hippy

Technical Support
Staff member
Hi appreciate the advice however regarding tapping into existing sensors I fail to see what could be hazardous or illegal about it ... I cannot forsee any hazards
That will be a red flag to some people that this is not an appropriate project for you to be attempting with your current knowledge and experience.

It would be recommended to get a better understanding of the issues, the hazards, risks and potential consequences, before embarking upon such a project. Some of the issues are discussed in previous threads on the forum.
 

srnet

Senior Member
The hazards to me, although I am not a vehicle electrician, seem clear.

Some of whats being measured has safety implications, if for instance the sensors are 'tapped into' and it causes them to malfunction.
 

nekomatic

Member
To try and be a little more specific, some of the sensors mentioned (e.g. water temp) are probably harmless enough but you mention AFR or throttle position - what will happen if your circuit accidentally shorts out this sensor signal or puts an unexpected voltage on it? Could this result in the engine surging or cutting out while driving? Unless you have the knowledge of your car's control systems to be certain that that can't happen, I don't think you should consider tapping into an existing sensor signal.
 

rossko57

Senior Member
As a 1990 car, it is not likely to have an electric throttle that could take off by itself in response to noise on an input; nor is it likely that NZ forbids you messing with pre-OBD emission control systems. But _we_ don't know that, you are the one that ought to be considering these things.
Tapping into an existing sensor is "probably harmless" - until the new dangly wire picks up some electrical noise (lots of that in cars) - or until you accidently program a picaxe input as an output. It's not impossible, so you need to consider the consequences of error and also take steps to prevent it so far as is reasonable. That can be as simple as a high-value resistor in the line.

Understood that you want hardware to support the eventual sensor array. Still no-one can tell you, as you haven't thought much about that array. What _kind_ of inputs do you have in mind (not all car sensors output simple voltages - there can be pulse streams, PWM, etc.)?
A good start would be looking at what sensors are on your car, and what kind of outputs they give.
Then look at what's available to fill any gaps.
Once you've got a target list - say, 2 variable voltages 0-5V, 2 voltages 0-15V, two pulse streams - then you can make a shopping list to support that.
 

electrince

New Member
Point accepted regarding safety issues of tapping into sensors. I have a reasonable understanding of electronics, vehicles and how the electrical system in my vehicle works. I am a newbie to picaxe/micro controllers/coding. Being a 1990 car the system is pretty simple.

Completely accept the hazards something like a stray voltage to the tps could cause. However as stated above the only reason I am mentioning items such as tps etc is I want to ensure the hardware I buy is capable of this further expansion. Rossko57 has suggested that to purchase hardware which can handle future expansion I need to consider the types outputs these sensors I may include in the future give. Thankyou, I will look into this

There is no time limit on this project, it is a part time hobby learning experience. When I eventually get a board it will be quite a while before it is even connected to the car let alone connected to any sensors.

First I will get familiar with it, hello world etc
Then I will get it to measure the cars voltage
Then I will decide what measurement I want to tackle next.
Each new addition afterwards will be planned and thought out.

I am typically the type to 'measure twice, cut once'. I don't see any reason people would not want to help me but that is up to them. If it was suggested on here a certain action I wanted to take e.g tapping into the tps sensor posed too much of a safety risk then I would accept that, it is through asking for advice I discover these risk/limitations and precautions. Please remember I am completely new to this whole programming / micro-controller thing and know basically nothing, hence why I am asking.
 

electrince

New Member
This should put to rest the safety concerns, here are the types of inputs which will be measured in order of the ones I will tackle first to last:

Voltage: Need voltage divider
Water temp sensor: Thermistor, car has two water temp sensors, 1 for ecu 1 for dash gauge. I could tap into the dash gauge sensor or add my own sensor

Oil pressure sensor: None, need to add my own
Oil temp sensor: None, need to add my own
Lamba o2 / air/fuel: None, need to add my own

Boost: If car ever gets boosted I would probably prefer a mechanical boost gauge.
Throttle position: Not constantly monitored. The throttle position sensor consists of two micro-switches, one at idle position and the other at full throttle & is therefore not worth doing.

Does this help?
 

hippy

Technical Support
Staff member
This should put to rest the safety concerns...
I doubt it will, because interfacing to a vehicle is as much about how it's done as about what is being done.

For example, reading the vehicle voltage looks intrinsically safe, a simple connection to vehicle + and - and a resistor divider. But how are you making connections to + and -, and where are you making those connections ? What if the wires come loose or wear and short ? What if one or both of the resistors fail ? What about positive or negative pulses which can be hundreds of volts in size on those lines ? There are probably other issues on top of that.

Members of the forum can tell you how to measure a voltage with a PICAXE, even how you might deal with issues which relate to automotive use, but the safety concerns won't ever go away.
 

electrince

New Member
I was referring to the safety concerns which may prevent people from being willing to help. If those still exist then I fail to see how anything ever gets done on this forum.
 

AllyCat

Senior Member
Hi,

Having originally raised the issue of safety, I'm glad that it wasn't necessary for me to justify the statement myself. But perhaps just add that "smoke pouring out of the dashboard" might be considered a "distraction to safe driving", even if the car does continue to run correctly. ;)

However, I'm sure that forum members will still offer advice on PICaxe implementation issues if/when you have any specific questions. But do beware that a car's "12 volt" battery/power supply is very different to a simple stack of 8 x AA cells or a 12v "wall wart". Not only can it deliver in excess of 500 Amps (say 5 kW) but there are nasty issues such as "Load Dump" from the alternator.

Cheers, Alan.
 

electrince

New Member
I am aware of that. Assuming the voltage regulator is in good working order and doesn't cause spikes it is probably 13.6 depending on load, maybe 14. Then you have issues of jump starting etc.
Anyway the next step is deciding on the hardware?...
 

Dippy

Moderator
And the extra regulation PICAXE+circuit will need?
You will have to add some polarity/transient/dump protection - all of which has been covered many times in this forum.
Are you aware that HF transients can go through some dinosaur regulator like a hot knife through butter?

Then you will have to add the interface between your PICAXE board and the outside world.
Obv you have already planned how many I/Os you need (sensing, ADC, buttons and switches plus I/O to display).

Display; are you going to spend the extra coupla quid for a serial one like Rev-Ed sell or are you going to get a cheaper 'normal' one which needs extra connections and extra lines of code?
(All this depends on your wallet, or how much effort you (and likely the Forum) can put in).

You need to plan out, systematically, exactly what you want to achieve with the transducers you have, or plan to get.
Even measuring battery voltage needs a more than merely a voltage divider to make it safe.
Plan it as connected boxes (like that ghastly Visio can do) and then people can help you put some flesh on the bones.
Otherwise the Q&A can go on for days... ;)
 

hippy

Technical Support
Staff member
I was referring to the safety concerns which may prevent people from being willing to help. If those still exist then I fail to see how anything ever gets done on this forum.
It's quite possible safety critical projects do mostly die a death on this forum.

Most projects however are not safety critical and will raise fewer safety concerns, often none at all.
 

BeanieBots

Moderator
autotransients

As Dippy and others have mentioned, there is a little more to the car 12v system than might be obvious at first.
This has indeed been covered many times before. Rather than repeat it, please take a little time to read the attached file.
 

Attachments

Steve2381

Senior Member
I have had a 40x2 running in my car with an LCD for months now (and a 20x2 running for over a year) controlling all my LED lighting, alarm, ultrasonics etc.
Its been fine. (although it is a 2012... so the environment may be 'SLIGHTLY' better than a 1990's motor).
I simply put plenty of suppression near the PCB and regulator, and each of the inputs to the Picaxe go through the usual resistors and each has a 500mA fuse (headlights, reverse, ignition etc).
The control and fuse unit has an isolation switch in the engine bay that allows me to disconnect it - should I need to jumpstart or anything.
Have not had any issues to date.
I did look into an elaborate isolation method, but after initial trials and test measurements taken off the cigarette lighter... I decided I was over-engineering.
Pretty sure people will say I have done wrong, but I as an electrician... I have seen far worse wiring on cars before.
I find the main trick is... do it neatly and think of mechanical wear.

Oh... and its a bad video.... but this what the main LCD controls:

https://www.youtube.com/watch?v=YvZWHdGbp-s&list=UUfBpWB-uQXiecmhAfNuFDQQ
 

neiltechspec

Senior Member
I have had a 20M2 with 20X4 OLED display in my 1972 Classic Convertible Triumph Stag for nearly 2 years now (display fitted in place of ash tray).

Monitors the doors, bootlid & storage compartment (use to be rear seat area).
Shows external air temp, from a DS18B20
Lights on / off for a 'lights on' reminder
Basic Alarm functions with a 433Mhz remote control.

Above is powered through a 3A fuse, L/C filter & 16V transient suppressor, then regulated down to 5v.

Also have an 08M2 PWM driving the engine cooling fan, temperature monitored by DS18B20,
powered direct from battery through 30A fuse & minimal noise filtering, regulated to 5v for 08M2 & DS18B20.

Another 08M2 running the Fuel Low warning light, tank has no baffles so fuel sloshes about a lot and caused annoying lamp flashes,
minimal noise filtering, fitted in boot near tank powered from fuel pump supply regulated down to 5v

Another 08M2 monitoring Cylinder Head Temperatures to drive a Dash Warning Lamp for overheat, powered from ignition feed regulated down to 5v,
this one is subject to random resets, needs more suppression yet as is very close to plug leads etc...

Neil.
 
Last edited:

Dippy

Moderator
That sounds good then - apart from the last one.
Did you do any tests, calcs or measurements to see what sort of nasties could get to PICAXE or was it guesswork?
 

Steve2381

Senior Member
I have to be honest here.... I don't know enough about testing, calcs, measurement etc (or have much more than a multimeter) to be able to test nasties! (I know you were aiming this at Neiltechspec I think)
All I can do, it suppress the supplies as best I can, and design as much protection into the circuits as I know how.
My signals from the headlights for instance basically comes through a IN4001 and a resistor. That seems to be fine... although I am sure there are better ways.
My central locking lock/unlock signal is certainly a noisy affair... so I simply fed a small signal relay with it and switched a clean 5v through the contacts.
I would love to be able to design this stuff as well as you guys, but I just don't have the knowledge. This is my hobby and most of my projects are parts of other circuits I have found online... altered to suit my needs.
You would totally freak if you saw my coding! It starts off lovely and tidy, and by the end.... its usually a horror show (but it works)
 

Dippy

Moderator
Luck and guesswork (and gut feeling) can strike gold... measurement adn experience etc. has the advantage of (usually) ensuring a safe and reliable solution.
This is one reason why the Old Lags here are sometimes a little reluctant to dive in head-first.
They don't know the competence level of the questioner... and his/her guesswork may not end as fortunately as yours.
 

neiltechspec

Senior Member
In my case, I used quite a bit of "experience" & an oscilloscope.

For the 20M2 & OLED display, power is fed direct from fuse box, 3A fuse, an audio noise suppressor (L/C filter), then a 16v Transient suppressor, feeding a LM7805 with 100uF cap to 0v.
All the inputs from doors, boot lid, storage compartment, lights & ignition are fed through 100k / 47k potential dividers with a 0.1uF cap to 0v.

Any PICAXE's I fit in cars always have a 16v Transient suppressor (I bought quite a few at the time).

The problem one that is subject to resets came as no surprise given it's proximity to the ignition system & the fact its housed in a plastic 12v automotive relay case.
This will probably be rebuilt into a small metal box with screened cable going to the DS18B20's.

Neil.
 
Last edited:

rossko57

Senior Member
Anyway the next step is deciding on the hardware?...
Okeydoke. the shopping list seems to be
Picaxe, with inputs for three ADC voltage readings
- plus three unspecified inputs, probably ADC too
- capable of driving some unspecified display
- if buying a board or assembly, a capability to add power conditioning/regulating and input conditioning circuitry.

If you really want to develop and explore the possibilities, it really sounds like a job for a breadboard setup. When design is finalised, it (and most parts) could probably transfer to a protoboard for a permanent one-off build.
 
Top