Outdoor dust density sensor Prototype 1

Post date: Nov 10, 2015 5:2:37 AM

From my previous test i want to design an outdoor sensor module wirelessly connected to a receiver with an autonomous power supply provided by Nimh Cells and solar panel.

I 'm going to focus only on the outdoor sensor first , the receiver is going to be a computer running processing.

I made a mistake when i order the parts, i choose the 3DR telemetry kit and i thought i had ordered a simple RF transmitter and a receiver compatible 433MHz that i can use to decode the signal coming from my oregon scientific weather station as well but i didn't read enough the data sheet and i end up with a full RF serial link.

My original idea was to design a receiver able to decode the deata coming from the oregon scientific sensor and my dust sensor. Any way i keep it in mind for a future project.

The 3DR telemetry kit is too much for this project but it will offer me more possibility in term of remote control of the sensor.

For the power supply i have hacked solar panel form old Isun electronic solar charger, from the data i can gather on the net i found that this panels can provide the following current:

  • 2.2watt 145ma@15.2V or 290ma@7.6V

There is 2 panels that are plug either in series (15.2V) or in parallel (7.6V). I have to figure out if one panel 7.6V 145ma is going to be enough to charge 6x1.2V (7.2V) Nimh cells.

check my post in "basic electronic" chapter for detail about my Basic power supply for arduino with 6x1.2V Nimh Cell and solar 2.2W panel

3DR telemetry kit:

The 3DR telemtry is composed of one USB Master board and TTL Slave board.

The TTL slave board is connected to the arduino and the master board to the USB computer port.

3DR telemetry USB master and TTL Slave Board

The cabling and programming of the 3DR telemetry slave is straight forward.

  • 1 pin to Vcc

  • 1 pin to Rx

  • 1 pin to Tx

  • 1 pin to ground.

I don't want to use the pin 0 and 1 of the arduino uno for serial communication because i want to be able to upload program inside the arduino without having to unplugged anything.

Because the arduino uno have only one serial port available i 'm using the SoftwareSerial.h library to use a software serial port with the Rx on pin 10 and the Tx on pin 11 .

Doing that i can print simultaneously on 2 serial port:

The standard USB port of the arduino for debugging and the software serial link via the 3DR wireless serial link.

To setup the 3DR master and slave you must use the 3drradioconfig software on your Windows Pc with the USB 3DR radio slave plugged on your USB port.

check the 3drradioconfig.zip attached file bellow.

Just unzip it on any folder and run the 3DRRadio.exe program.

You must choose the correct port (port 47 in my case) and the correct baud rates (default is 57000) and click on "Load settings" button.

because it's not recommended to use the software serial library above 38400 bauds, i setup the link to 19200 bauds.

You just need to change the baud rate on Local version and Remote version.

Click on save settings button to save the setup on Master and slave.

Code to write and read trough the 3DR telemetry kit:

Components:

  • Resistor 1kΩ 1/4W x4

    • Resisitor 150 Ω1/4W x1

    • Capacitor 1ÎĽ F 25V x1

  • Capacitor 100 ÎĽ F 25V x1

  • Diode 1N4001 x1

  • Solar Panel from hackd Isun solar charge x2

  • AA x 6 battery holder x1

  • battery nimh 2200mah x6

  • Arduino uno R3 x1

  • 3DR telemetry master and slave X1

    • Sharp dust sensor GP2Y1010AU0F x1

Breadboard:

Schematic:

Code:

In the box:

From an old Dlink ADSL router i made a box to fit The battery pack, the arduino plus proto board and the telemetry receiver.

I attached the two solar panel outside the box with heavy duty double side tape.

Bottom Side

Top side

Conclusion:

I did write this sketch to check the limits of my sensor for the transmission speed, the power consumption and the data sampling and therefore everything has been pushed to the limits to help me to design a more proficient sketch for power consumption and data sampling.

I determine that 19200 bauds is the maximum speed i can achieve by using serialsoftware library on arduinop uno board without having data scrambled.

I do a continuous sampling of the data without pausing the code and fill up an 100 data array with a Last In/ First Out method and send the average of this array each time the last sample is saved inside the array.

I did not use any power saving mode of the Atmega328 of my arduino board to check what i can get from my 6 Nimh cells pack and my hacked solar panel.

Telemetry:

The 3DR telemetry work very well. At 19200 bauds I obtain good results even through walls.

i have tested it around 300m in line of sight and around 100 m through wooden building. Some packet are dropped at the range limit but nothing dramatic and 19200 bauds are far too fast for the final usage of the sensor.

Dust sensor data sampling:

The dust sensor reading is quite consistent with some erratic reading either below the Voc, which give negative values according to the Volt/dust density equation and some readings are close to the sensor saturation. I was not able to determine what was the cause of this erratic readings.

Is it due to high sampling frequency or to to the sharp sensor design?

Most of the sketch that i found on the net using the Sharp dust density sensor are introducing a delay in between samples but according to the manufacturer datasheet, they recommend to drive the sensor reading with a pulse signal.

I should solve this problem by a digital filter to remove the data with a too big delta in between reading.

The A realtime digital signal processing (DSP) library for Arduino library or the smooth library are maybe the solution.

Power supply:

The 6x Nimh cells pack and the solar panel are just sufficient to provide the power for 24h on a sunny day but the solar panel are not powerful enough to power the sensor and charge the battery.

If there is a cloudy day, the solar panel are almost useless.

I must work on reducing the power consumption by implementing the AtMega power saving mode and the watch dog timer.

the sleeping arduino series of post form Zigbee and Embedded Development is going to be a good start to understand the concept of AtMega power saving mode.

What Next:

  • Sketching the Power saving Mode.

  • Sketching different data sampling and filtering approach

First Sketch<<<<Previous Next>>>>>