A Scriptable Thermometer

20,818

Circuit Image

A new generation of intelligent, scriptable sensors/controllers is on the horizon. Traditionally, many simple machines utilized separate thermometer and control units. In contrast, this design presents a unified thermometric controller that can be programmed with simple scripts. It incorporates an accurate temperature sensor, a graphic LCD display, several inputs, and relay outputs capable of directly driving loads. This system can be utilized for various applications, such as a charting thermometer, a vending machine that dials a number when empty, or a programmable leavening machine, allowing hardware retention while changing scripts. Previously, making a thermometer scriptable necessitated an expensive processor with ample RAM and extensive external non-volatile memory, which depleted I/O pin resources, necessitated larger enclosures, and significantly increased costs, rendering the product less appealing. However, advancements in powerful flash microcontrollers have reversed this situation. The COP8FLASH's Virtual EEPROM eliminates the need for external non-volatile memory, freeing up valuable I/O ports. A 44-pin processor can comfortably manage a small keypad, dip switches, a graphic LCD, serial communications, and an additional four inputs and four outputs. External reset chips or brown-out detectors are no longer necessary, and the built-in true 10-bit ADC negates the need for external amplifiers. The front panel, approximately the size of a 3.5-inch floppy disk, is largely occupied by a large, backlit graphic LCD display, with the remaining space allocated for three customizable tactile-feedback keys. All connections are easily accessible on the opposite side of the enclosure, featuring two rows of screw clamps for inputs, outputs, and the temperature probe. The fourth output (OUT4) functions autonomously as a thermostat without requiring special programming, including both normally open (N.O.) and normally closed (N.C.) contacts. The scripting language is straightforward, consisting of only 15 statements, catering to typical customers who prefer operational machinery over learning programming intricacies. Two typical application scenarios were developed for verification: a graphing thermometer/thermostat and a refrigerated, GSM-enabled vending machine. Despite its compact design, the language is robust, offering structured programming with global and local variables, recursion, and no restrictions on variable or procedure name lengths or the number of function parameters. The operator set includes both Boolean and bitwise logic, bit shifting, and modulus operations, while avoiding the complexities of parentheses and punctuation. It can be operated via a basic ASCII keyboard, with in-place editing on the LCD display using a built-in full-screen editor. In case of errors, the cursor is automatically positioned on the incorrect line. Alternatively, it can be connected to any computer, regardless of the operating system, without the need for specialized software; any terminal emulator suffices. Program copying from a web page is a simple cut-and-paste task. The design is centered around the CCR9 microcontroller, with the prototype built around the 68-pin variant while utilizing only common pins with the 44-pin version due to its appealing package. Almost all pins are utilized, starting from the serial port, which employs a classic TTL to RS232 driver chip, the DS14C232, with one RS232 driver connected to the connector and the other supplying the negative voltage required by the system.

The unified thermometric controller integrates several key components that enhance its functionality and user experience. The temperature sensor is designed for high accuracy, ensuring reliable readings for various applications. The graphic LCD display not only provides real-time data visualization but also supports user interaction through its customizable keys, allowing users to easily navigate menus and settings.

The relay outputs are designed to handle a range of loads, making the controller suitable for diverse applications. The autonomous thermostat output (OUT4) operates independently, providing a straightforward solution for temperature control without the need for complex programming. This feature significantly simplifies the setup process for end-users.

The scripting language, while simple, is designed to be powerful enough to handle complex tasks. The inclusion of global and local variables, recursion capabilities, and a flexible operator set allows users to create sophisticated control algorithms without the steep learning curve typically associated with programming. The built-in full-screen editor enhances usability by allowing direct editing on the LCD, making it accessible for users with varying levels of technical expertise.

Connectivity options are robust, with the ability to interface with various devices and systems. The use of standard terminal emulators for programming and debugging means that users can easily integrate the controller into their existing workflows without additional software installation. This flexibility is particularly advantageous in industrial settings where compatibility with existing systems is crucial.

The overall design prioritizes accessibility and ease of use, ensuring that users can quickly implement and modify their applications. This controller represents a significant advancement in sensor technology, combining the functionality of traditional systems with the flexibility of modern programming capabilities, making it a valuable tool for a wide range of applications.A new generation of intelligent, scriptable sensors/controllers is around the corner. Up to date, the classical approach at the heart of many simple machines consisted of separated thermometer and control units. By contrast, my design is a unified thermometric controller that can be programmed with simple scripts.

It integrates an accurate tempera ture sensor, a graphic LCD display, a handful of inputs and relay outputs capable to drive loads directly. Whether you need a charting thermometer, a vending machine that dials your number when empty, or a programmable leavening machine, you keep the hardware and change the script.

Until recently, making a thermometer scriptable required an expensive processor with enough RAM and lots of external non-volatile memory and other external parts. This rapidly exhausted the I/O pin arsenal, and in turn required a bigger enclosure and increased significantly the cost, making the resulting product unattractive.

I am going to demonstrate that the situation is now reversed thanks to a new generation of powerful flash microcontrollers. The COP8FLASH`s Virtual Eeprom replaces external non-volatile memory and frees up precious I/O ports.

A 44-pins processor handles comfortably a small keypad, dip switches, a graphic LCD, serial communications plus an extra 4 inputs and 4 outputs. External reset chips or brown-out detectors are no longer required. Not to mention the built ‘in true 10 bit ADC that makes external amplifiers unnecessary. The front panel is about the size of a 3, 5  floppy disk and is occupied almost entirely by a large, backlit, graphic LCD display.

The remaining area is used by three customisable tactile-feedback keys. All the connections are easily accessible on the opposite side of the box. There are two rows of screw clamps for the inputs, the outputs and the temperature probe. The fourth output (OUT4) is the thermostat output. It works autonomously as a thermostat without the need for special programming. As it is usual for thermostats, it includes both the N. O. and the N. C. contacts. The scripting language is very easy to learn: it consists of only 15 statements. This is good news, as the typical customer wants to get his machinery work, not to learn programming language amenities. In the process of selecting (and in order to verify) only the most meaningful statements, I developed two typical application scenarios: a graphing thermometer/thermostat (see Application #1), and a refrigerated, GSM enabled vending machine (see Application #2).

Despite of its tiny footprint, the language is all but primitive. It is structured and provides global and local variables, as well as recursion. No limits on variable and procedure name length, nor on the number of function parameters. Like C, the set of operators includes both Boolean and bitwise logic, bit shift, and modulus. Unlike C, it will not bother you with parenthesis and punctuation. A dumb ASCII keyboard can drive it, and editing can be done in place on its LCD display using the full ‘screen editor that comes built in. In the event of an error, it nicely places the cursor on the wrong line. Alternatively, you can conveniently connect it to any computer (be it a DOS, Win, Linux, Mac or any other architecture).

The guys at the customer support will be happy to know that there is no specialized software to install: any terminal emulator is OK. To make your boss even happier, tell him that copying a program from a web page is a simple matter of cut & paste.

I designed Scriptherm around the CCR9. Even if I built the prototype around the 68 pin part, I carefully selected only those pins in common with the 44 pin, due to its attractive package. Almost all of the pins got used. I started from the serial port, with a classic TTL ‘to ‘RS232 driver chip: DS14C232. One of its two RS232 driver goes to the connector, while the other supplies the negative voltage required by the L

🔗 External reference




Warning: include(partials/cookie-banner.php): Failed to open stream: Permission denied in /var/www/html/nextgr/view-circuit.php on line 713

Warning: include(): Failed opening 'partials/cookie-banner.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/nextgr/view-circuit.php on line 713