
Noname29JUL2018
robin48gx/TH7
Code to read thermocouples from the raspberry pi using the SDS TH7 PCB

Code to read thermocouples from the raspberry pi using the SDS TH7 PCB
TH7 is an open-source printed circuit board by robin48gx, from the robin48gx/TH7 repository on GitHub. It is a 2-layer board of 56 × 65 mm with 48 parts on 61 nets, routed with 406 tracks and 67 vias.
It is built around the MCP3208-BI/P. Its parts include 27 resistors, 4 capacitors, 4 ICs, 3 diodes and 1 connector.
Code to read up to seven thermocouple inputs from the raspberry pi using the SDS TH7 PCB
Enable spi in raspi-config.
Also, if you are running the pi as a user other than 'pi' add yourself to the spi group in /etc/group.
Clone the git hub repo here,
$ git clone https://github.com/robin48gx/TH7.git change directory to TH7 and then run
$ python ssh_terminal_TH7.pyThe python file ssh_terminal_TH7.py is a simple terminal program
that displays the microvolts received from
the thermocouples and displays them in centigrade (for k type).
It also displays the PCB temperature and the Vcc (voltage from USB to the pi;
the value is necessary for accurate calculation of microvolts).
It also creates a logging file (called 'TH7.log') showing the voltage supplied to the pi, the
PCB temperature and the temperature of each connected thermocouple. This logs once per minute.
If logging is required run with nohup, i.e.
$ nohup python TH7_logger.py > /dev/null & The logging will then continue on the pi even if the terminal running it is closed. The LEDs are controlled by the ssh_terminal_TH7.py and by the TH7_logger.py programs, so if they are alternately blinking this means the logging is continuing. A script called 'plot_it.sh' will (using gnuplot) take data from the TH7.log file and present it as a graph.
The python file thermometers_TH7.py adds to this with tkinter drawn thermometers. You may need the tkinter python modules for this : i.e. apt-get install python-tk.
Feel free to branch off this to make a temperature logger or a web interface.
For h/w 0.4 and above, an open thermocouple connection will display a very low
micro-volts figure (typically < -7000) which is out of range for most thermocouples
and out of the range that most temperature readings would ever require (its below
abs zero for a k type for instance).
This means open thermocouples can be error flagged (as has been implemented for the
python k type thermocouple in this repo).
| Qty | Value | Footprint | References |
|---|---|---|---|
| 7 | 100K | Resistor_SMD:R_0805_2012Metric | R4, R5, R6, R7, R8, R9, R10 |
| 7 | 330k | Resistor_SMD:R_0805_2012Metric | R31, R32, R33, R34, R35, R36, R37 |
| 6 | 1k | Resistor_SMD:R_0805_2012Metric | R12, R13, R14, R15, R16, R17 |
| 4 | 100nF | Capacitor_SMD:C_0603_1608Metric | C1, C2, C3, C4 |
| 3 | TestPoint_Pad_2.5x2.5mm | TestPoint:TestPoint_Pad_2.5x2.5mm | 5V, GND, K |
| 2 | 10k | Resistor_SMD:R_0805_2012Metric | R2, R3 |
| 2 | 330 | Resistor_SMD:R_0805_2012Metric | R18, R19 |
| 2 | LED_ALT | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D2, D3 |
| 2 | MCP6074-E_SL | Package_SO:SOIC-14_3.9x8.7mm_P1.27mm | U1, U2 |
| 1 | 10K | Resistor_SMD:R_0603_1608Metric_Pad1.05x0.95mm_HandSolder | R25 |
| 1 | 1K | Resistor_SMD:R_0805_2012Metric | R11 |
| 1 | 470 | Resistor_SMD:R_0805_2012Metric | R1 |
| 1 | LM4040DBZ-4.1 | Package_TO_SOT_SMD:SOT-23 | D1 |
| 1 | MCP3208 | Package_SO:SOIC-16W_5.3x10.2mm_P1.27mm | U3 |
| 1 | Raspberry_Pi_2_3 | Connector_PinSocket_2.54mm:PinSocket_2x20_P2.54mm_Vertical | RASPI_2_3_HEADER1 |
| 1 | Screw_Terminal_01x14 | Connector_Wago:Wago_734-144_1x14_P3.50mm_Vertical | J1 |
| 1 | TC77_SUBSTITUTE | SOT95P280X145-5N:SOT95P280X145-5N | U4 |
The 43 most common of 48 parts.
It measures 56 × 65 mm and has 2 copper layers, 1.6 mm thick.
48 parts, built around the MCP3208-BI/P. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the robin48gx/TH7 repository on GitHub, at the commit this page was made from: the board is kicad/test.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask robin48gx before reusing the design.

robin48gx/TH7
Code to read thermocouples from the raspberry pi using the SDS TH7 PCB

ctag-fh-kiel/esp32-eurorack-audio
Open source eurorack audio module based on ESP32

sinneb/esp32-hvcc
Heavy compiler (hvcc) sources running on ESP32-DevKitC powered eurorack module


fpga-theremin/theremin
Open source digital FPGA based theremin project


cclienti/tig-welder
A DIY TIG welder that can be plugged to a traditionnal stick welder or to a high current source

