IR for robot on 16F877A


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    Revelstoke BC Canada
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    I agree with Allan, Use the if/then statement.
    You can connect the output of your IR receiver to the RB pin, just be sure to set which ever pin you use as an input.
    Are you going to put the IR emitter inside the room you want the robot to turn into?

    Dave

  2. #2
    thelightbrain's Avatar
    thelightbrain Guest


    Did you find this post helpful? Yes | No

    Default

    Be aware that those IR receivers are designed for modulated data (usually Manchester or some other type of async encoding) and they will reject continuous carrier signals. If you just send a continuous 38Khz IR signal, it will briefly go low, then it will go high again. Check the data sheet for acceptable burst lengths and data rates. Usually each burst of 38KHz will have to be followed by a corresponding "space" to allow the AGC circuit to recover.

  3. #3
    Samuel's Avatar
    Samuel Guest


    Did you find this post helpful? Yes | No

    Default Is1u60

    oh no ... i was just planing on a simple 38KHz modulation .. im really running out of time. Can someone else pls give me some insight on that? my retector is the sharp IS1U60 and im planning on bulding an IR transmietter at 38KHz using a 555 timer.

  4. #4
    Join Date
    Jan 2005
    Location
    Greece
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    You could use a 556 and use the second timer to modulate the first
    LSB

  5. #5
    Join Date
    Feb 2005
    Location
    Revelstoke BC Canada
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    Why don't you mount the emitter and receiver to your robot? that way you could use the PWM output of your Pic to pulse the IR emitter at 38khz and connect the output of the detector to any available (digital) input pin, then use an If/Then statment to poll the detector pin, in this case the pin would be low as long as there was a wall, and go high when it came to an opening. If there are other openings before the one you want to go into, you could have the pin increment a counter each time it went high, and when it got to the one you wanted, it would jump to a turn subroutine.

    Dave

  6. #6
    Samuel's Avatar
    Samuel Guest


    Did you find this post helpful? Yes | No

    Default well said ..

    wow DWV actually can see exactly what im trying to do. i did think of ure idea DWV and other ppl have siad the same thing. i'm attaching a picture here to say y i cant do that. (i have no walls in my design) And i dunt think i can put the time i have left into making walls .. Also i'm using the only two pwm's on my 16F877A for my motors.

    secondly, i thought the detection would be much more efficient if the transmitter was pointed at the detected instead bouncing of a wall? In the sense that outside interference etc wont affect as much.. someone correct me if im wrong. This is why i thought it was better to have the transmitter as a separate unit.

    Also ive heard is setup where IR is used as the path .. so there is a whole stream of IR transmitters say for example along the cieling of a coridoor or on the floor, and the robot basically keeps tracking these emitters .. so im tring to incorporate that style .. of having one detector on the robot and having multiple transmitters external to the robot.

    my concern now is when someone said the detector wont stay low the whole time its detecting an IR .. that it would stay low and come back high. i want it to stay long as long as an IR is hitting it .. or do i?

    I want to place two detectors on the robot .. one on the right , one on the left. The transmitters will be placed at each turning point of the robots path. (see my attachment) I want the robot to come out of a "forward routine" and jump to a "turn routine" as soon it detects an IR. And yes i can use counters if i need it to make the second turn and so forth. Another concern is I'm gonn have to place the transmitters in such a way that they dunt interfere with each other. So that the robot does not detect the wrong trasnmitter.

    Pls give my any input and experience you have with such setups. I have jsut 3 more days to complete this setup before final demo!!!! arggh ..

    Thanks so much everyone who is responding to this thread!
    Samuel
    Attached Images Attached Images  
    Last edited by Samuel; - 6th April 2005 at 17:34.

  7. #7
    Join Date
    Feb 2005
    Location
    Revelstoke BC Canada
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    I see what you are trying to do now, Have you checked out Rentron's site?
    I think Bruce just might have what you need.

    http://www.rentron.com/Micro-Bot/IR_Nav.htm

    Be sure to read the Hardware.inc file, it has some nice subroutines for sampling the detector for short periods of time. I'm working on modifying them to use with one of my robots.

    Dave

Similar Threads

  1. Replies: 17
    Last Post: - 12th April 2014, 02:17
  2. Plz help in completing RC-5 IR remote lamp dimmer project
    By vu2iia in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd April 2008, 08:44
  3. PIC10F200 Automated IR Light Switch
    By Bruce in forum Code Examples
    Replies: 7
    Last Post: - 3rd May 2007, 11:40
  4. Clock connection to DS1802 from 16F877A
    By coyotegd in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd January 2006, 18:52
  5. how to get pic to pic communication
    By kinsiro in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th August 2005, 17:12

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts