rayzrocket
- 9th March 2010, 03:45
In an effort to perform ~10kbits/sec data com via IR;
I've tried to recreate a somewhat PIC Serial Input coherent square wave at 10khz.
And I get a Sawtooth(~1volt) wave, Channel 1, at the PIN photodiode using a 120k resistor....as it recieves 950nm IR from a LED driven by a Square (1.2 volt) wave, Channel 2, from the PIC16f688.
Ch1 is on a 1.00v scale Ch2 is on a 500mV scale.
Although, when I did inject the phtodiode's signal into a PIC16f688, it would rarely get the correct data.
See the pict's
I can get a very low level (25mv) square shaped signal from the photodiode using a 15k resistor instead of a 120k. Problem is the NOISE!! There is about 10mv of noise, so my SNR is horrible at this point. The PIN is only two inches away from the LED, when the PIN is moved away, the signal gets weaker, but the noise floor remains.
Is there a design that can fix this issue?:o
(The LED is rated for 800ns rise and fall time,,the PIN is rated for 5ns)
I am trying several transimpedance amp designs now using a single supply op-amp by Microchip.
LED driver code:
'************************************************* ******************************
OSCCON = $70 'Use intosc of 8Mhz
Define OSC 8 'Use 8mhz timing for PBP timing such as pause & serout
'************************************************* ******************************
'
'ADC settings:
ANSEL = %00000011 'Turn-Off Analog inputs except for ANS1(-Vref & ANS0(ADC)are analog
TRISA = %00000011 'Port A is all outputs exept A.0 A.1 are inputs
TRISC = %00000000 'Port C is all outputs
CMCON0 = 7 'Turn-Off comparators
'
'
'************************************************* ******************************
Start:
pauseus 50
high PORTC.4
pauseus 50
low PORTC.4
goto start
'************************************************* ******************************
I've tried to recreate a somewhat PIC Serial Input coherent square wave at 10khz.
And I get a Sawtooth(~1volt) wave, Channel 1, at the PIN photodiode using a 120k resistor....as it recieves 950nm IR from a LED driven by a Square (1.2 volt) wave, Channel 2, from the PIC16f688.
Ch1 is on a 1.00v scale Ch2 is on a 500mV scale.
Although, when I did inject the phtodiode's signal into a PIC16f688, it would rarely get the correct data.
See the pict's
I can get a very low level (25mv) square shaped signal from the photodiode using a 15k resistor instead of a 120k. Problem is the NOISE!! There is about 10mv of noise, so my SNR is horrible at this point. The PIN is only two inches away from the LED, when the PIN is moved away, the signal gets weaker, but the noise floor remains.
Is there a design that can fix this issue?:o
(The LED is rated for 800ns rise and fall time,,the PIN is rated for 5ns)
I am trying several transimpedance amp designs now using a single supply op-amp by Microchip.
LED driver code:
'************************************************* ******************************
OSCCON = $70 'Use intosc of 8Mhz
Define OSC 8 'Use 8mhz timing for PBP timing such as pause & serout
'************************************************* ******************************
'
'ADC settings:
ANSEL = %00000011 'Turn-Off Analog inputs except for ANS1(-Vref & ANS0(ADC)are analog
TRISA = %00000011 'Port A is all outputs exept A.0 A.1 are inputs
TRISC = %00000000 'Port C is all outputs
CMCON0 = 7 'Turn-Off comparators
'
'
'************************************************* ******************************
Start:
pauseus 50
high PORTC.4
pauseus 50
low PORTC.4
goto start
'************************************************* ******************************