Giter Site home page Giter Site logo

charlesbaynham / digitaltemperaturecontroller Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 5.0 25.83 MB

Schematic, PCB and source code for a high-precision digital temperature controller

Python 0.09% LabVIEW 9.13% C++ 35.77% C 2.24% HTML 23.59% CSS 5.52% JavaScript 5.16% Makefile 0.09% TeX 18.07% Batchfile 0.12% Shell 0.22%

digitaltemperaturecontroller's Introduction

Digital Temperature Controller

Copyright Charles Baynham 2018

This repository holds a design for a digital temperature controller. The controller is designed for taking high precision temperature measurements via a thermistor and applying low bandwidth PID feedback in response.

This README file gives a brief overview of the device, but a much more detailed description is available in the manual, located in ./Manual.

./Board design contains schematics and PCB layouts for the controller board. This was produced in the open-source software KiCad.

./Code_for_microcontroller contains the C++ code that must run on the on-board microcontroller.

./Code for Labview contains a sample LabView application for controlling the device. See warning below...

Output

Output is by OPA458 high power opamps. Output can be up to 1A continuous, at voltages up to ±15V depending on the power supply.

Input

Error signal acquisition is done by taking a balanced measurement between a thermistor and a set resistor. The board produces an excitation voltage and measures the difference in current between the thermistor and resistor to produce a temperature measurement. For less demanding applications the set resistor can be on-board. For the highest stability, the precision resistor should be placed next to its paired thermistor. This measurement is performed by an INA330 chip, of which there are two present on the board. The entire analogue section is electrically isolated from the rest of the board to prevent noise on the electrical ground affecting the measurement.

Control

The board can be controlled using a (virtual) serial connection over either USB or RS-485. Both of these interfaces are galvanically isolated to prevent electrical interference. The on-board microcontroller permits headless operation of the device, and commands may be issued using a LabView interface.

Code

The code running on the device is written in c++ and has been well tested. The LabView control interface, designed to be run on a monitoring computer, is less well-tested and should be used at your own peril! For integration into an experimental system, control the device by issuing serial commands detail in the supplied manual.

Manual

You should go read it now. It's in ./Manual.

Extensions

The board is designed to break out the important analog (and come digital) connections, so that additional functionality can be enabled by adding a daughter-board to the main board. For example, you might

  • Require higher output currents
  • Not need current driving capability, but would prefer very low-noise output instead
  • Need an extreme level of stability, so use an external, ovenized voltage reference

None of these daughter-boards yet exist, but the interface required to create them exists from V5 onwards.

Initial setup

The microcontroller needs to be flashed using Atmel Studio and an ISP programmer. You should either:

  1. Set the fuses as described in fuse_settings.txt
  2. Flash the bootloader saved as optiboot_atmega328_custom_NANO.hex
  3. Use the Arduino IDE to compile and upload the latest version of the code

OR

  1. Flash the complete production .elf file stored in .\Code_for_microcontroller using Atmel Studio, making sure to select "Flash", "Fuses" and "Verify Device ID" in Atmel Studio. This will give you whatever version of the code was stored in this .elf file, you can then update it using the Arduino IDE if you want to make changes.

digitaltemperaturecontroller's People

Contributors

charlesbaynham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

digitaltemperaturecontroller's Issues

Error in commands

Hi Charles,

I am a research fellow in Sr atoms group at the University of Birmingham. One of my colleagues recommended your design for temperature controllers for high finesse cavities. Thank you very much for providing this design and all the documents!

I have got some PCBs manufactured based on your design, and I have established the communication between the microcontroller and a computer. However, I am having issues with some commands.

The first issue is the Error in startup commands. This error shows up first every time the board is connected.

The second issue is the Error in some of the commands. I found the error only shows up for all the commands that the number of parameters is not 0.

I attached a picture here to give some examples, the first line shows the startup error. The second line is when I sent *TST and I got 'loud and clear' in return without an issue. The third line is when I sent 'LOCK' command but got an error.

temp

I don't have much experience in C++ or Arduino, if you could help with any ideas, that would be very helpful!

Also please can I ask should I use Labview files as a user interface, once I have got the C++ programme running?

Again, thank you very much for the design, and I appreciate any answers.

Best regards,
Sarah

ES pins floating or driven high for 2 channel configuration.

Hi Charles

I would like to first of all thank you for posting this project on GitHub, I really enjoyed going through your microcontroller C++ code and expanding my knowledge of C++ from the more basic concepts to more sophiscated methods e.g usage of pointers to pointers, references to pointers and virtualisation.

As you may know I am working alongside Sarah (Sr group at the University of Birmingham) to get the 2 channel board configuration running. The first change I have made is in the Pins.h file to uncomment pin_2chan.h and comment pins_4chan.h. However when uploading this code, whilst enabling the vertical switch, I get the error that 'ES_FLOAT_ON' is not referenced in the subsequent files e.g V4_OPA_OutputChannelBipolar.cpp.

An ad hoc solution would be to enter const bool ES_FLOAT_ON = false; in the pins_2chan.h file. I have set the ES pins to be driven high because you have done the same for the 4 channel configuration in the latest version version 5 in Pin_4chan.h file. Would I be right in doing this, I wanted to ask you before implementing it? I have read through all of the manual but I don't know if I have missed a step.

PS: On an unrelated note, I have seen your posts on the M-labs forum regarding the ARTIQ scheduler, I had also posted on the same thread. Given your experience with ARTIQ would you be willing to have a one-off 15 minute zoom meeting to discuss your ARTIQ system. I understand it is a completely different experimental setup but I would really appreciate an opportunity to talk to someone else working on an ARTIQ system and discuss issues regarding experimental scheduling and the compiler.

Documentation should automatically compile

The pdf documentation should use CI to automatically compile from the code. If not this, then at least it should be easy to do! Currently the pdf committed to this repository is out-of-sync with the code (see #1).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.