Project tutorial
Helium Solar Monitoring Board with Relays

Helium Solar Monitoring Board with Relays © CC BY-NC-SA

Arduino with a Helium Monitoring Shield that can monitor motion, temperature, solar power (including volts up to 30VDC and 10A).

  • 3,877 views
  • 2 comments
  • 18 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
Solder Braid
09507 01
Soldering iron (generic)

Apps and online services

About this project

With the Internet of Things, there are many opportunities to play with new technologies and come up with innovative devices that compliment the new technologies. This is one of them.

There are six components to this project:

  • Board Design and Production
  • Final Board Design and Soldering Tips
  • Arduino Programming and Testing
  • Setting Up the Node-Red Dashboard
  • Wiring Up the Solar Panels and Batteries (if required)
  • Wiring Up the Relays
  • 3D Print a box for Your Setup

Board Design and Production

The images below are of the Arduino shield. The first image is of the original one that is shown in the photos. The second one is a revamped design. I've added a higher amperage and higher voltage regulator. The first voltage regulator is good for 300mA maximum 18 volts DC and the second is good for 1.5 Amps and 30VDC which is more in line with powering off of a larger 24 volt solar array.

I also moved the screw connectors forward and gave myself more space as it was tight fitting the relay screw connectors into their place. I also thickened up the relay PCB connections to take up to 5 amps comfortably.

Final Board Design and Soldering Tips

The final design not only powers the unit, it is also monitoring its own power input. I had the boards produced by PCBway. Sign up at PCBway.com and do a quick quote. Upload the Gerber File and 7 days later you will have 5 boards to play with.

Tip #1 when soldering the SMD parts ..Solder your SMD parts First

* when using solder as opposed to solder paste solder 1 pad place your part heat the solder and let cool before moving your tweezers

* when cooled solder the other side optimum temp for this process is 300 degrees

Tip#2 Buy some low temp solder paste for the power chip and deposit 2 thin lines across the pads . *See pictures put the Board in a small oven at 350 degrees until you see the paste turn to solder ..Remove and check board before it cools. Keep an eye on the process

Make sure you trim all the inner pins down a bit so they don’t contact the helium boards.

Arduino Programming and Testing

Setting Up the Node-Red Dashboard

THE NODE RED SETUP ON THE RASPBERRY PI

OUTPUT FROM MY POWER SUPPLY

As you can see from the above picture and below picture the output is really close to real world values.

3D Printed Box

I had to learn how to draw with Fusion360 before I drew out this box ..There are really good tutorials on how to get started with this program. It is free to use if you are a "Student".. The box isn't tested yet as soon as my 3D printer comes in, I will print and test it and post the final design files for use in your project.

Wiring Up the Solar Panels and Batteries (if required)

I soldered the Jumper wire and the Battery hook up wire to make it more permanent and trouble free.

Bill of Materials: arduino_shield

Assembly List

1 Screw terminal - 2 pins pins 2; hole size 1.0mm,0.508mm; package THT; pin spacing 0.1in (2.54mm)

1 Camdenboss CTB0158-2 pins 2; hole size 2.7mm; package THT; pin spacing 0.2in (5.08mm); variant 90° 2 connector; part # CTB0158-2

1 0KΩ Resistor package 2010 [SMD]; tolerance ±5%; resistance 10KΩ

1 Ceramic Capacitor package 0805 [SMD, multilayer]; capacitance .1uF; voltage 6.3V

1 10kΩ Resistor package 0805 [SMD]; tolerance ±5%; resistance 10kΩ

2 Electrolytic Capacitor package 100 mil [THT, electrolytic]; capacitance 10µF; voltage 50.3

2 270Ω Resistor package 0805 [SMD]; tolerance ±5%; resistance 270Ω

1 V_REG_LD1117VXX package 78xxl; voltage 5V; chip LD1117VXX

Note :Not all Voltage regulators are equal use this one...

IC REG linear 5Volt 1.5 Amp TO220-3 Digi key number 295-13996-5-ND

1 Generic female header - 5 pins pins 5; form ♀ (female); hole size 1.0mm,0.508mm; row single; package THT; pin spacing 0.1in (2.54mm)

1 Rectifier Diode type Rectifier; package 300 mil [THT]; part # 1N4001

1 DS18B20 1-Wire Temperature Sensor part # DS18B20

2 Generic female header - 8 pins pins 8; form ♀ (female); hole size 1.0mm,0.508mm; row single; package THT; pin spacing 0.1in (2.54mm)

1 Generic female header - 10 pins pins 10; form ♀ (female); hole size 1.0mm,0.508mm; row single; package THT; pin spacing 0.1in (2.54mm)

1 Generic female header - 6 pins pins 6; form ♀ (female); hole size 1.0mm,0.508mm; row single; package THT; pin spacing 0.1in (2.54mm)

1 Camdenboss CTB0158-6 pins 6; hole size 2.7mm; package THT; pin spacing 0.2in (5.08mm); variant 90° 6 connector; part # CTB0158-6

1 LTC2945 technology 400mA Step-Up DC/DC ; package msop-12; variant variant 1; chip LTC2945

6 Pad layer copper1

2 RELAY package relay-jzc; variant pth4

1 Generic double row female header - 6 pins pins 6; form ♀ (female); hole size 1.0mm,0.508mm; row double; package THT; pin spacing 0.1in (2.54mm)

1 DIP SWITCH package dipswitch-02; channels 1

Code

Arduino Code C/C++
Copy and paste it into your own sketch ..Install necessary Gihub files enjoy
#include "Arduino.h"
#include "Board.h"
#include "Helium.h"
#include "HeliumUtil.h"
//======================
#include <OneWire.h>
#include "I2Cdev.h"//(MPU6050)
#include "MPU6050_6Axis_MotionApps20.h"
#include <DS18B20.h>//(Temperature Sensor)
#include<stdio.h>
#define BUFSIZE 9
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include "Wire.h"
#endif
//=======================
#define LTCADDR B1101111//Table 1 both LOW (7bit address)
byte ADCvinMSB, ADCvinLSB, curSenseMSB, curSenseLSB, AinVMSB, AinVLSB;
unsigned int ADCvin, ADCcur, AinV;
float inputVoltage, ADCvoltage, current10, current1, current0p1, current0p01;
#define Relay1 5
#define Relay2 6
DS18B20 ds(7);
uint8_t address[] = {40, 250, 31, 218, 4, 0, 0, 52};
uint8_t selected;
MPU6050 accelgyro;

int reading1;
int16_t ax, ay, az;
int16_t gx, gy, gz;
#define OUTPUT_READABLE_ACCELGYRO
#define LED_PIN 13
bool blinkState = false;

//====================
#define CHANNEL_NAME "Helium MQTT"
Helium  helium(&atom_serial);
Channel channel(&helium);

void
setup()
{
  Serial.begin(9600);
  DBG_PRINTLN(F("Starting"));
  helium.begin(HELIUM_BAUD_RATE);
  helium_connect(&helium);
  channel_create(&channel, CHANNEL_NAME);
  Wire.begin();
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
  Wire.begin();
#elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE
  Fastwire::setup(400, true);
#endif
  Serial.println("Initializing I2C devices...");
  accelgyro.initialize();
  // verify connection
  Serial.println("Testing device connections...");
  Serial.println(accelgyro.testConnection() ? "MPU6050 connection successful" : "MPU6050 connection failed");
  //==================
  Serial.print("Devices: ");
  Serial.println(ds.getNumberOfDevices());
  Serial.println();
  //=================
  // configure Arduino LED pin for output
  pinMode(LED_PIN, OUTPUT);
  pinMode (Relay1, OUTPUT);
  pinMode (Relay2, OUTPUT);
  digitalWrite(LED_PIN, HIGH);
  //==========================

}

void
loop()
{
  const char data[HELIUM_MAX_DATA_SIZE];
  char message[56];
  char msg[56];
  int sensorValue;
  int    status;
  int8_t result;
  int v = (inputVoltage);
  int c = (current0p01);
  int t = (ds.getTempC());
  int m1 = (ax);
  int m2 = (ay);
  int m3 = (az);

  Wire.beginTransmission(LTCADDR);//first get Input Voltage - 80V max
  Wire.write(0x1E);
  Wire.endTransmission(false);
  Wire.requestFrom(LTCADDR, 2, true);
  delay(1);
  ADCvinMSB = Wire.read();
  ADCvinLSB = Wire.read();
  ADCvin = ((unsigned int)(ADCvinMSB) << 4) + ((ADCvinLSB >> 4) & 0x0F);//formats into 12bit integer
  inputVoltage = ADCvin * 0.025; //25mV resolution
  Wire.beginTransmission(LTCADDR);//get ADC Input 2V max
  Wire.write(0x28);
  Wire.endTransmission(false);
  Wire.requestFrom(LTCADDR, 2, true);
  delay(1);
  AinVMSB = Wire.read();
  AinVLSB = Wire.read();
  AinV = ((unsigned int)(AinVMSB) << 4) + ((AinVLSB >> 4) & 0x0F);//12 bit format
  ADCvoltage = AinV * 0.5E-3; //500uV resolution
  Wire.beginTransmission(LTCADDR);//get sense current
  Wire.write(0x14);
  Wire.endTransmission(false);
  Wire.requestFrom(LTCADDR, 2, true);
  delay(1);
  curSenseMSB = Wire.read();
  curSenseLSB = Wire.read();
  ADCcur = ((unsigned int)(curSenseMSB) << 4) + ((curSenseLSB >> 4) & 0x0F);//12 bit format
  current0p1 = ADCcur * (25E-3) / 0.1; //1A max, unit is mA
  Serial.print("Volts_");
  Serial.println(inputVoltage);
  Serial.print("Amps_");
  Serial.println(current0p01, 2);
  delay(1000);
  //======================================
  accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
#ifdef OUTPUT_READABLE_ACCELGYRO
  // display tab-separated accel/gyro x/y/z values
  //  Serial.print("a/g:\t");
  Serial.print(ax); Serial.print("\t");
  Serial.print(ay); Serial.print("\t");
  Serial.println(az); Serial.print("\t");

#endif
  delay(5000);
  //==========================================
  while (ds.selectNext())
  {
    switch (ds.getFamilyCode())
      // Print address.
      uint8_t address[8];
    ds.getAddress(address);
    for (uint8_t i = 0; i < 8; i++)
      (ds.getResolution());
    Serial.print(ds.getTempC());
    Serial.print(" C / ");
    Serial.print(ds.getTempF());
    Serial.println(" F");
    sensorValue = ds.getTempC();

    //==================
    snprintf(data, 75, "V %d:A %d:T %d:X %d:Y %d:Z %d",v,c,t,m1,m2,m3);//NOTE: The values V,A,T,X,Y,Z are needed for the next step
    channel_send(&channel, CHANNEL_NAME, data, strlen(data));
    delay(5000);

    reading1 = (ds.getTempC());
  }
  if ( reading1 <= "25") {
  digitalWrite(Relay1, LOW);
    Serial.println("FAN_ON");
  }
  else {
    digitalWrite(Relay1, HIGH);
    Serial.println("FAN_Off");
    delay(1);// delay in between reads for stability
  }
  //===========================================================
}

Custom parts and enclosures

3D Printed Bottom
3D Printed Top

Schematics

Arduino Fritzing File
Install fritzing program from fritzing.org ..Download and open
arduino_shield_E52MURjIkY.fzz
LTC2945 Spec Sheet
Specification sheet for Power sensor
Adruino Etchable PDF
Print out at 100% to chech for size & Placement
arduino_pdf_lM7kiaIIsv.zip
Arduino Gerber file for production
go to PCBway.com and do an instant quote for 5 units upload gerber file ..$1.00 per board plus shipping
arduino_gerber_Pw74UIEfV7.zip
Bill Of Materials
List of Parts and pieces to make your own shield ..I will also share a mouser.com Shopping list to get everything you need
arduino_shield_bom_xHA42FPFQT.html
Arduino Fritizing file
arduino_shield_may14_ChphdjhbVM.fzz
Arduino Gerber File
Uploadable to PCBway.com for making your own board
arduino_gerber_XddiV09BTi.zip

Comments

Similar projects you might like

Integrated Solar ChargeController, Inverter, PowerBank, Lamp

Project tutorial by Shahariar

  • 12,053 views
  • 26 comments
  • 42 respects

SensorTile Home/Apartment Monitoring Board

Project in progress by Jade Perreault

  • 1,900 views
  • 0 comments
  • 3 respects

The "SAM" SMART Automation & Monitoring Project

Project tutorial by Jade Perreault

  • 1,167 views
  • 0 comments
  • 8 respects

Heart Rate Monitoring System

Project tutorial by Team HRMS

  • 21,734 views
  • 9 comments
  • 37 respects

Dual Axis Solar Tracker Panel with Auto and Manual Mode

Project tutorial by Giannis Arvanitakis

  • 17,997 views
  • 11 comments
  • 63 respects

Windows 10 IoT Plant Monitoring System

Project tutorial by Team BME-AUT

  • 16,366 views
  • 5 comments
  • 65 respects
Add projectSign up / Login