Soldering the Extra Components

Soldering was by far the most difficult part of this project, so I am going to try to give you as detailed a plan as possible so that you can avoid making the same mistakes that I made. First of all, if you are new to soldering, like I was, try watching some videos on youtube of soldering components together as well as videos on how to maintain your soldering iron, it will save you hours of frustration.

The parts that we soldered onto the proto-board were a double coil latching relay (NEC,) a PNP transistor (2n 2907,) a real time clock (RTC,) two 10k ohm resistors, the Atlas Conductivity sensor connector, the Atlas Conductivity sensor microprocessor, and wires to connect it all together. I will include a picture of the drawing I used as a guide for soldering these parts all together, I found through this project that planning out and thinking ahead about the order in which to solder items to the proto-board saved hours of desoldering later.

Here is a rough sketch of Wiring the Proto Board.

Rough Sketch of Wiring Proto-board

Image 1

The first section of the circuit that I decided to solder on was the power management section, which were made up of the latching relay, the pnp transistor, and the RTC. These components together control when the rest of the circuit, the GSM shield and Arduino Mega (the parts that consume the most power,) are on or off. To give you a basic idea of how they work together, the RTC triggers an alarm at a certain time, which enables the interrupt pin, this pin can only allow a small amount of current to flow through it, so I attached it to the base of a PNP transistor, which acts as an amplifier and allows enough current to flow through it to flip the latching relay and give power to the rest of the circuit.

20130809_161524

Image 2

I started by soldering on the relay onto the top left corner of the proto-board (the orange rectangle in the bottom left of the above image.) I soldered pin 5 on the relay (the ground pin) to the emitter of the PNP transistor. I soldered the 9.6v batteries power wire to go directly to pin 1 on the relay (the power pin) and also to pin 2 on the relay. Pin 3 on the relay I connected to vin on the proto-board. When the the alarm is triggered and the relay switches, a connection will be made between pin 2 and pin 3 which will power the Arduino Mega. Pin 6 goes to ground on the proto-board and pin 10 goes to pin d6 on the proto-board. Pin d6 can be turned ‘HIGH’ or ‘LOW’ from the Arduino Mega and we will use it to turn power to the Arduino off by switching the relay which disconnects pin 2 from pin 3 on the relay.

I soldered the transistor right next to the latching relay and the RTC. The other connections on the transistor are the ‘collector’ going to ground on the proto-board and the base going to the interrupt pin on the RTC. The rest of the connections on the RTC are the ‘GND’ pin going to ground on the proto-board, power from a 3 volt battery pack going to the ‘VCC’ pin and ground from the 3 volt battery pack going to the ‘GND’ pin.  Also, ‘SDA’ and ‘SCL’ go to pins 20 and 21 on the proto-board. These last two pins allow communication between the Arduino and the RTC using the wire library, so that we can get the date and time from the RTC as well as set the alarm.

Next I soldered one of the 10k ohm resistors onto the proto-board. Solder ground to one side of the resistor and a 10k ohm thermistor on the other side. Solder a connection from 5v on the proto-board to the other side of the thermistor. Solder a wire going in between the thermistor and the resistor to measure the voltage here and send it to pin A1 on the proto-board (I used this pin for the thermistor that is submerged in the water.) Do this exact same setup for the second thermistor except connect the wire to pin A2 on the protoboard ( I used this pin for the thermistor inside the pvc pipe.) This is a voltage divider, at room temperature the thermistor is 10,000 ohms and the voltage is split evenly between the resistor and thermistor, and the pin between the two reads 2.5 volts. However as temperature varies so does the resistance of the thermistor and the proportion of the voltage across it. So the voltage read by pin A2 now varies with temperature and allows us to calculate the temperature based on the change in voltage which is read by the analog digital convertor on the Arduino.

The final component we have to solder on is the Atlas Conductivity sensor. I solder this on exactly as in this diagram https://www.atlas-scientific.com/_files/instructions/ec_Wiringdiagram.pdf. Tx and Rx on the conductivity circuit I connected to pins 19 and 18 respectively (Serial 1.) The white plastic section that is in between the sensor and the Atlas Scientific Conductivity Microprocessor will have to be ground down on one edge ( the bottom edge in image 2) to fit inside of the PVC pipe.

To get the sd shield to work on the Arduino Mega instead of the Arduino Uno I soldered the proto-boards pins together, so that pin 53 was connected to pin 8, 51 to 11, 50 to 12, and 52 to 13.

To get the GSM shield hooked up I had to jumper pins 2 and 10 together on the gsm shield as seen here http://arduino.cc/en/Guide/GSMShieldLeonardoMega. Also I connected GND, 3.3v, 5v, pin 3, pin 7, and pin 10 from the proto-board to their respective pins on the GSM shield using jumper wires. All of these pins are necessary for the GSM shield to function properly. I didn’t just stack the shields because we did not have space in the PVC tube, so it had to go above it in the tube.

20130809_161542 Image 3

Finally after soldering all of those components on, I began soldering the header pins on. I soldered header pins on everywhere but A8-A15 and pins 22-37, since these are unused by my code.

By the end of this part of the project I realized that a printed circuit board with places for each of these components would have probably been the easier way to go and I will probably be making one in the future so keep checking back for when I post it to the blog.

Pertinent Datasheets:

Relay – http://www.nec-tokin.com/english/product/pdf_dl/mini_data/relay_ea2_eb2_e.pdf

PNP transistor - http://en.wikipedia.org/wiki/Bipolar_junction_transistor

RTC - http://www.wvshare.com/product/PCF8563-RTC-Board.htm