osPID - open source PID-controller. Part 2 - Input/Output Cards, Software

Part 1

Input Card

The input cards come in several types, each tailored to a different type (or types) of input. The first input card we designed is capable of measuring temperature through either a thermistor or thermocouple. Work on the next input card (for RTD input) is ongoing. The input card has 2×6 edge card pins to connect to the main board. The pinout of the edge card connector residing on the main board for the input card is as follows:

osPID - open source PID-controller
Figure 6. Pinout of the edge card connector residing on the main board for the input card.

Basic Temperature Input Card

The basic temperature input card is able to read a thermistor sensor and a type K thermocouple sensor.

osPID - open source PID-controller
Figure 7. Basic Temperature Input Card.

Features

  • 1 thermistor input port:
    • An external reference resistor is required to match the nominal value of the thermistor. The accuracy of the reference resistor used should be at least of that of the thermistor’s. (We chose to use an external rather than an internal reference resistor to give greater flexibility to the end user.)
    • Can be used as generic voltage input sensor (example: potentiometer, LDR, etc)
  • 1 type K thermocouple input port:
    • Uses MAX31855KASA + MAX6675ISA+:
    • Thermocouple open detection
    • Cold junction temperature measurement available for use -200 °C to +1350 °C 0 °C to +1024 °C temperature measurement range

Depending on the application and desired accuracy, the user can select to use either the thermistor or the thermocouple as the input to the system. This can be selected in the PC-based user interface. You can even use them both by hacking the firmware to run two instances of PID module at the same time!

 osPID - open source PID-controller
Figure 8. Basic Temperature Input Card Schematic Diagram

Wiring Instructions for Basic Temperature Input Card

Thermistor as Input Sensor

The temperature basic input card has an input port for thermistor sensor. Besides the thermistor, you'll need a matching resistor with a value equivalent to the thermistor's resistance at a rated temperature (usually 25 °C). This resistor also needs to have an accuracy at least of that thermistor.

 osPID - open source PID-controller
Figure 9.

Wiring Instructions for Basic Temperature Input Card: Thermistor as Input Sensor.

The thermistor sensor leads does not have any polarity and is inserted at the top two terminal spots (labelled as sensor) of the temperature basic input card. The resistor is inserted into the next two terminal spots (labelled as reference resistor) of the temperature basic input card. It is recommended to trim short the resistor leads as short as possible.

The osPID unit is shipped with a default firmware using the thermocouple as the input sensor. You can reconfigure the osPID unit to use the thermistor as the input sensor through the osPID front end software. You will need to key in the rated resistance of thermistor sensor and it's beta temperature coefficient.

Thermocouple as Input Sensor

The temperature basic input card has an input port for thermocouple type K sensor and temperature measurement range between 0 °C to +1024 °C. Please ensure that you are using the correct thermocouple type as the wrong thermocouple type will yield unexpected and wrong temperature reading.

 osPID - open source PID-controller
Figure 10. Wiring Instructions for Basic Temperature Input Card: Thermocouple as Input Sensor.

Thermocouple leads has polarity and this is indicated by the color of the insulation jacket which can be based on US & Canada standard (yellow & red) or international standard (green & white). Yellow and green indicates the positive lead (Nickel - Chromium). Red and white indicates the negative lead (Nickel - Aluminium).

Insert the negative lead (red or white) to the 5th terminal spot from the top (labelled as TC-) and the positive lead to the 6th terminal spot (labelled as TC+).

If prior to the use of thermocouple sensor on the osPID unit, you have selected the thermistor as the input sensor, you'll need to reconfigure the osPID unit to use the thermocouple as the input sensor from the front end software.

Output Card

An output card is required to provide a feedback to the system by controlling the output behavior. The first output card we designed is a digital output card having 2 relay outputs and 1 digital output (for connecting to an external SSR.) Work on an analog output card is ongoing. As with the input card, The output card has 2×6 edge card pins to connect to the main board, but with a slight different pinout. The pinout of the edge card connector residing on the main board for the output card is as follows:

osPID - open source PID-controller
Figure 11. Pinout of the edge card connector residing on the main board for the output card.

Features

  • 2 SPST NO 10A relay (only 1 mounted)
  • 2 Oz copper PCB
  • 1 output pin to drive an SSR
  • 3 indicator LED (2 for relays, 1 for SSR)
 osPID - open source PID-controller
Figure 12. Output Card Schematic Diagram

Others

We can’t wait to see what people will do with the osPID. This includes hacking and modifying it to suit their needs. Therefore, we came up with 2 simple boards that can be used to hack & modify the osPID:

osPID - open source PID-controller
Figure 13. Prototype card and Breakout board for osPID controller.

This is a simple prototyping board that breaks out all the pins on the edge card with a prototyping area with SOIC footprint (up to 20 pins of 1.27 mm pitch) and TSSOP footprint (up to 20 pins of 0.65 mm pitch) is also available for you to populate your own circuit and design. 

This is a tiny board that simply breaks out the pins on the edge card. We knew someone out there might want to use our osPID main board to do something else other than PID control and it might need to go into tight spaces. This tiny board might be just what you need!

Installing Firmware

One of the benefits of the osPID is the ability to update and change the onboard firmware.

  1. Download and install the Arduino 1.0 IDE
  2. Download the Firmware from GitHub and unzip
  3. Connect the osPID to your computer and to a wall outlet
  4. Launch the Arduino IDE. Under “Tools,” Ensure that the correct COM port is selected and that the Board is set to “Arduino Duemilanove w/ATmega328
  5. Open “osPID_Firmware.ino” from the downloaded firmware and select “Upload”
  6. The upload process has two phases. First the code will compile, then it will be sent to the osPID. If the process seems to be stuck at the uploading phase, it may not be set to auto-reset (see note below.) that's fine, just press the reset button and the transfer will begin
  7. If everything goes correctly the firmware will upload and the IDE will display “Done Uploading.”

Note on Auto-Resetting: As with the Arduino, the default osPID behavior is to restart whenever a new serial connection is made. This makes it very easy to upload a new program to the unit. Unfortunately, this can be a problem during normal operation; If the osPID is running and you want to connect with the Front-End, you DO NOT want the osPID to reset. For this reason, we have included a jumper on the back of the main board.

Front-End Software

The frontend is a desktop application written in processing. it allows for trending of osPID data, as well as more advanced configuration. The most current version of the Front-end can be found at downlods section. Download and unzip this file, and you will find the executable in the “application.[your operating system]” sub-folder.

osPID - open source PID-controller
Figure 14. Front-End application Window.

Note: Instead of running the compiled application, you may wish to run the front end from code. To do this:

  1. Download the processing ide
  2. Download the controlp5 processing library and put it in the “[processing workspace]libraries” folder
  3. Use the processing IDE to open “osPID_FrontEnd.pde”

The frontend scans available ports only on initial startup. for this reason connect the osPID via USB before starting the application.

Additional documentation and up-to-date information on the osPID Controller available on Documentation Page.

Downloads

osPID Schematic (main Board, Input/Output Cards) - download
Front-End Software and source Code - download
Firmware and Source Code - download
Processing IDE - download

ospid.com

You may have to register before you can post comments and get full access to forum.
EMS supplier