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


- DHT22: 1 - 2 - 3
- or AM2302: 1 - 2 - 3
- or AM2305: 1 - 2 - 3
- Relay module: 1 - 2 - 3
misc: Wires: (link) 1--2--3
connections (click to enlarge)
- Need additional accessories:

Time-Limited trial versions (hex & exe) code. Ask for prices for no-limit versions!

PCHP101: Programmable Temperature & Humidity regulator (sensor DHT22) with two temperature and humidity thresholds (Hi & Lo) and 4 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:
Out1 operation code (temperature): If PV01(temp.) is under SV01(Lo) then Out1=ON. If PV01(temp.) is over SV02(Hi) then Out1=OFF (eg. heating)
Out2 operation code: inverted code function of Out1 (eg. cooling)
Out3 operation code (humidity): If PV04(hum.) is under SV03(Lo) then Out3=ON. If PV4(hum.) is over SV04(Hi) then Out3=OFF (eg. moistening)
Out4 operation code: inverted code function of Out3 (eg. drying )
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..): PCHP101try-m328 - Time-Limited trial version (12 hours) then need restart!
2. uc AtMega2560 (Mega(ATMEGA2560)......): PCHP101try-M2560 - Time-Limited trial version (12 hours) then need restart!
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-04 see below)
Set-Preset commands: Some or all commands use internal Uc EEPROM for memorization when power loss!
SV01=x - x=Set Lower threshold1 (TempLo) (one decimal digit form - range: -40.0 to 80.0C (example: SV01=-12.3)
SV02=x - x=Set Upper threshold1 (TempHi) (one decimal digit form)- range: -40.0 to 80.0C (example: SV02=45.6)
SV03=x - x=Set Lower threshold2 (HumLo) (one decimal digit form - range: 0 to 100.0 (example: SV03=61.2)
SV04=x - x=Set Upper threshold2 (HumHi) (one decimal digit form - range: 0 to 100.0 (example: SV04=80.9)

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: PcApp1try - Time-Limited trial version (12 hours) then need restart!
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=Temp. 3=SV01 4=SV02 5=Hum. 6=SV03 7=SV04