Showing posts with label Rain Sensor. Show all posts
Showing posts with label Rain Sensor. Show all posts

Monday, October 31, 2011

Wireless Infra Red(IR) TSOP Design Tutorial 2

May the peace and mercy of Allah be with y'all.

PART II : IR CARRIER PULSE

You guys!We continue our journey in Infra Red (IR) communication in more practical approach. From the previous introduction article, IR pulse frequency play important role in determining the TSOP IR detection sensitivity level. How do we start?? Below is how we calculate the timing. Lets go!
From the calculation above, we need to light on the IR LED for 12.5us and turn it off for 12.5us. This is for a period/cycle. Repeating this cycle will generate IR LED pulse oscillator of 40kHz!

Go grab your Microcontroller (uC) or any IC that can generate pulse like we discussed. *I prefer uC as I can easily tune the frequency by modifying my code and not my hardware.

Eg : Carrier pulse 40kHz using mikroC and PIC12F629(cute and small uC). We can't set 12.5us delay as the input x to the function delay_us(x) as x should be round integer and not floating number.

While(1)//forever loop IR LED on and off producing oscillating pulse!
{
GPIO = 0xFF; //IR LED on
delay_us(12); //wait 12us
GPIO = 0x00; //IR LED off
delay_us(13); //wait 13us
}

The actual result : Use oscilloscope to probe at output pins.

On time(Delta) = 12.40us
Off time(Delta) = 12.01us

Period/cycle = (on time + off time) = 24.41us ;
1/Period = frequency = 40.9668kHz(Good enough!)


Oscilloscope helps a lot. From my experience, when the frequency is not exactly at the right specification (error = +/-1kHz), the TSOP sensitivity decrease! Some cases, I need to place the IR LED extremely close to the TSOP receiver to make it detectable!!! (T^T). Please verify your frequency pulse generated. Don't 100% trust on the code you write(especially high level coding) for timing restriction coding unless you use assembly language with precise calculation.



Monday, October 24, 2011

Wireless Infra Red (IR) TSOP Design Tutorial 1

May the peace and mercy of Allah be with you.

PART I : INTRODUCTION

More than a years I haven’t post any article in this beloved knowledge-base blog! I miss vortex electrica so much.OK! This time we talk about an idea on how to make a IR communication from scratch!

Component: TSOP4840,TSAL6200(IR LED 940nm wavelength)


I choose TSOP4840(use in my own project) as IR receiver. It was design to be used inside remote control(TV,DVD player..etc). When we know how to design it, we can implement it anywhere such as in robotic project. Below is the internal circuit of it.

From the block diagram above, we can see the internal circuitry of the TSOP48XX. Band Pass filter is the most important part where it can filter out the noise from ambient IR wave.*TSOP4840 (40 = 40kHz bandpass filter,38 = 38kHz,52,36) .

What the bandpass filter do???? it reject any light which have frequency other than 40khz. In non-technical way represented as cartoon below. (^^)

You can read the pins assignment from TSOP4840 datasheet,the circuit for the receiver shown as below/datasheet:application_circuit.

TSALXXXX is a IR LED. Ignore the transmitter part 1st. In my design, +Vs I used is +5V. The OUT pins can be left unconnected 1st to test it functionality. When the voltage +Vs and GND supplied, the OUT value should be high almost ~5V. TSOP48XX working in active low mode, if it detect any IR light pulse ~40kHz,the the OUT pin will be ~0V!

This Infrared receiver(TSOP) only sensitive to an IR light pulse 40khz with 50% duty cycle. From the data sheet, the minimum 10 pulse should be send by the transmitter to make the TSOP able to detect it.Link

That the introduction, in the next tutorial, I'll show you the working example + video!

See ya!

Wireless InfraRed(IR) Design Tutorial 1

Wireless InfraRed(IR) Design Tutorial 2

Tuesday, June 1, 2010

Solid-State Weather Systems Electronics: Part 2>> Acoustic Disdrometer Rain Sensors

Hi guys.. I've just finished my thesis project documentation, now I'm taking a break in my home. This is the next part from my final year project in this blog, a continuation from the article: Solid-State Weather Systems Electronics: Part 1

Where the first article has the least difficulty regarding detection of three weather parameters: Ambient temperature, humidity and Barometric Pressure.

---------------This article has a moderate difficulty level in construction.--------------

Remember that the documentation regarding this article is pretty scarce, since most of the sensors out there are tested using million-dollar equipments, therefore they are patented technologies. I'm just doing this project from a hobbyist perspective... so if you manage to build an industrially-challenging one, good for you! References in the internet regarding rain sensors can be done by yourselves, but I'm gonna put forward ORIGINAL research and WORK done here... and the RESULTS are all original as well... So hopefully we're not part of useless Google searches regarding DIY Rain Sensors.

So.. We have come to the next parameter, which is pretty complex to process, but the hardware required is pretty simple. Yep, we're gonna do a rain check here.. So what is the importance of reading rain? Not important at all, if you are a common guy, but it may have a lot of significance to a farmer who wants to monitor his crops for farming precision. Remember that agriculture is a very-very important field in Malaysia, where a paddy field in Kedah,Malaysia will certainly benefit from precision in rain-reading, Insya-Allah.

First things first- how do you sense rain? How do you know if it's a torrent or a drizzle out there when you're sitting in your home snoozing or drinking milk tea? You know the answer, but it is difficult to answer it using technical terms. So I'll do my best to describe what I'm doing here to a layman.

There are several techniques used, apart from the standard but disgustingly bulky rain gauges (if you don't know about rain gauges you can do a quick wiki here.)

As for rain detection, the following electronics solid-state designs are briefed after processing the 'net's worth of info. NOTE: There are surprisingly very little amount of documented projects regarding DIY rain sensing.. so the combination of info is siphoned into a useful collection of info, hopefully... :)

i) Drop count: Water drips from an orifice that produces drops of known size which are
usually counted optically (which means the usage of optical sensors like Infrared, or light intensity fluctuation detection>> How to imagine the function: It's like seeing a mutilated image of a person at the back of an aquarium, since the water produces aberrations in the light... oh well that clears THAT.). This design is good for light rain, responds quickly to the changes, but requires a reservoir be maintained at a certain level. Ain't good if you're measuring light rain.

ii) Optical rain gauge: This technique uses scintillation effects to detect/calculate rainfall. This
is an electronic solution which is very pricy, since optics requires a lot of complex analysis. This
design is good for rates, but it is easily deceived by fog and mist. Used by Malaysian weather researchers or whatnot MOSTI... The concept is similar to the one used in the drop count. Xenso (A company making sensors) sells them at $99 (RM 300) to 'em weather guys in Malaysia.

iii) Self-siphoning capacitance gauge: This contraption uses a collection tube with a level
gauge, which is self emptying. This is a good method for measuring rainfall accumulation, which not good for light rains. Hard to DIY. No explanation needed since I don't understand it anyway.

iv) Doppler detection: This method uses reflected microwaves to determine intensity. This is an electronic solution which requires a high level of technology, meaning high cost issues. Even I could find much documentation regarding this thingy. Again, I still don't understand it too.

v) Ultrasonic sensors: This method is also an electronic solution, and also very pricy. It
measures rain by detecting the interference signals generated by the raindrops in an array of
ultrasonic network systems. EXTREMELY hard to DIY. And again, I don't understand the details much too. :(

vi) Disdrometers: AHA!! Bingo!! This concept uses impact of rain, where rainfall is measured by detecting the raindrop impacts via a piezoelectric sensor, which produces a voltage proportional to the volume of the raindrop. Used in the $3850 WXT510 Weather Transmitter (You're a fool to not sense a hint of sarcasm in this sentence)

Heh heh.. But this last option above proves to be the easiest to reverse-engineer and DIY, since Vortex Electrica is ALL about saving money and still being able to do kick-ass projects!! Credit needs to be given to Rolf Hut in his Instructables project.
The details regarding the electronics and techniques of detection are original, from Vortex Electrica though.

So.... what are DISDROMETERS? It is a meter which detects impact, simply put. A raindrop has impact, therefore a disdrometer reads it. The simplest analogy I can give is: Imagine a microphone being tapped by your finger. What does it produce at the speakers' end? TAP! TAP! TAP! Similarly, when you're sitting in your room, you know whether it is raining heavily or not. Now... to make it analyzable and quantifiable... we're gonna start on the construction:

STEPS IN BUILDING A DISDROMETER:

1: You'll need:

a. A plastic CD/DVD platter (or something flat, take your pick)
b. A piezoelectric transducer, like shown here:


......which can be scrounged from broken telephones, or broken clocks or.. anything which produces monophonic sounds.

c. Some electronic components, which are pretty simple:
a) an op-amp IC like the LM358 or LM741.
b) A potentiometer
c) A schottky diode
d) A donut perfboard.. of course.

2. Glue the piezo transducer to the CD platter using EPOXY GLUE.. very important. The one I did looks like this:

3. Construct the rest of the electronics according to this picture:


This is called signal conditioning... where the output spike is isolated from the rest of electronics by freewheeling the negative spike voltage produced by the piezo transducer using an IN5817 Schottky diode, where it is a diode with a forward voltage of 01-0.2 V only, where a lot of op-amps can only withstand -0.2 inverse voltage at it's non-inverting input, and also the signal is amplified by the gain setting using a single potentiometer. If you don't understand, never mind, just build the circuit. :P


4. The finished product in my project looks like this:




5. Now, you can at least observe the output from a location by placing a voltmeter between the output terminals of the circuit. The output is with regard with the raindrop volume, the higher the volume of the raindrop, the higher the output.

Quantification and calibration techniques will be dependent on the transmission of the data to a PC, where we can utilize the full power of a PC computer to do an acoustic analysis of the signals of the raindrops. We'll cover the data conditioning in further articles, since it is a fully different entity of hardware which needs to be discussed, which is also pretty complex.

Conceptually, the area under the graph depicts the raindrop volume, shown below here is me testing my disdrometer (The graph can be predicted according to the typical output shown in the oscilloscope):

The cost of the network is only around RM4.00... impressively cheap if you're daring enough.
For now, enjoy seeing the output which comes out when rain hits the drum!!
In the following article, we will uncover my most difficult part, which are solid state wind sensors, or anemometers, also built by myself, also with not much documentation in the 'net.

See ya all real soon, InsyaAllah.


Regards,
Vizier87
Related Posts Plugin for WordPress, Blogger...