Skip to content
Shao-Qian Mah edited this page Dec 9, 2016 · 8 revisions

The main steps to set up the Arduino related parts are as of below:

Setting up the software

Setting up the Arduino IDE

  1. Download the Arduino IDE here: https://www.arduino.cc/en/Main/Software
  2. If using a Mac, install the driver here (Mac OS X 10.9+): http://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_3.dmg
  3. Restart your computer
  4. Install the Time, TimeAlarm and AltSoftSerial libraries using the Arduino IDE in Sketch > Include Library > Manage Libraries and download the necessary libraries

Setting up the HM-10 Bluetooth Module

Download the repository as a zip here: https://github.com/Hydropal/Hydropal-Arduino/archive/master.zip

  1. Solder the HM-10 module to the Arduino Pro Mini according to the circuitry diagram below
  2. Using the FTDI adapter connect the computer to the Arduino Pro Mini
  3. Use the file at Bluetooth module setup > _9600_baud > _9600_baud.ino and upload the file to the Arduino and make sure the correct port and Arduino model is selected. Open the serial monitor (top right) make sure baud rate is 9600 and the NL & CR option is selected
  4. In the serial type AT and wait for the OK response
  5. In the serial type AT+NAMEHydropalXXXX, with XXXX being the 4 digit serial number (name is max eight characters)
  6. In the serial type AT+BAUD4, which will set the baud rate to 115200
  7. If serial messages fail to send or software is unable to upload, make sure the FTDI adapter's contacts are in good contact with the Arduino Pro Mini
  8. Close the programme and open the file at Bluetooth module setup > _115200_baud > _115200_baud.ino and upload to the board. Make sure in the serial monitor baud rate is set to 115200 and the option NL & CR is selected
  9. In the serial monitor type AT and wait for the OK response, if the module responds with OK, the module is set up

Final setup

  1. Open the file at Hydropal > Hydropal.ino
  2. Upload it to the Arduino Pro Mini
  3. Set some dummy values in the waterConsumption array, to see if the correct values are synced over to the mobile device
  4. ???
  5. Profit

Circuitry

To reduce power usage, follow the procedure to disallow the LED from receiving current and to remove the voltage regulator here: http://www.home-automation-community.com/arduino-low-power-how-to-run-atmega328p-for-a-year-on-coin-cell-battery/

WIP: Power to Arduino must go to GND and VCC (ACC), not on the programming horizontal at the back.

Clone this wiki locally