Page 2 of 3

Posted: Fri Sep 03, 2010 12:40 pm
by NITROPIXIE
I then tried a mark to space ratio of 1-1 (duty cycle 50%)and at 0.5Hz (2000ms) the gauge could be obviously seen pulsing as it went up. Increasing it to 5Hz smoothed out all pulsing so the hysteresis is so high on the gauge that smoothing wont be a problem. The gauge read just on the red area. The voltage regulator was quite warm/hot to touch but not completely unbearable. Again improved circuit design might alleviate this

Then i tried a mark to space ratio of 1-2 (duty cycle 33 %) which brought the gauge down to half way and then a ratio of 1-3 (25%) which brough the gauge down to below half way.

Posted: Fri Sep 03, 2010 12:49 pm
by NITROPIXIE
And finally i did mark to space ratios (duty cycles) of 1-4 (20%), 1-5 (17%) and 1-6 (14%), which just about covers the wholr range of the gauge. With a little fine tuning the PWM gauge control should be quite capable of controlling traditional guages if the original temperature sonsor is to be used for other hardware.

Posted: Sat Sep 04, 2010 2:32 am
by Spockie-Tech
Nifty R&D There :)

I havent yet decided between a full glass (LCD/OLED) Dashboard for my Charger, or hacking Servo motors into the back of standard gauges.. and now youve just added another option ! :)

PWM driving the gauges is a good idea, any jitteriness could be smoothed with a simple RC Filter if the higher PWM rates are a problem. I thought the standard Arduino PWM output was 490Hz, so you might need to filter it a bit, but that would be easy.

I was considering Servo's because you can get little baby servo's with ~180degrees of travel for <$20, and then use a 8ch servo drive board allowing all the gauges to be driven from a single serial output on the micro. But if you dont need too many gauges, then PWM'ing the existing gauges without having to hack a servo in would probably be a better way.

Posted: Sat Sep 04, 2010 5:06 am
by dr.occa
interesting test bench discoveries NITRO. i spy an iphone at work and a mugshot of maybe our one and only NITROPIXIE? ;).

Posted: Sat Sep 04, 2010 1:34 pm
by NITROPIXIE
@ spookie tech - I didn't use the proper pwm of the arduino. I just told a out put to stay for x amount of time and then low for y amount of time so that it was easy to change the values. I have to figure out using the pwm outputs as yet and have a ply with these, but its certainly been handy for bench testing.

Its certainly a more affordable and easier option than putting servos into the gauges but then you can make the servos do neat stuff when you first turn the gauge on, etc, and servos have less power consumption so powering them isn't so much of a problem (with hot voltage regulators)

I was testing how low frequencies caused jitterness in the gauge which was minimalisitc at really low frequencies, so at higher frequencies i don't think ther would be a problem and a filtering circuit may just help relieve any strain on the voltage regulator.

@ Dr occa, you I spy very well, lol. Although it took me a while to see where you were looking for my mugshot. I was looking in the gauge for it, lol.

Posted: Mon Sep 13, 2010 8:59 pm
by NITROPIXIE
A second try and aren't Arduino's, well programming, fun. I'm still only very basic but have learnt alot more recently getting hands on. I have mainly been teaching myself programming by trial and error, changing the code slightly on working examples and seeing what happens and learning from mistakes, always the best way to learn as long as it isn't too expensive ;) This time i have managed to use the PWM output, now i understand the how to impliment it in the code it really is quite easy, get me!

This time it looks a bit more professional and there aren't any phots of me lurking in the back ground, lol. I have used a 9 LED bargraph to compare against. The last LED (on the left) is PWM so gets brighter with increased duty cycle. The little circuit bottom right is something i got one of my lads to make in the office. It's basically 2 voltage regulators (9v & 5v), which can supply about 1amp current so plenty of juice here and this connects to a 12v mains supply from a spare adaptor i had lying around, always handy to supply larger circuits or gauges.

The input is just a potentiometer supplied with 5v at the moment, so i will have to fettle the code a bit to get it to work with a voltage divider and thermistor values but now i have the basics it shouldn't be too difficult.

So here's the pics

Posted: Mon Sep 13, 2010 9:01 pm
by NITROPIXIE
some more

Posted: Mon Sep 13, 2010 9:03 pm
by NITROPIXIE
Finally

Posted: Mon Sep 13, 2010 9:12 pm
by brentp
Awesome!! :) I like the bar-graph too!

Posted: Mon Sep 13, 2010 10:13 pm
by NITROPIXIE
Thanks Brent, the LEDs do make it a little more obvious to what i am trying to show. I'll keep plugging at it.

Anyone out there got any values for a CTS sensor. I'm thinking 350 Ohms cold and about 100 Ohms hot. If anyone has done some research so i can use their values that would be great ;)

Posted: Mon Sep 13, 2010 10:41 pm
by Funky Diver
hmm... if only I could find the site I found last week. Had all sorts of useful specs for LOADS of different sensors.

Will have a squizz and see if I can come upon it again for you :)

The other option is if you know anyone with AutoData... should be in there 8)

Posted: Tue Sep 14, 2010 1:21 am
by Spockie-Tech
You could determine the values for your particular sensor easily enough with a thermometer (medical) to calibrate against.

Cup of boiling water =100
Cup of Ice/Salt Water = 0

add a couple of points in between to determine the approximate linearity and you should be on the track.

For Bonus points, put a "ShiftBrite" http://macetech.com/blog/node/54 - behind the gauge needle as a backlight, and then you can change the gauges color according to input temperature, and even flash it white and so on for over temp warnings. ;)

Posted: Tue Sep 14, 2010 7:18 am
by NITROPIXIE
@funky - autodata, I have an old one in the garage, why didn't i think of this sooner. Its dated 1997 but is still relevant. Cheers funky i'll dig that out when i get back to Portsmouth. If you can find the autodata on the web that would be great.


@spockie - i thought about just putting a tri colour LED in place of the gauge Illumination bulb which changes to RED (possibly flashing) when the engine gets too hot to amplify the gauge on the dashboard.

I would do a calibration with a thermometer but i don't have any facilities to do such a thing where i am at the moment.

Posted: Tue Sep 14, 2010 11:27 am
by Funky Diver
Not sure if this adds value (and indeed not just for yourself) however there's quite a bit of info here

Posted: Tue Sep 14, 2010 8:57 pm
by NITROPIXIE
Its amazing what you can do with a bit of hacking. You could literally put any clocks/dials into any car with a bit of manipulation and imagination. Google wipeout arduino for any wipeout fans out there, i love it.

You can also google OBD2/OBD11 arduino for anyone wanting to hack into certain ecu's fairly cheaply. It can only disply data but a damn site cheaper than any OBD2 reader.