Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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:

Image RemovedImage Added

Then connect the working Arduino UNO to the computer vía USB

...

We connect six 10K potentiometers, to control the 6 different lighting configurations.

Image RemovedImage Added

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.

Image RemovedImage Added

// 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. 

Image RemovedImage Added

Pin

Connection on Arduino

1

5V

2

2

3

-

4

GND

...

These are the pinouts on the ESP8266 module:

Image RemovedImage Added

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.

Image RemovedImage Added

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:

Image RemovedImage Added

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

Image RemovedImage Added

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.

Image RemovedImage Added

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

Image RemovedImage Added

From then on, we can program the ESP8266 from the Arduino:

...