Informer and server fan control

This device was developed for:
1. Monitoring temperature in outdoor, server room, garage, etc.
2. Controlling fans of server.
3. Showing information about date and time, usage CPU and RAM, internet traffic, date and time on 20x4 LCD.

1. Circuit design.
1.1. Arduino — the brain of this device.



1.2. LCD with LED control.


2. Programming.
The main program I wrote on Python. For communicate this program with Arduino I using Nanpy library.

2.1. Firmware for Arduino.
2.1.1. Clone repository and configure.
git clone https://github.com/nanpy/nanpy-firmware.git
cd nanpy-firmware && ./configure.sh

2.1.2. Use Nanpy/cfg.h generated file to configure your Nanpy firmware, selecting the features you want to include and the baud rate.
#pragma once

#define BAUDRATE 115200

#define USE_Servo                                   1
#define USE_Tone                                    1
#define USE_LiquidCrystal                           1
#define USE_Stepper                                 1
#define USE_EEPROM                                  1
#define USE_RAM                                     1
#define USE_Define                                  1
#define USE_ArduinoCore                             1
#define USE_Watchdog                                1
#define USE_Register                                1
#define USE_Info                                    1
#define USE_Counter                                 0
#define USE_Wire                                    1

// external libraries should be installed for the following features:
#define USE_OneWire                                 0
#define USE_DallasTemperature                       1
#define USE_CapacitiveSensor                        0
#define USE_DHT                                     1

// https://bitbucket.org/fmalpartida/new-liquidcrystal
#define USE_LiquidCrystal_I2C                       0

2.1.3. Upload firmware.
Copy Nanpy directory under your «sketchbook» directory, start your Arduino IDE, open Sketchbook/Nanpy, select "Upload".

2.2. Install python libraries on PC (CentOS 6)
yum install python-setuptools git python-devel MySQL-python
cd /opt/ && git clone https://github.com/nanpy/nanpy.git
cd nanpy && python setup.py install && cd ../ && rm -rf nanpy
easy_install psutil Flask

2.3. Python script
Latest light version of script you can load from here.
Latest full version of script you can load from here.
2.4. 50pin socket on the HDD pocket.

In full version added feature for monitoring PC resources and store data in DB.

Usage very simple, by GET requests, for examples:
1. Show FAN status: 192.168.1.1:5000/HDD_FAN1
2. Turn on FAN on 50%: 192.168.1.1:5000/HDD_FAN1/50
3. Turn on LCD display (full version): 192.168.1.1:5000/LCD/1


10(A1) — 1Wire
11(A2) — 1Wire
12(A3) — 1Wire
15(D11) — out on Fan6
16(D10) — out on Fan5
17(D9) — out on Fan4
18(D6) — out on Fan3
19(D5) — out on Fan2
20(D3) — out on Fan1
25(A0) — LCD(LED)
38 — USB DATA "-"
39 — USB DATA "+"
41-42 — DC "+" LCD and USB
43-44 — DC "-" LCD and USB
45(D13) — LCD14
46(D12) — LCD13
47(D8) — LCD12
48(D7) — LCD11
49(D4) — LCD6
50(D2) — LCD4

2.5. DB9 socket (out on LCD).

1 — DC "-"
2 — DC "+"
3 — 45(LCD14)
4 — 46(LCD13)
5 — 47(LCD12)
6 — 48(LCD11)
7 — 49(LCD6)
8 — 50(LCD4)
9 — 25(LCD(LED))

Files with schematics was drawn in sPlan 7.0: Informer.zip

3. Photos of the finished device
Control boards of this device I put in HDD pocket.





4. Troubles
If you have some problems with connecting Arduino to PC, maybe this help you: raspberrypi.stackexchange.com/questions/13455/how-to-force-rescan-of-usb-serial-devices
The workaround is to put «a solder bridge between pin 25 and pin 26» of the FTDI chip.

0 comments

Only registered users can comment.