Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 13th May 2008, 04:29 AM   (permalink)
New Member
richardv2 is on a distinguished road
Default Robot sensor question

I want to signal condition a phototransistor line sensor output to a digital input.

Although I am using the PIC16F8680 chip, the answer should be valid for most PIC chips. If not, please let me know.

I have designed, built and tested a bank of 8 IR Transmitter/ Phototransistor pairs.
They all return 1.2 to 4.2 volts at 3/8ths inch depending on a light or dark surface below the sensors.

I ultimately want an 8-bit digital pattern where the sensors might react like this when travelling over a black line.

00011000
00001000
00001100
00000100
meaning the robot is drifting off center.

Seems like I have several options:
Lets say I use Port B as an input port.

1. If I just run the sensor inputs to the port, it would seem that I would get what I want; zeros or ones.

2. Could I send the 1.2-4.2 volt signal through some kind of chip like an inverter to "clean up" the signal and only produce 0 or 1? I know an opamp could do this, but that seems like overkill.

3. How about an LED/resistor voltage divider to drop the 1.2 down to 0.7 to make sure I get a zero into the chip at low voltage??

4. I could use ADC, but it seems inefficient to convert the voltage into an 8 bit number just to turn it back into a one or zero.

So what would you do???
richardv2 is offline   Reply With Quote
Old 13th May 2008, 04:35 AM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

You could use a pair of quad comparators. OR you could use the PICs built in comparators and a 4 to 1 mux chip like the CD4052 or one comparator an 8 to 1 like the CD4053. There's a built in DAC you could use too to set the threshold.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline   Reply With Quote
Old 13th May 2008, 04:37 PM   (permalink)
New Member
tyru is on a distinguished road
Default

I'm not familiar with that PIC chip. IMO I like the 16F88 chip. If this is a line follower, you will need to adjust the threshold levels to determine if the robot is on the line and not on the line under varying light conditions and surface conditions. I would bring the voltage into the A/D converter on the PIC, if your PIC has this capability. Covert it to a 8 bit (0-255) number and set/adjust thresholds in the programming. You could output the light level to LCD.
tyru is offline   Reply With Quote
Old 14th May 2008, 12:02 AM   (permalink)
Experienced Member
mneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of light
Send a message via AIM to mneary
Default

ADC may seem inefficient, but if you aren't using them for anything else, it's really quite reasonable. You can take ADC readings and use the average to compensate for almost any light conditions. The sensors probably won't be identical. You can compensate for this by adding or subtracting a value from the sensors that are different. (or use the readings to help match sensors).

It's not any less efficient than posting identical messages on 4 different forums around the world, and 2 different topics here.
mneary is offline   Reply With Quote
Old 16th May 2008, 12:08 AM   (permalink)
New Member
richardv2 is on a distinguished road
Default

Quote:
Originally Posted by mneary
It's not any less efficient than posting identical messages on 4 different forums around the world, and 2 different topics here.
As a newbie to PIC chips, my plan was to post on as many forums as possible. Then gauge by the quantity/quality of the responses, which forums are best for what I'm doing/asking.

I see you disaprove. Are you saying I should avoid all forums in the world but one? How would you go about getting as many different responses as you can to a specific question???
richardv2 is offline   Reply With Quote
Old 16th May 2008, 12:11 AM   (permalink)
New Member
richardv2 is on a distinguished road
Default

Thanks Tyru
The PIC18F8680 has multiple A/D so this would be a good idea.
richardv2 is offline   Reply With Quote
Old 16th May 2008, 01:17 AM   (permalink)
Experienced Member
mneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of light
Send a message via AIM to mneary
Default

Quote:
How would you go about getting as many different responses as you can to a specific question???
I agree it's difficult to find the 'best' place to post a question. But from the responder's viewpoint, it means I don't know if you've already received a reply. Composing a helpful reply sometimes requires a lot of effort. If the question has already been answered elsewhere with the same thing that I'm writing, I feel that I've wasted my time.

Maybe if you waited a couple of hours, and mention the other places it's already posted.......
mneary is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Robot wars!University of Cape town Mechatronics project riki4eva Electronic Projects Design/Ideas/Reviews 7 28th June 2008 05:52 AM
New UK Robot competition ShinyRed Robotics Chat 2 23rd February 2008 02:21 AM
Good Robot H-Bridge? Krumlink Robotics Chat 37 6th February 2008 01:49 PM
Base Robot Body Krumlink Robotics Chat 6 2nd January 2008 05:09 PM
Motor Sizing For Moving Robots dknguyen Electronic Theory 6 25th April 2007 10:43 PM



All times are GMT. The time now is 10:06 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.