Botroniks Arduino codes for everyone = PCC1021A: Programable thermostat (DS18B20) with two temperature thresholds (Hi & Lo) and 2 outputs - FreeHex!

BotronikS - Final code for all types of Arduino and PC users: -- HOME -- CONTACT


- DS18B20: 1 - 2 - 3
- RelayModule 2way:
misc: Wires: (link) 1--2--3
connections (click to enlarge)
- Need additional accessories:

PCC1021A: Programable thermostat (DS18B20) with two temperature thresholds (Hi & Lo) and 2 outputs - FreeHex!
The offered code enables: Control of outputs state depends of settings and measured values...
Required accessories: see above
For Arduino boards: NANO or UNO or MEGA
Arduino pins are used:
uc ATmega328p (NANO, UNO, ...): D4-D5=Output1-Output2(5V=ON) D12=DS18B20
uc AtMega2560 (MEGA,.............): D4-D5=Output1-Output2(5V=ON) D12=DS18B20
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).
Output 1 operation code: if PV01>SV01 then OUT1=OFF - if PV01<SV02 then OUT1=ON
Output 2 operation code: inverted of OUT1
The setpoints remain stored (eeprom) even after a power failure!
On outputs can connect some other type of 5V Loads up to 20 mA (for each output) like SSR's: Link1--Link2
Some notes:
When using it for the first time, it is good to do a Default Reset (see below)
Download the FreeHEX codes below, unpack and upload to the proper Arduino board (Use a free net tool for example XLoader)
1. uc ATmega328-16MHz-5V (NANO,UNO...) - PCC1021A-M328
2. uc AtMega2560 (Mega(ATMEGA2560).....) - PCC1021A-M2560
You can test the uploaded code using some free serial communication software such as Termite
AT command (ASCII characters) - 9600 Baud ,8 Data bits,None Parity,1 Stop Bit - AT commands must be uppercase letters!
AT - attention command (returns OK)
AT+INF - software code info (returns ucAppName)
AT+PV? = Returns proces values PVxx (PV01=Temperature(C)) (in one decimal digit form) PV02=Out1-state PV03=Out2-state (1=ON)
AT+SV? - Returns set values SVxx (SV01=X SV02=X see below)
Set-Preset commands: Some or all commands use internal Uc EEPROM for memorized when power loss!
AT+SV01=X - X=Set Lower threshold (Lo) (one decimal digit form - range: -50.0 to 120.0C (example: AT+SV01=-12.3)
AT+SV02=X - X=Set Upper threshold (Hi) (one decimal digit form)- range: -50.0 to 120.0C (example: AT+SV02=45.6)
AT+DRESET - Default Reset ( SV01=22.1 SV02=33.2)
ArduinoIDE source code (avaliable): see ProjCode

PC Application(s):
PC Application(s) (for WINDOWS): In order for the offered PC applications to work, it is necessary to download and install (only first time): 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 use that.
PcApp: PCC1021A-PcApp1try - Time limited version (2h - then need restart) for try! For no-limit version see ProjCode !
Botroniks Arduino Hex Code
The pictures are orientational.

Project codes: Do some donation (HOME) and copy bottom line in Your Email to us. After successful donation You will receive ProjCode on your email soon as possible.
Need of project code: ProjCode-PCC1021A
The content of ProjCode:
1. Project: ArduinoIDE source code
2. Project: PcApp(s) no limit version (in zipped exe version)