vidiotsquad

Infra Red sensors

July 22nd, 2008

So, following on from the LED clips below, I used the simple Arduino analogue read to Processing sketch to display the results of the IR sensors I’ve been playing arround with so that I have something to show you instead of a stream of numbers in the Serial Monitor. I’ve decided to use these instead of the capacitive sensors, as there are far fewer variables to screw up with the circuits when combined with the LEDS, and fewer components involved. when the sensors triggered i had them activating some LEDS, and you need to incorporate a few gound planes and extra capacitors to isolate everything. Cost and simplicity are the main factors her, so the IR sensors won in the end.

In the video you can see the graph line on the computer screen, as an object (not just my hand) draws closer to the sensors, the level of the graph drops. Its incredibly responsive!

Prepare yourself for some frantic and wobbly hand movements!

Despite my grumblings above, the Qprox  chips I tested were very useful, simple to wire up(although i use the dead bug aproach since they were surface mount chips), and surprisingly cheap as well. For anyone who’s tempted, the data sheets and application notes are very easy to follow for complete beginers and include a wealth of great tips to be able to get very stable circuits working quickly.

However, the IR sensors I made work out at pennies per unit to construct, and provide me with a whole host of features such as distance sensing and ambient IR light sensing which can be used to adjust the responsiveness of each unit of the whole matrix of sensors via the coding of the Arduino, and again, the simplicity of them is wonderful. By using analogue demultiplexers, you could string loads of them together into a few pins on the Arduino, only limited by the processing power of the MCU depending on what else you are doing with it.

There are comercially purchasable units for IR sensors, but these can easily cost £6 each and more, but with an IR source, IR phototransistor and a couple of suitable resisitors, this unit cost me £0.30, even cheaper when the components are purchased in bulk.

I’ll try and upload some more tests shortly once I can make them look a tad more interesting, although the 4×4 matrix of sensors and LEDS on my bread board are coming along nicely, just a few coding issues to iron out first before a public demo!

4 Responses to “Infra Red sensors”

  1. Guilherme

    Hi!
    Is there any chance to see the schematic of the IR LEDs circuit?

  2. udyan

    hello,

    i hav been surfing the internet since past month to find a solution to my ir sensor.
    i hav a halemicro circuit http://halemicro.com/Products/Products.html
    and a sharp ir sensor : Sharp GP2D12

    when i hook them up, my sensor doesnt give me a proper response.
    it fluctuates, any help on this will be greatly appreciated.

    kind regards

    udyan

  3. bod

    hi udyan.

    i’ve never used the sharp gp2d12, but i had a look through some notes for a simular device i used but ended up building my own with emitters and sensors.

    just how badly does it fluctuate? and is that with nothing in front of it or not?

    infra red light is all arround us, it comes from lights, the sun, etc, so you will get some interferance/fluctuations. from what i’ve read on the arduino forum, a 10uf capacitor will help smooth things out a little, try connecting the positive end of the cap to the sensor output, and the negative/output of the cap to the input of the board. i had a look at the hale stuff before, it looks really cool, but i dont thing there is any way to modify the code to smooth out the sensor reading through software, as thats what i have to do with the sensors i used, but the basic one i made up with the individual parts was a lot more solid..

    i take it you are using the sensor and the midi board to send midi cc messages back to something? are you planning to use it like the old roland d-beam stuff for synths and filters etc? and just how far are you trying to sense from the sharp sensor?

    if you check the video above, you can see at the begining the base line reading is pretty solid, and i got maybe 10 to 15 cm reading on it, but that was through an arduino board, which requires coding yourself(sorry, i dunno if you are aware of this, so sorry if i’m teaching you to suck lemons her…) but with a little effort you can read such a sensor and output midi data through a midi cable, not usb. there is ways round that but even some of the more proficient coders on the arduino site have issues with using midi over usb on arduino.

    on a side note, i had a look through your site, some of your tunes are sweet mate! some nice stomping bass lines!

    let us know how you get on.

    bod.

  4. bod

    actually, you might be better to speak to guilherme who posted above, his website is http://lab.guilhermemartins.net/ and seems to be far more proactive on this subject then me…… again, i’m not sure if he ended up using my method of building from scratch or using prebuilt sharp units, but he knows his stuff!

Leave a Reply

Proudly powered by WordPress.