River Level Monitoring System - RiverSpy2 #2

How to get started
As you can see from the picture at part #1, the original system was prototyped using veroboard. If you are not familiar with electronics, you will find it easier to build using a printed circuit board (pcb). The layout files are given below. You can order from within the expresspcb program. The MiniBoard service at expresspcb costs US$83 for 3 boards, including a courier service to Ireland. You only need one pcb per gauge but it is not possible to order just one pcb. (If you have a spare pcb, please send it to Daithi Power, Electrical Engineering Dept, University College Cork, Ireland) Alternatively, if you have pcb making facilities of your own, use the express pcb software to print overlays and make a pcb yourself. The right hand side of the pcb snaps off to make the sensor board. The larger left side is used to make the controller board. The controller board measures 3" by 2.5". The sensor part is 0.8" by 2.5".


To assemble and test the circuit, you will need the following tools

* Soldering iron, solder and a small wet sponge to clean the iron
* A small pliers and a snips
* Multimeter for measuring voltages and testing connections

Electrical schematic is here

Bill of materials is here

PCB silkscreen is here

PCB layout is here View and order PCBs using the free software at www.expresspcb.com Three mini-boards cost $51 + shipping.

Assembly drawing of the layout











Sensor

Start with the pressure sensor end. Its the section in the dashed box on the first page of the schematic. Pictures of the construction are shown here. You will need a soldering iron, fine solder, a piece of vero board, a snips and a volt meter. Order the pressure sensor (26PCBFA6D), the INA122, and a small aluminium box from farnell. You will also need a 4m length of 1/4" plastic tubing and a long length of 3 core cable. The length of cable depends on the distance from the sensor to the solar panel at the river bank. Measure the distance with a throw-bag rope and add a few metres. I used shielded cable but ordanary house wiring cable should do fine. Solder the circuit together, power it with a 9V or 12V battery and measure the output using a volt meter. It should read about 0.1V normally and increase when you suck on the tube. If all is ok, put it in the box. You will have to drill holes in the box for the tube and cable. Use a separator to create a cavity for the open end of the sensor as shown in the pictures. Test the circuit again and then fill it with epoxy. Make sure nothing is shorted to the side and that epoxy doesn't get into the open end of the sensor. Test it again while the epoxy is wet by connecting a battery to the far end of the cable. If something has shorted, you will still have a chance to move things around. If all is ok, stick on the lid and let it dry. After it has cured, drop it in a barrel of water and power up the far side of the cable with your battery. If the signal voltage reads somewhere around 1.5V per metre of water, pat yourself on the back.

Before I potted the sensor with epoxy, I screwed the box to one end of a 0.5m length of stainless steel. At the other end of the steel, I drilled some 10m holes to allow me to bolt the sensor to the side of an existing stick gauge at the river bank. The distance between the sensor and 10mm holes allowed the sensor to be mounted under the water without having to drill any holes under water. The system should be installed while the river is at a very low level to ensure the sensor always stays under water.

Pictures of sensor construction
Datasheets for the components can be found at Honeywell , Texas Instruments and Farnell

Controller
Order the controller components and solder them in. The PIC, PT6102 and the INA122 can be obtained as free samples. Look at the Bill of Materials to get order numbers for the rest of the components. Use an ic socket to mount the PIC. The Batt and Phone connectors have extra holes to either use terminal blocks or "Molex" connectors. I find Molex very convenient but if you don't have a crimping tool, go for the terminal blocks. Once assembled you will need access to a PIC programmer such as the ICD2. If you have no way of prorgamming it, send me a PIC and I'll program it for you. Program the PIC using the hex file below and the MPLAB softwar e that you can download from Microchip. During programming, the ICD2 needs to be connected to, and configured to use, an external 9V supply. If you're stuck, send me a PIC and I'll program it for you. Next power up the system using a 12V supply or a battery. The LED should toggle on and off every second.

Hex file for programming PIC is here

Phone

So far, I have built systems using the Siemens M35 and the C45. Any old Siemens phone should do but the connectors on the later ones have gotten smaller so it won't be as easy to solder on the wires. The battery is removed from the phone and it is powered directly by the controller. The AT language used to talk to the internal modem is much the same for all Siemens phones. I have put some pictures of wiring an M35 here . The wire needs to be very fine. I used "wire-wrap" wire. It helps to put some solder on the wire before soldering to the phone. In the pictures shown, the red and black wires are soldered directly to the phone pcb. It is also possible (and easier) to solder them to the contacts that would normally press against the battery. Siemens also make a range of GSM modems such as the TC35. These are made for telemetry applications and would be easy to wire up but would cost you a lot more that an old phone.

Phone connector pin-out here

Pictures of phone wiring here

Installation
A picture of an early RiverSpy rev 2.0 controller is shown below. The latest version is a bit larger and uses through hold components instead of surface mount to make it easier for an inexperienced person to assemble. I'll put up some pictures of the latest rev later.
  1. Terminal block for solar panel or external 12V supply
  2. Molex connector for battery (paralleled with connector 1)
  3. Debugging interface can be used to monitor phone communications using a pc serial port
  4. ICD2 interface for programming the PIC
  5. Molex connector to mobile phone
  6. Molex connector to underwater sensor

The controller, battery and phone should be mounted in a waterproof box. A plastic box allows optimum phone coverage but if vandalism concerns require the use of a metal box, then an external antenna for the phone may be required. A frame should be contructed to mount the solar panel and the box. To optimise solar energy in winter, the solar panel must face south, have a clear view of the sky and be inclined at 70 degrees to the horizontal. Once all of the components have been connected together, configure it as per the installation manual given below.
Send me an email if you need some help.

Installation manual is here

Debugging

I have also put up a schematic of a small circuit that I use for debugging here. All it does is convert a 5V-0V signal to a +12V-12V signal suitable for connecting to the serial port of a pc or laptop. It listens in on the communications between the control board and the phone. I normally connect it to the RX (receive) line of the PIC. RX and GND are at pins 5 and 6 of the connector J4. RX carries the data going from the phone to the PIC. The phone should echo the characters sent from the PIC to the phone so you should see both sides of the conversation. If this is not working, it can also be connected to the TX (transmit) line but this only shows the characters sent by the PIC. The characters can be displayed on the pc using hyperterminal set at COM1, 9600,N,8,1, no flow control. A similar circuit is included in a siemens pc data cable so if you have one of those, just disassemble the connector at the phone end and use that instead. The pinout of the phone connector is given here. Do not connect the TX of the data cable (pin6, RX of the phone) to the phone at the same time as connecting the TX from the PIC. (its like two people trying to talk using walkie talkies at the same time) Also note that pin 3 (Power) and pin 4 (Fbatt+) shown in the phone connector pinout are not the same as the positive terminal of the phone battery (BATT+).

Contacts
If you have questions, contact Daithí Power, visit page

0 Comments: