BotronikS - Final code for all types of Arduino and PC users: -- HOME -- Email: botronik@gmail.com

Nano
Uno
Mega

- DS18B20: 1 - 2 - 3
- Relay module: 1 - 2 - 3
 
 
 
misc: Wires: (link) 1--2--3
 
Arduinos
connections (click to enlarge)
- Need additional accessories:

Free Hex & Exe code! Arduino source code available on email request only (copy and send next text): PCTP101-ARDSC: Price=10 Euro

PCTP101: Programable thermostat (sensor DS18B20) with two temperature thresholds (Hi & Lo) and 2 outputs
The offered code enables: Control of outputs state depends on settings and measured values...
For Arduino boards: NANO - UNO - MEGA
Arduino pins are used: see connections (used Sensor(s)=DS18B20 - Lnk1 - Lnk2 )
 
Electrical and practical notes:
It can be powered only from PC USB but it is recommended to use an external voltage source 9V/1A (on dc plug or on VIN pin).
Sensor pin is connected to 5V via resistors 3K3-4K7 (if the sensor does not have a built-in resistor)
On outputs can connect some other type of 5V Loads up to 20 mA (for each output) like SSR's: Link1--Link2
On outputs can use Relay Modules but as far as possible from Arduino board!
When finishing uploading code, be sure to do a Default Reset (see below)
 
User guide and explanations:
Output 1 operation code: If PV01(temp.) is under SV01(Lo) then Out1=ON. If PV01(temp.) is over SV02(Hi) then Out1=OFF (eg. heating)
Output 2 operation code: inverted of OUT1 (eg. cooling)
The set values remain stored (EEPROM) even after a power failure!
The code in the board does independently from PC according to the last settings values! Measuring and regulation are on 1 sec.
 
Download the HEX codes below, unpack and upload to the proper Arduino board (Use a free net tool for example XLoader)
1. uc ATmega328-16MHz (MINI,NANO,UNO..): PCTP101-m328
2. uc AtMega2560 (Mega(ATMEGA2560)......): PCTP101-M2560
 
Description of HexCode commands ( You can test the uploaded code using some free serial communication software such as Termite (select: Append CR)):
AT command (ASCII characters + ENTER) - Baud 9600,8 Data bits, None Parity,1 Stop Bit
AT - attention command (returns OK)
I? - software code info (return ucAppName)
PV? = Return proces values PVxx (PV01=Temperature(C)) (in one decimal digit form) PV02=Out1-state PV03=Out2-state (1=ON)
SV? - Return set values SVxx (SV01=X SV02=X see below)
Set-Preset commands: Some or all commands use internal Uc EEPROM for memorization when power loss!
SV01=x - x=Set Lower threshold (Lo) (one decimal digit form - range: -50.0 to 120.0C (example: SV01=-12.3)
SV02=x - x=Set Upper threshold (Hi) (one decimal digit form)- range: -50.0 to 120.0C (example: SV02=45.6)
DRESET - Default Reset ( SV01=22.1 SV02=33.2) - BE SURE TO DO THIS AFTER UPDATING THE CODE!
 

PC Application(s) for offered Hex code (for WINDOWS):
In order for the offered PC applications to work, it is necessary to download and install (one time only) VB6RunTimePlus2.2
Download the PC application, unpack, and start (allow windows to start applications - see HOW) enter the COM port number where the Arduino is connected and test it...

Download: PcApp1
Some features:
- PcApp makes a PcApp1Log folder (in application path) with stored measured values.
- Log files named in format (yy mm dd - Year Month Day).
- This data later can be analyzed from some other software to create graphs (eg Excel)
- Log File format - comma delimited
- DATA in Log FILE(S): 1=TIME 2=TEMPERATURE 3=SV01 4=SV02