Temperature sensor for Micro Maestro 6ch

Hello all.

I just found the Polulu products when surfing for some actuators.

After reading abit about the MicroMastro I see that one can use a pot.meter as an input signal.

I want to read two temperatures and do some basic calculations on the readings before running a servo.
I’m wondering if anyone has any tips on temp. sensor that I can wire to the MicroMaestros input lines?

Best regards
Tommy Eriksen

This type of application is what the Maestro’s internal scripting language was designed for.

You’ll need to find a temperature sensor that outputs an analog voltage within 0-5 V. (A lot of temperature sensors use some kind of digital protocol like I2C, and that would probably be very complicated to implement on the Maestro.) Then you would configure a Maestro channel as an input and connect the temp sensor output to the signal pin of that channel. Here are some temperature sensors from Sparkfun that would probably work:

–David

Hello

Thanks for the answer. I was thinking about the thermistor route, as I saw that one can read a pot.meter.

Just ordered a MicroMaestro, looking forward to try this out :slight_smile:

TommyE

Hello

Just received my MicroMestro 6ch.

Hooked up a NTC with a voltagedivider to one of the inputs. Now i’m reading the NTC.

I’m wondering if it is possible to either calculate, or use a predefined lookuptable, for converting the voltage read into degrees Celcius.

Regards
Tommy

I don’t know what an NTC is, and you didn’t provide any information, but I imagine the output voltage is linearly related to temperature. The Maestro’s internal scripting lets you do basic arithmetic including addition, subtraction, multiplication, and division, so that should allow you to apply any arbitrary linear function to the voltage reading and convert it to degrees. Just be careful not to overflow +/-32767.

–David

First of all, thanks for the answer.

Sorry for the lousy explanation, I will try to explain a little better what I want to achieve.

An NTC is also called a thermistor, is a resistor that changes its resistance in variance with the temperature.
The problem is that this change in resistance is not linear, therefore either a calculation or maybe the use of
a predefined lookuptable is needed to convert into degrees.

I think I will opt for the predefined lookup table, as I think the formula used is to complex for the
script language. See the Steinhart-Hart formula here en.wikipedia.org/wiki/Thermistor

I would love if it is possible to do a lookup in a table, eg. if the voltage read is 2.4v then it will find a number in a table that corresponds to eg . 24degreesC if I read 2.45v then it will be eg. 24.5degreesC and so on.

Thanks
Tommy

Sorry, there is no great way to make a lookup table in a Maestro script.

You could, of course, use comparisons and if statements in a script to get some basic lookup functionality but it would not be a very efficient way of storing lookup data.

–David

Hello,

Is it possible that you could do something like a quadratic fit to the data and use that as the basis for a simple formula that is precise enough? Another option would be a piecewise-linear approximation: have a few IF statements to break your function down into individual line segments that match up at their endpoints.

By the way, why do you need to get a precise temperature value on the Maestro? What is it going to do with that information?

-Paul

Thanks for the ideas both of you.

First of all, what I want to do is to measure a few temperatures in my waterbased underfloor heating pipes and the room temperature itself.
I then want to do some adjustment, based on the readings, to the shuntvalve that mixes the cold and warmwater, this is done with a servo.
I guess that the reading of the temperature does not have to be precise when it comes to degrees, but I was thinking about logging all
readings to a computer to later maybe use it there. I would then be great if the values I have are a ‘finished’ product so to say.

I have now done a little ‘research’, and ordered a few LM35 temp sensors.

I connected them to the pololus input pin, but I dont get any readings at all hmm… Seen a lot of PIC16x exampled and the LM35 is directly connected to the
adc input of the PIC, shouldn’t it be possible to do something similar with the Pololu?

Again, thanks for your time and answers.

Regards
Tommy

Hello,

Can you try it with just one LM35 and nothing else connected to the Maestro, and tell us how everything is connected if it does not work?

-Paul

Also, I want to add that I see no reason to do any kinds of computations on the Maestro itself if it will be connected to a computer the whole time. Why not just let the computer do all of the work?

-Paul

Hei Paul.

Well, the main reason for not having a computer on all the time is that the logging is not the most important thing for me.
I really want a ‘self-contained’ solution, so that I can do some logging to maybe other equipment than a PC.

For the LM35, I connected it directly to the maestro without any scripts, did a factory reload of the maestro, selected I/O 0 as input.
The only reading I get in MaestroCC under status is 0, strange as I do get readings with my former method of reading via Thermistor and a voltage divider…

Maestro is only USB powered, don’t know if that means anything…

Regards
Tommy

I’ve now tried 3 different LM35 to see if there is any faults on them, to no avail…
Guess they are ok.

Saw a method of testing with a multimeter and power, will try this when at home…

/t

Hello,

You have not said what your connections are, but I am going to guess that you have plugged the power of your sensor into a servo power line on the Maestro without actually applying any servo power. Using a multimeter is a good idea - if you still cannot get it to work, tell me exactly how everything is connected!

Okay, so for self-contained operation, a script is useful. But originally you were asking about how to do an accurate conversion of an analog value to temperature - if that is still necessary, I recommend doing it on the computer and just storing the final, converted setpoint on the Maestro.

-Paul

I also jumped on the LM35 as its linear centigrade to volts and looked like it should work directly on an analog input.
I got the same results as you.
The values are jumpy and not accurate enough to be useful.
The LM35 increases only 10 mV for each centigrade making it hard to read together with noise on the line.
I checked it afterwards with an oscilloscope and the sensor does work, just not like we hoped directly with the Maestro.

Marius

Hello,

TommyE said that he was only ever getting a reading of zero. It sounds like that is different from what you are seeing. If the sensor is working correctly but you want to cut down on noise, is it possible that doing a little averaging could help you?

-Paul