Go Down

Topic: How to control "Set Temp" with potentiometer? (Read 68 times) previous topic - next topic

discseven

Newb here---No idea about protocol for first time posting so am just jumping in. Hi! :) Am interested in switching out my antique thermostat control in an '80 Porsche to a thermistor connected to an Ardunio. Plan is to add an LCD to car's instrument panel and use the old rotary thermo control knob to control the "Set Temp" through the Arduino on the LCD. LCD will also display ambient car temp. I know a potentiometer can accomplish this per:

https://www.youtube.com/watch?v=wRISt5lniJk

I've been digging for sketch code for this but cannot find it. Help would be greatly appreciated.

Wawa

#1
Sep 24, 2016, 01:48 am Last Edit: Sep 24, 2016, 01:52 am by Wawa
Hi, and welcome to the forum.
You could start by converting a (10k lineair) pot position into a digital value.
Look at the "ReadAnalogVoltage" sketch that comes with the IDE (File > Examples).

With the "Map" function, you could change that into a "desired temp" range.

Then play with DS18B20 digital temp sensors. Much easier than thermistors.

An "if statement" could compare desired and actual temp, and select heating/cooling.

So far you have been printing to serial monitor.
Printing to LCD is not much different.

Post the code (and diagrams) you have so far, so we can check it.
Leo..

terryking228

Hi,
Take a look at  this example: of using a pot to set a point (for lighting in this example):
 
And  HERE: is info on measuring temperature..  Those DS18B20 sensors are good for getting a actual temperature value. You could also show outside temperature, coolant temperature etc,

And..  HERE: is an example of displaying multiple temperatures on a small LCD display...

When you get individual parts working,  HERE: are some hints on combining multiple sketches.

Let us know how it works out...
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

discseven

Thanks Wana and Terry. Am off to good start with info provided. Will switch from thermistors to water proof DS18B20. An interesting idea to add more temp data. I looked into 20x4 LCD which could present 8 temp points (2 per line)... BUT... am not sure single Ardunio can handle that---seems number of pin ports limits number of temp sensors. OR, is it possible to continuously rotate (loop) sensor selection?---so that theoretically, any number of sensors can be used.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy