help me architect an industrial temperature controller
JasonC
Posts: 3
Hi, I'm new here, pls. be kind.
I'm an analog design engineer, and not entirely new to microcontrollers.
In a former life I did C programming and I know a bit of BASIC. And I recently completed a small personal project using an Arduino.
The temperature controller needs to have an IR temp sensor, an LCD readout, 2 push buttons, and one output for the heater (on/off command). It's a one-off project, and thus not super cost sensitive.
Priority is in ease of coding. I'm not a software weenie, my wares are hard. I want to reuse as much code as possible, especially the serial comm stuff. (to the IR temp sensor, and the LCD readout). This is why I'm considering the Stamp over the Arduino, I like the sample code for the below IR module and the LCD readout. It will take me 10x longer writing the serial comm stuff than writing the heater control loop stuff (it's bang-bang and I have analog and digital control system design experience).
So I'm thinking of using this IR temperature module
MLX90614 Infrared Thermometer Module
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/MLX90614/List/0/SortField/4/ProductID/539/Default.aspx
and this LCD readout
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/lcd/List/0/SortField/4/ProductID/50/Default.aspx
and the Basic Stamp 2.
So my first Q is - can the BS2 do serial comm with both the LCD and the IR module?
TIA.
I'm an analog design engineer, and not entirely new to microcontrollers.
In a former life I did C programming and I know a bit of BASIC. And I recently completed a small personal project using an Arduino.
The temperature controller needs to have an IR temp sensor, an LCD readout, 2 push buttons, and one output for the heater (on/off command). It's a one-off project, and thus not super cost sensitive.
Priority is in ease of coding. I'm not a software weenie, my wares are hard. I want to reuse as much code as possible, especially the serial comm stuff. (to the IR temp sensor, and the LCD readout). This is why I'm considering the Stamp over the Arduino, I like the sample code for the below IR module and the LCD readout. It will take me 10x longer writing the serial comm stuff than writing the heater control loop stuff (it's bang-bang and I have analog and digital control system design experience).
So I'm thinking of using this IR temperature module
MLX90614 Infrared Thermometer Module
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/MLX90614/List/0/SortField/4/ProductID/539/Default.aspx
and this LCD readout
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/lcd/List/0/SortField/4/ProductID/50/Default.aspx
and the Basic Stamp 2.
So my first Q is - can the BS2 do serial comm with both the LCD and the IR module?
TIA.
Comments
Yes
'
I would use the BS2P24 or 40 'the 40 has more I/O pins but I don't think you'll them for this little project.
'
You could also write a debug window back to the PC through the programming port to help get all the code working.
'
Multiple comms aren't a problem.
This is just a days work for the BS2P
'
Do a little research, Experiment ,Ask some more questions if needed
The PAUSE statement is often used for timing with a resolution of 1ms. Typically, you'd have a loop that takes approximately the same time to execute regardless of what it does and, overall, takes a few milliseconds to execute. You add a PAUSE statement to the loop that uses up the rest of the 500ms loop time with 1ms accuracy.
'
Take a look at the StampWorks Manuel
http://www.parallax.com/Portals/0/Downloads/docs/books/sw/Web-SW-v2.1.pdf
'
This has some of the best demo code to get used to the BS2. Its explained very well.
'
Don't try to write all of the code at once.
'
Start a DEBUG window. Make it work from the example code.
'
Now send the data from the IR unit to the DEBUG window
'
Next - send the info to the LCD.
'
When you get the LCD reading the data you want, Simply remove the DEBUG statement