Electronics > Electronics

Modulating

<< < (3/3)

dunk:

--- Quote ---would the phototransistor respond  if i modulated the emitter at a certain frequency ?
--- End quote ---
sure. the phototransistor would just average out the signal.
modulating the signal doesn't really help you if you do things this way though.
if your receiver isn't looking for a change between the high and low signal values at that frequency there would be no point transmitting them.

i'm not sure i'm explaining this very well.
let me think about it for a while and i'll try and think of a better way of explaining after work...

dunk.

Admin:

--- Quote ---you can look for the rising edge rather than a specific level
--- End quote ---

this method works really well when transmitting data, such as from a tv remote - but it wont work for line following. for line following you must analyze amplitude of a signal (amount of reflectance from the line).  :P

pseudocode:
turn LED on
wait 20us then measure transistor with ADC (A)
turn LED off
wait 20us then measure transistor with ADC (B)
A - B = signal without ambient light (assuming transistor changes linearly)


--- Quote ---would the phototransistor respond if i modulated the emitter at a certain frequency
--- End quote ---
check the datasheet for the signal response rate. the above 20us wait is based on a guessed response time delay.

andreahmed:
hmm , after getting the value without the ambient , can i use it for the thersholding method ?

Militoy:

--- Quote ---I found a green led with photoresistor is much easier, cause I can see what the robot sees
--- End quote ---

Was there any particular reason you chose green, or was it just the visibility in setup? It seems to me that the optimum situation would be one where the delta between light reflected off the white line and light reflected off the background was maximized. Maybe a high-intensity white or UV LED might give even better results - as long as the detector sees a big difference. Modulated or not, and even without any light source beyond ambient light, the detector should be selected to best react to the color of light reflected off the line. Theoretically, white should reflect most colors pretty well. I wonder if, on the average, one color or one type of detector may "outshine" all others?

Admin:

--- Quote ---Was there any particular reason you chose green, or was it just the visibility in setup?
--- End quote ---
I did a lot of research into this - most photoresistors have its highest sensitivity with the color green (check the spec sheets). So a green LED made sense . . . The problem with photoresistors is that they have a low frequency response rate, so any modulation must be done at really low frequency.


--- Quote ---after getting the value without the ambient , can i use it for the thersholding method ?
--- End quote ---
you would want your threshold to have ambient light subtracted from it already. it really depends on your algorithm, and the sensor, but thats how i would do it . . . you could always test it different ways to see which works best.

these posts connect with
http://www.societyofrobots.com/robotforum/index.php?topic=354.new;boardseen#new

Navigation

[0] Message Index

[*] Previous page

Go to full version