PID and I2C Temperature Sensor?

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

TriangleIL

Well-Known Member
Joined
May 6, 2010
Messages
222
Reaction score
3
Location
Chicago
I'm looking for a temperature sensor that will be able to be used simulatenously through my I2C bus as well as on my Auber PID . Does anyone know if a PT100, RTD or DS1820/DS18S20 sensor will work for both applications? Everything I look at seems to only work for one or the other.

Thanks!
 
You can use a thermistor and resistor to develop a voltage signal and feed an analog card on the I2C bus and the Auber PID setup for a 0-5V input. The larger question is why the Auber PID when you can program a PID loop in the software ?.
I have started a new project that is going to utilize I2C interface hardware and a HMI written in C# that will be a subset of the current application for the Opto 22 hardware without the SQL data tables and recipe builder.
 
Kladue,

Thanks for your reply! I've always appreciated your input.

As for the reasons behind the I2C and PID controller, I am currently in the process of putting together my control panel, and the plan is to allow for "manual" mode as well as "automated" mode. The long term goal is to have the brewery completed automated with I2C connected to my PC via a USB to I2C adapter. I've completed a proof of concept to actuate my valves, and turn on/off my heating elements. However, I am at the phase where I need to get my temperature sensors hooked up to both the PID and the I2C bus. I realized this morning that I don't think I can use the DS1820 sensor I had planned on using, because I don't think the Auber PID supports that interface.

I will try and research more into what you are suggesting. Feel free to ping me with any C# questions, as that is my area of expertise. All this other electrical/wiring/signal processing logic is still a little over my head. The learning curve is steep. :ban:
 
The area I might need help with in C# is a web interface, the rest I have learned on the fly converting the Java app to C#. With about 30 hours a week to devote to programming the conversion went faster than I thought, so now I am starting a new project to bring a scaled version to an ARM9 powered platform with 7" touch screen and utilize the I2C hardware for analog, digital, and PWM functions. Preliminary control hardware budget is under $250 less power supplies, SSR's, and sensors. The plan is to remote the power and interface hardware to a separate enclosure on the frame and keep the display in an easily accessible location.
 
I'm looking for a temperature sensor that will be able to be used simulatenously through my I2C bus as well as on my Auber PID . Does anyone know if a PT100, RTD or DS1820/DS18S20 sensor will work for both applications? Everything I look at seems to only work for one or the other.

Thanks!

There is no way I can think of to interface your 1 wire DS18S20 temperature sensor to a Auber PID. I would PM CodeRage as he is working on a board to interface a RTD or Thermocouple to a Brewtroller. I think his board connects to the Brewtroller using the I2C bus. If his board does use the I2C bus you should be in business.
 
No problem Kladue, just let me know. I will be doing something similiar , and to that end, I plan to publish whatever I create to allow others to follow. Seems to be the best way I can give back for all the help I have received on HBT.

Sawdustguy, thanks for the info. I'll have to ping CodeRage to see what he has come up with so far.

I also found this today while doing my research. Looks promising, and easy enough to follow. Then I can just use a normal K type thermocouple and be in business (I think).
 
TriangleIL, the thermocouple might not be a good choice, I am not sure what the cold junction reference will do with the signal paralleled between 2 inputs. You might be safer working with a voltage or current loop signal with both the Auber and an interface board.
How far have you gotten with the HMI programming?, there might be some things I have built that you can use, a keyboard, keypad, manual up/down value stepper that increases the step rate the longer you press the arrow button.
 
Kladue, I'm not sure I follow regarding the cold junction reference? Are you suggesting that the TMP513 would cause interference against the PID, or vice versa? Also, when you mentioned that, I thought of another potential draw back. I assume the TMP513 is using the cold junction reference to determine a delta T against the thermocouple? Does that mean if my TMP513 is located inside my control panel, and during the course of a brew day, my control panel changes temperature, that my input will become inaccurate?

Regarding the programming, I've mostly only accomplished the proof of concept against the I2C bus so far. I simply have buttons and textbox outputs to test my I2C interface. My plan is to finish the build, and then spend the next few months working on the programming UI interface. The long term goal is to put the brew rig on the web, allowing me to start a brew day before I leave for work, getting real time updates pushed to my cell phone, and posting Twitter updates at the end of a brew day with the recipe, final gravity, etc. I have some other future thoughts, including managing the fermentation process. So short answer, I do not have any visual controls built at this time.

My development plan is to have all the control logic live within the PC inside my control panel. I will be exposing the entire control process through web services to allow the interface to be written anywhere (web, phone, PC, etc). Which technology set are you using for your C# development? Forms, Silverlight, WPF, other? I assume you are using Visual Studio? 2008, 2010? FYI, a new version of the windows operating system will be out within the next year or two that will run on an ARM processor. This may make our development efforts even easier in the future.
 
The cold junction compensation is a comparison voltage used to compare sensor reading for purposes of measurement. I am not sure of the results of parallel connected sensor inputs because I have never seen this tried in the field before.
The HMI I have developed is a composition of threaded classes and forms of which most of which are dialog forms built in VS 2005. I use 28 MySQL tables to populate the various data grid view tables utilized on the various forms and record data for use in operation and data logging. The forms are sized to 1024 X 768 to fit the touch screen PC destined for system control when final version is finished. The touch screen PC is memory limited to 256 Mb so my efforts have been towards as small a memory footprint and as low a run time CPU load as possible, Java worked but they have serious problems with native memory management that require a few tricks to overcome.
There are so many different functions that the current software is capable of that would waste every one else's time if I tried to list them. The short version is it has recipe, automatic control, datalog, mutivariable graph, voice alarm annunciation, and safety shut down features. All settings are reached through various pages during runtime instead of code so changes can be made during operation.
 
Would it make sense to use something like the MCP3425? On page 22, it appears I could hook up a thermister with a 10 kOhm resistor which should make this work? Question though, why are the capacitors included on input 5?
 
Would it make sense to use something like the MCP3425? On page 22, it appears I could hook up a thermister with a 10 kOhm resistor which should make this work? Question though, why are the capacitors included on input 5?

If you take a closer look at the data sheet you will see that in a high noise environment the chip is prone to aliasing. The capacitors are there to filter noise. If you build the circuit they should be connected as close to the chip as possible no matter what power supply you use.
 
Cool thanks for the explanation on the caps. Would something like this (AD7998) work? I'm actually quite interested in wiring my own chip up now, if I'm going to do this, I should go all the way.

ETA: To me, it looks like this will work, but I really don't know enough to make a difinitive answer on that.
 
Thanks for all the help. After messing with my new toy, a Netduino, I think I finally have a grasp on what you meant. I'm more of a hands on learner, so I don't tend to understand the concepts until i've seen them in action. I put the output of my Netduino through a potentiometer and back into an Analog input, and now can understand how I can apply this logic to the thermistor. Or at least, I think this is how they work. A thermistor is basically like a potentiometer, adjusted by temperature, correct?

Things are moving along quickly now. My interface programming to the relays, LED display and thermister should be done by weeks end. Then I need to expose the Netduino via HTTP protocol so I can get to my sensor, relay, temperature information.

Getting excited now!

The only question now is, can someone recommend a thermistor for me?

Edit: The operating temperature on this Thermistor is 0C-100C. I assume this is what I would want, or am I missing something? Then I can just add another 10kOhm resister in the circuit, as seen here, and then I'd be golden for 0-5V?
 
If I were you I would use a RTD instead of a thermistor. The reason I say this is that thermistors are not very linear and you will need to create a lookup table. RTD's on the other hand are very linear making the measurement much easier with a simple calculation.
 
Which is the most accurate, an RTD or a thermistor? I don't mind the lookup table/programming aspect of it, but I'd like to make sure I get the best/correct tool for the job.
 
RTD's are more linear than thermistors but the rate of resistance change is smaller than thermistors. Most RTD applications require an amplifier circuit to increase the rate of change related to temperature. The thermistors are not too linear but offer a much higher rate of resistance change and output signal that you need when working with 8 - 10 bit resolution analog inputs.
 
It looks like six of one, 1/2 dozen of the other. If you decide to go with the RTD a simple low drift Op amp gain stage will be needed but with the thermistor a lookup table will be needed because of the non-linearities. Pick your poision. BTW, thats why I mentioned Coderage. He has a working board that will interface a RTD to a Arduino via the IC2 bus and the gain stage is built into the board.
 
Back
Top