Gauge control
Moderators: JeffC, rdoherty, stieg, brentp
-
- Posts: 704
- Joined: Sun Sep 07, 2008 1:54 pm
- Location: Fareham, GB
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.
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.
- Attachments
-
- 25% duty cycle
- Gauge with 1-3.jpg (87.69 KiB) Viewed 12323 times
-
- 33% duty cycle
- Gauge with 1-2.jpg (99.71 KiB) Viewed 12323 times
-
- 50% duty cycle
- Gauge with 1-1.jpg (101.68 KiB) Viewed 12323 times
1310 A-series Mini, lightened and built myself. V4 board and loving it
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
-
- Posts: 704
- Joined: Sun Sep 07, 2008 1:54 pm
- Location: Fareham, GB
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.
- Attachments
-
- 14%
- Gauge with 1-6.jpg (86.18 KiB) Viewed 12321 times
-
- 17%
- Gauge with 1-5.jpg (92.91 KiB) Viewed 12321 times
-
- 20%
- Gauge with 1-4.jpg (102.43 KiB) Viewed 12321 times
1310 A-series Mini, lightened and built myself. V4 board and loving it
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
-
- Posts: 152
- Joined: Wed Jan 02, 2008 12:52 pm
- Location: Melbourne, Australia
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.
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.
-
- Posts: 704
- Joined: Sun Sep 07, 2008 1:54 pm
- Location: Fareham, GB
@ 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.
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.
1310 A-series Mini, lightened and built myself. V4 board and loving it
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
-
- Posts: 704
- Joined: Sun Sep 07, 2008 1:54 pm
- Location: Fareham, GB
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
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
- Attachments
-
- IMG_0470.jpg (57.96 KiB) Viewed 12280 times
-
- IMG_0469.jpg (61 KiB) Viewed 12280 times
-
- IMG_0468.jpg (59.48 KiB) Viewed 12280 times
Last edited by NITROPIXIE on Mon Sep 13, 2010 9:06 pm, edited 1 time in total.
1310 A-series Mini, lightened and built myself. V4 board and loving it
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
-
- Posts: 704
- Joined: Sun Sep 07, 2008 1:54 pm
- Location: Fareham, GB
some more
- Attachments
-
- IMG_0473.jpg (58.67 KiB) Viewed 12279 times
-
- IMG_0472.jpg (60.72 KiB) Viewed 12279 times
-
- IMG_0471.jpg (56.33 KiB) Viewed 12279 times
1310 A-series Mini, lightened and built myself. V4 board and loving it
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
-
- Posts: 704
- Joined: Sun Sep 07, 2008 1:54 pm
- Location: Fareham, GB
Finally
- Attachments
-
- IMG_0476.jpg (58.47 KiB) Viewed 12278 times
-
- IMG_0475.jpg (58.22 KiB) Viewed 12278 times
-
- IMG_0474.jpg (59.05 KiB) Viewed 12278 times
1310 A-series Mini, lightened and built myself. V4 board and loving it
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
-
- Posts: 704
- Joined: Sun Sep 07, 2008 1:54 pm
- Location: Fareham, GB
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
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
1310 A-series Mini, lightened and built myself. V4 board and loving it
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
-
- Posts: 133
- Joined: Tue Jun 08, 2010 7:06 pm
-
- Posts: 152
- Joined: Wed Jan 02, 2008 12:52 pm
- Location: Melbourne, Australia
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.
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.
-
- Posts: 704
- Joined: Sun Sep 07, 2008 1:54 pm
- Location: Fareham, GB
@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.
@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.
1310 A-series Mini, lightened and built myself. V4 board and loving it
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
-
- Posts: 133
- Joined: Tue Jun 08, 2010 7:06 pm
Not sure if this adds value (and indeed not just for yourself) however there's quite a bit of info here
-
- Posts: 704
- Joined: Sun Sep 07, 2008 1:54 pm
- Location: Fareham, GB
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.
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.
1310 A-series Mini, lightened and built myself. V4 board and loving it
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available
Rasputin22 - The Mini Forum
Rasputin22 - MK1 Golf Forum
Megajolt repair for the UK available