Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Newbie needs some help

Status
Not open for further replies.

Kenny.s

New Member
Hi,

I'm looking to build something to monitor the following things on my Impreza,

Water temp
Oil Temp
Oil Pressure

Ideally i would like to be able to display the actual values on a backlit lcd display and if possible include high and low level alarms on each parameter, ie if the oil temperature goes too high or the oil pressure goes too low.

or

This might be a bit easier, a series of led's that could be pre-set to come on at a given value, after all i only really want to know if something is wrong i dont want to be looking at a load of gauges all the time.

If i was going to go with this idea i'd be looking for something like this, could possibly use tri-colour led's?

Water Temp; An led that stays on until the water is up to a pre-determined temperature possibly yellow? Then goes green between two levels and then Red if it goes above an upper limit.

Oil Temp: Same idea as the water but with different settings

Oil Pressure: Again the same idea but would be in reverse this time as it would start out Red then turn green once the engine was started, and oil pressure was up, doubt i'd need to worry about and upper level for this one.

Only problem now is where to start :confused:

Any help much appreciated

Many thanks

Kenny
 
How do you plan to run the sensor wires from under the hood out first of all?

YOu could use thermocouples for temperature sensing...run them out to a special IC designed to thermocouples and have the IC connected to a microcontroller. The microcontroller can then use the data from the sensor readings and display it to an LCD screen.
 
There are various routes the wiring can take, the air-con pipe work goes through a large rubber grommet on the bulkhead, there's plenty room there for a small loom.

Kenny
 
Did you edit your last post? sure that last bit wasnt there when i replied the last time?

Thats the sort of thing i'm looking for but how do i go about selecting a suitable IC and microcontroller? Would still like to have some warning lights if possible?

Kenny
 
I don't think I edited it? Maybe I did. I do edit posts a lot, but could very possibly have forgotten.

Anyways, if you haven't worked with uC, just search around for one. Microchip's PICs or Atmel's AVRs are good choices. Of course you can get warning lights too. YOu can do whatever you want! Just stick some LEDs into the circuit and have them be controlled by the uC. YOu can have it display temperature in C or F, you can have it light up the LEDs or buzzers whenever you want based on the sensor readings. You probably don't need a very high end one. Only minimal pins are probably needed. You probably want the uC to have built-in analog-to-digital (ADCs) converters since those are usually the easiest most direct way to read sensor inputs. You also probably want a uC with a built-in oscillator so you don't need an external crystal (but that's not too hard to add either). For a specific application, you usually want minimalism. Just the number of pins you need, speed, and so on to minimize cost and ease of design.

In fact, if you don't want to deal with equipment costs or wiring up the basic uC requirements, you could always just get a BASIC stamp and carrier board. All the programming hardware and software already present. Just get the sensors and their respective signal conditioning ICs if necessary and solder them onto the breadboard area. Maybe add some LEDs and connect an LCD.

As for thermocouple ICs...there is the Maxim MAX6675 and the Analog Devices AD595. They work with the K-type thermocouples. What can the oil and water temperatures in a car reach? That will dictate the type of thermocouple and materials you will need to select when picking one.

I don't know too much about pressure sensing so I won't say anything.
 
Last edited:
I've never worked with a uC before (by which i assume you mean a micro controller?) I can read basic circuit diagrams ok although it's been a while but i wouldnt know where to begin when selecting a suitable uC. I've build various "kits" in the past, the sort of thing that comes with a pcb and all the components in a bag, and i'd be prepared to say that i can solder to a pretty respectable standard.

Just been think about this a little more and i would also like to measure the intake charge temperature.

In normal use the water temperature shouldnt get above 105 C ish and the oil maybe 120 C under hard use, but it would be nice if they could read from 10 C up to 140 C.
The charge temperature would only have to read from 10 C up to 70-80 C but i guess it would be easier just to make them all the same.

For the pressure sensing, there are a number of automotive pressure sensors available which are commonly used with conventional analogue gauges. I'm not sure exactly how they work but from memory they usually only have one wire connection so i would imagine it is a variable resistance to ground dependent on pressure, ie x many ohms will be 0 Psi. Would imagine this would be fairly easy to use to someone who knows how?

Kenny
 
The u is the abbreviation for micro (10^-6) in the same way that k means 10^3 in km.

If you have a variable resistance sensor and your uC has an ADC you can make a resistive divider across the logic voltage supply. Use a fixed resistor and the resistive sensor. The divider will output a voltage that is indicative of the resistance of the divider (which is dependent on the variable resistor since the other resistor is fixed and known).

Another method I just heard of is using an R-C setup with a fixed capacitor and the variable resistance as the R. You then need something to start and reset the circuit and you time how long it takes for the voltage to go from a digital 0 to 1. This time will let you calculate the voltage. It has more setting up though and I'd only use it if I chose a uC without a built-in ADC. ADC is just easier I think.

If it's a one wire output, it could also be a voltage output referenced to ground. If this is the case, you can just read the voltage into the uC's ADC. But if the voltage can exceed the ADC's limit (ie. the voltage supply on the uC) then you need clamping circuitry to protect it or some other circuitry to attenuate the voltage and scale it down.

A K-thermocouple should be just fine for the temperatures you speak of. It's also easy to find ICs for them. They EASILY go up to 260C, and they actually go away higher (somewhere around 1024C- the temperature limitations come from the insulation used).

Whatever you do, once you get the analog voltage (directly from the sensor or through a variable resistisve divider) past the ADC, it is digitized for the uC and you can interpret it however you want.

If you aren't sure about ICs...just pick the smallest one you can find...or get a BASIC stamp. Tons of documentation and tutorials for those with all the basic uC connections made for you- you just have to attach periphreals like sensors and LCDs.
 
Last edited:
Thats just it, i dont really know anything about them :confused: When you say pick the smallest ic what type of ic are you reffering to?

If i had all the parts i needed and a circuit diagram i'm pretty sure i could build it ok, but i dont think i could source the parts and make a diagram myself.

Kenny
 
All single terminal temp & pressure sensors are a variable resistor to ground. With a pull up resistor they will be a voltage divider as previously mentioned. An LM339 comparator can turn LEDs on or off when input voltage goes above or below a reference voltage that you can set with a potentiometer. Alarm switches are easy, they are NC or NO to ground. If you think you will ever want to get into uCs, that sounds like a very good reason to get started. I am sure I have seen kits that display temperature on an LCD (maybe JAYCAR) that could be modified to do all you ask.
 
I know there are lcd temperature displays on the market that do the sort of thing i'm looking for but the ones i've seen only display one temperature so i would need 3 or 4 seperate units, unless you know of a way to put all the reading into one display.

I would quite like an lcd display but the simplicity and clutter free appearance of a few small led's is also quite appealing.

With regard to the LM339 comparator, could it control 3 leds as mentioned earlier? ie the yellow led stays on up to a given voltage/temp then a green between 2 voltages/temps and then red above an upper voltage.

Only thing with this idea is knowing what the temps actually are so i can set the various trigger points, might need an lcd display after all ? or perhaps i could just use a multi meter on a set of test points or a plug located under the dashboard or in the glove box. As long as i knew the voltage pressure or voltage temperature ratio it would be fairly easy to adjust, eg 0.1 volt = 1deg
 
Last edited:
Kenny.s said:
Thats just it, i dont really know anything about them :confused: When you say pick the smallest ic what type of ic are you reffering to?

I mean don't go out and pick up a 200 pin Intel Pentium uC when all you need is an 8-pin PIC chip.

Wiring up a small uC is fairly straightforward...stick bypass capacitors across the power supply terminals, add a and capacitor and crystal if the chip doesn't have an internal oscillator. THen pretty much just connect power to all the sensors and connect the sensor output line to a pin on the uC. Oh, and also a simple 3-pin voltage regulator for all the uC and sensors.
 
Last edited:
But thats just it i dont know where to start :(
Sorry if i seem a bit slow or stupid but all this is alien to me, as i said before i've built a few projects that came in kit form but thats as far as my knowledge goes, i can solder perfectly well but i dont know enough about all the various components to enable me to select the correct ones and then connect them up.

I think the only way ill be able to build this is if someone is kinda enough to spare some time to design it, tell me exactly what to buy and how to wire it up.

Kenny
 
There are 4 Comparators on a LM339 chip (less than $1.00) 1 can turn an LED on at < a set point another can turn an LED on at > a set point a quick web search for “LM339 Window Comparator” came up with this circuit that uses 2 to turn an LED on between 2 set points http://www.geocities.com/nettron1000/WINCMP4.html
1 chip, 4 pots and 3 LEDs with 1K resistors = < $2.00? and it will run on battery voltage.
Do more searches on LM339 circuits and for a PIC demo board with an LCD that you can program with example code. (a learning or introduction type kit)
 
Maybe you should just look at the BASIC stamp...it's designed for beginner hobbiests and all you would really need to do is connect power to the sensors, and LCDs and then connect their signal wire to the BASIC stamp.

Start first with reading temperature...then add on an LCD...then add on a temperature sensor. Test it everytime you attached something new. Use a debug program to make sure it's reading the sensor right (until you get the LCD attached then you can read it off that). Once you manage to read the temperature properly it should start to become much more clear. Read up on some of the datasheets and manuals first. It may take 20 reads before you start to get it, but hey, that's what it takes.

(Do you know how to code?) Try this first, get a BASIC stamp and a carrier board, then find an ADC pin (get any one, it doesn't matter).

Then get one of these:
http://www.sparkfun.com/commerce/product_info.php?products_id=251
http://www.sparkfun.com/commerce/product_info.php?products_id=306

One is the thermocouple wire, and one is the IC to signal condition the thermocouple wire. It will output an analog voltage. You just take this pin and connect it straight to an ADC pin on the basic stamp. (Remember to google up some stuff about thermocouples so you understand how they works). You then just code the basic stamp (you have to figure this out for yourself since I don't know basic) to read the ADC's voltage. If you can get that done, you should have a much clearer idea of what you need to do.

Read the datasheets and at your point, pay particular attention to the pin names and what they do. Also, in the AD595 datasheet, it has some nice pictures around the end giving a basic explanation about how it works too. Datasheets...always read the datasheets carefully and several times if required.

There is nothing like getting your feet wet, because even if things go wrong, at least then you will KNOW what you do not know. At this point, you're probably not even sure if you know something or not. Start with a temperature sensor project to get a feel for it. After you get that then add the LCD and pressure gauge. Read the BASIC stamp stuff if you decide to go this route...LOTS of tutorials. You shouldn't have any insurmountable problems.

A thermocouple are two wires of different metals that have some properties to produce a voltage difference between each end if there is a temperature gradient along the wire, therefore a thermocouple measures a voltage difference, not an absolute voltage. So it means if you know the temperature at "your" end of the wire and voltage difference, then you can figure out the temperature at the other end. Rather than keeping the temperature at "your" end at a fixed temperature (difficult to do) what the IC does it it uses an internal silicon temperature sensor to measure the temperature at your end and then takes the voltage from the thermocouple and uses these to output a voltage proportional to the temperature. What you have to keep in mind is to make sure you have a temperature gradient across the thermocouple, so you don't want a short wire and you want to make the temperature difference between the ends of the wires at great as possible (far away from each other). A

The thermocouple effect happens whenever two metals are in contact and there is a temperature gradient, but you can usually ignore this effect when things are very close together because then they are at the same temperature. Around the IC, metals other than the thermocouple wire metals come into contact with each other, and these junctions would create thermocouples too, but because they are so close together the temperature-dependent voltages added into the thermocouple voltage are neglible (remember, no temperature gradient, no voltage produced). This last paragraph is just something that took me a while to realize so I stuck it in...I was concerned about the thermocouple metals touching the copper traces on the PCB and skewing the voltage readings.

So yeah...that's just a quickie explanation.

If you still have no idea about what uC to pick, maybe this or this BASIC stamp board:
**broken link removed**

You can also get LCD screens from the same company (presumably designed to work with these units which would make things easier).

Or one of these if you prefer C or Java "like" language (this is the first uC I started on, and it was DEAD easy. Hardest part was hunting around the manual to look for functions during coding):
http://www.oopic.com/oopicr.htm

It's within your ability! Believe in yourself! Good luck!
 
Last edited:
Cheers guys, think i'm starting to pick up little bits of this now.
Might have to read through that lot a few times before i can make sense of it all.

I didnt realise that a BASIC stamp was actually a pre-made board! but i'm affraid i dont know how to code or really what it is.

I had a look at the various links you posted, the page with the BASIC stamp boards appears only to be available in packs of 10 or 20? is this the same sort of thing,

**broken link removed**.

Kenny

ps just to let you guys know i'm from the uk but i'm actually on an oil rig in the middle of the north sea just now, time to go and do some work. Ill get another chance to log on at lunchtime.
 
You can get all of this stuff from other places. That was just the webpage of the company that actually manufactures it. BUt I'm not sure where you got the idea that you couldn't get single quantites...it's right there the price for one of them.
 
Not sure either just thought it said on that link you put up, homework board and in brackets 10 pack.
Still trying to digest the last post :)
 
PSoC ?

You can, also take a look at the PSoC from Cypress.
It's a analog and digital mixed IC.
You have analog blocs to amplify, filter, ... signals that you can feed to digital blocs ADC, PWM, ... that are controlled by a µP.
All in one IC.
Lots of applications notes available, by one evaluation board and use it as your final PCB.

Just connect the sensors, configure the analog blocks, define which digital blocs will be used, write some code... job done :)

More info? Check www.cypress.com
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top