Jump to content

Sharp GP IR sensor software/hardware implementation


cimo

Recommended Posts

hi

i will start a new thread about the Sharp GP infrared sensor.There is already a good starting point in this thread

http://www.midibox.org/forum/index.php?topic=5270.60

but i decided to start a new topic in this section because it is not about C programming anymore

I plan to keep uptodate this thread with my work around the GP sensor.

My enviroment is OSX (but i will try to give good hints to PC users as well) and a custom MB64E, on this box i ve got connectors (stereo mini jacks) for 4 digital inputs and 1 analog input, i am using the analog input to connect the GP sensor, when i don use the senso i can connect a modified Alesis floor board.

Right now i am using the sensor with the following modification

a) 1 capacitor 2200 microFarads and a bypass cap 0,1 microFarad (no pol) between

    Vin and Ground right close to the sensor.This will smooth the signal and bring the

    jittering down to 1 or 2 values.

b) i ve modified the MIOS_AIN_DeadBandSet parameter to 3e (i plan to use a

    smaller i think it is possible) NOTE: bigger values will lower the resolution.This is

    stopping the jittering.

c) i use a program called MidiPipe (http://homepage.mac.com/nicowald/SubtleSoft/)

  to scale the range, use the Control Split tool and set the Limit to 0-81 (it can vary

  a little depending on your supply, connections etc, just use the maximum MIDI cc

  value you get from the sensor)  then set the Scale parameter to 0-127 (default)

  IMPORTANT: you have to one Control Split tool for every CC sent by the sensor

  if you have different banks/groups

c) for PC users: download MIDIOX http://www.midiox.com/ you will easily find out

  how to scale the CC values

NOTE: remember to use shielded cable !!! brighter illumination where you use the sensor will improve the jittering problems

Now so far we ve got a first solution not really so elegant but functional.

I am working around an hardware circuit to stabilize the sensor s output and decrease the impendance.

Here a first schematic attached

R1 35k (or the closest value 34?)

R2 10k

R3 22K

R4 50K trimmer (at 44k should double the output)

J1 to the sensor (follow the pin numbers as for GP)

J2 to the box

IC A and IC B is NOT LM358 as described in the schematic, i am looking for Opamps that accept an asymmetrical supply, maybe OPA350? The first stage will lower the impendance so the second stage will perform the scaling stuff with no gain problems

IMPORTANT: this is not a verified circuit, you are very welcome to try it but no guarantee at all.I am not an electronic expert i am trying to figure out this schematic but i need help out there!!!

I have a candidate: LM324 it s a quad Opamp anc could be used for 2 sensors

I recalculated the resistors values and there are some mistake i will post the new schematic

540_GPschem_pngad7b65fb11cb90bf40be189b6

Link to comment
Share on other sites

  • 2 weeks later...

hi all

here the new schematics

GP_eda.png

and a partial part list

R1            Trim 200K

R2            Trim 200K

R3            100K

R4            100K

R5            ?

C1,2,3      10 microF

D1,2        ?

D3            Zener 2,5 volts

IC1            7660

IC2            TL082

JP1          IR Sharp sensor

JP2          I/O +5 volts Vcc

the 2 trimmers should regulate the range amplitube and the offset shifting, so this schematic can be used also for other sensors/devices.

IMPORTANT: this is just a test i didn t try it out yet!!

simone

585_GP_eda_png26ab97163c1b2caf421259248f

Link to comment
Share on other sites

Ahahah... I was gonna post about this sensor 2-3 days ago asking if anyone had taken a look at it... but forgot :)

Here's where I found a mention of it...

http://instruct1.cit.cornell.edu/courses/eceprojectsland/STUDENTPROJ/2002to2003/lil2/

the sensor quoted there is

the Sharp GP2D02 IR distance

sensor

There's a broken image thing in your second post... :\

Link to comment
Share on other sites

hi

i do respect any kind of ideology religion sex directions and such but i have to admit that i have hard time with accepting experimentation with animals but human beings.Yes it wouldn t harm any living being to toogle some MIDI data with an IR sensor but it s not my cup of tea and if asked i would deny anybody doing that.

Tomorrow i will etch the first pcb based on 7660 and tl082

best

simone

Link to comment
Share on other sites

Here, here cimo.

OK I won't hijack Lips Sealed

?????what?????

cheater, nothing personal with you, that hamsters guy or whoever; just a personal thought .

The sharp sensor shown in the web the Sharp GP2D02 it has a digital output, i don t really know why but everybody always talked about the analog output one, the one i am using, same as audiocommander and goule.To interface the Sharp GP2D02 you need either another processor or to write some code in the PIC itself.At least i guess so.

I didn t etch the board yet because i got sick of the light of the living room and i ve built a light dimmer  ;D  it s impressive the difference, you should absolutely have a light dimmer in your studios or living rooms guys..

a dimmed hallo from my living room

simone

Link to comment
Share on other sites

The sharp sensor shown in the web the Sharp GP2D02 it has a digital output, i don t really know why but everybody always talked about the analog output one (...)

the digital one provides just an ON/OFF signal (0 and 5V if I remember right), so to say a distance switch. therefore quite useless if you're not going to midify a pissoir flushing :-\ ;D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...