...
Reads temperature and relative humidity from two locations on the rack (DS22 sensors)
Provides 6 potentiometers - one for each bank - acting as dimmer controllers
Includes a display showing temperatures, humidity, lux and light percentages for each bank
AC voltage and amperage
Main power switch to PS’s
Air conditioning thermostat control
Records cumulative times for bottle exposure and lumens
...
The rack controller is based on a Arduino UNO configuration like this:
...
To do this, we use an Arduino UNO as a programmer, and the Nano as the target:
Then connect the working Arduino UNO to the computer vía USB
...
We connect six 10K potentiometers, to control the 6 different lighting configurations.
These are 10K linear slide pots from Bourns (PTF60-TS05-103A2) that were previously used in a mixing console at Zentraus in Barcelona.
...
If rotary pots are used, as seen from behind the pot, the left pin connects to 5V, and the right pin to ground.
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
...
We are using a DHT22 temperature and humidity sensor. The sensor has 4 pins, but only pins 1,2, and 4 (left to right) are used.
Pin | Connection on Arduino |
1 | 5V |
2 | 2 |
3 | - |
4 | GND |
...
These are the pinouts on the ESP8266 module:
We are going to use the Arduino IDE to program the initial setup of the ESP8266. To do this, we need to first CAREFULLY remove the MCU from the Arduino UNO.
The connection for the initial programming between the arduino UNO and the ESP8266 are:
...
Although you can power the ESP8266 from the Arduino 3v3 connector, it is recommended that you use an external power source like this:
From the Arduino IDE serial monitor, we can issue AT commands to setup the wifi configuration (and change the serial speed to 9600 baud = AT+UART_DEF=9600,8,1,0,0)
...
After the initial programming of the ESP8266 module, we can replace the Arduino MCU and rewire the Arduino and ESP8266 such that Arduino TX goes to ESP8266 RX, and RX to TX (crossed). Because the Arduino Nano needs to communicate over a serial connection to the ESP8266, and because we want to keep our ability to use a serial monitor and data upload over USB (mostly for testing and updates), we use SoftwareSerial on pins 18,19 (A4 and A5), leaving TX and RX free.
ESP8266 Pinounts
ESP8266 | Arduino | Color |
TX | A4 | Green |
CH_PD | 3.3V (External) | Red |
RST | . | |
3.3VCC | 3.3V (External) | Orange |
GND | GND | Yellow |
GPIO2 | - | |
GPIO0 | - | |
RX | A5 | Blue |
The ESP8266 is a 3.3V device. Although CH_PD and VCC can be connected to the 3.3V rail of an external power supply (the Nano 3.3V supply is insufficient for operations), we still need to setup a voltage divider to reduce the 5V transmit voltage on the Nano (A5) to 3.3V receive voltage (RX) on the ESP8266.
Here is a good tutorial on the voltage divider: https://arduino.stackexchange.com/questions/38255/how-to-select-which-resistor-is-required-for-my-curcuit-to-reduce-voltage
From then on, we can program the ESP8266 from the Arduino:
...