Asked — Edited

Home Base Finding Design Using A Ir Beacon Idea

Little while back someone made a post on home base finder ,and since it was so hard to find a good idea since there was many soloutions.

I decided to test one i found was very good thanks rgordon

First i put the circuit together and it worked very well

Second test is to use the arduino code to learn how it tracks

IR BEACON ROBOT TRACKING

3RD test is to convert the arduino code to EZB

It uses 4 IR transmitter and receiver pairs ,like a compass it updates 1000 times per second as said on the pololu website

Alot faster then any camera or some other designs can do

here is a link about how it works

pololu ir beacon transceiver

also you need a set of them, one on your robot and one on home base

pololu ir beacon transceiver pair

Also they work great in the dark,so no lighting is needed ,will have photos and data as i make it


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

#9  

TRY to understand the circuit ,me is easy look at JP4 all connections are ground ,so if you jumper to JP3 will be grounded and leds with be always on

Also if you look at the circuit its only ouput now this is a way to make your own circuit using IR MODULE like in the circuit without the nicroprocessor

And use EZB instead,it would need a PWM to analog CONVERTER, but that idea is way over most people head to design ,except for me

IR using one of our sharp IR sensors DJ sells,it can work too ,but may have a problem with interference

Some of my tech info i know its hard to understand unless you have a degree or something close to it

ALL i can do is try to explain it,so its easy to understand

#10  

maybe this is better to understand the design near the bottom says about digital outputs

The beacons work by transmitting and detecting infrared light, much like a television remote control. Each beacon has four IR emitters and four IR detectors. The beacons alternate between transmitting and receiving so that they never get confused by reflections of their own transmissions.

The transmit and detect cycle is carried out more than one thousand times per second, and a small microcontroller monitors all four detectors to decide the direction to the other beacon. The beacons have four red LEDs that indicate the direction to the other beacon; if you take two beacons and rotate them, the LEDs will always keep lighting up in the direction of the other beacon.

Interfacing to the beacon is simple - it has four digital outputs that indicate which of its four sides detects the other beacon the strongest. You can establish the direction to another beacon to within a few degrees by rotating the beacon back and forth and noting the point where the output switches from one side to another. An enable input lets you select between active mode and a low-power mode.

#11  

here is the arduino code that needs to converted to work with EZB

#include <Servo.h> #include <AFMotor.h> #define TOPSPEED 200

// servo SCANNING VARIABLES // Servo myservo; // create servo object to control a servo int servoPosition = 0; // variable to store the servo position const int SERVO_PIN = 10; int floorState = 0; long frontReading = 0; boolean scanIncrement = true; //increase position? byte servoIncrementValue = 6; byte servoDecrementValue = 6;

// MOTOR VARIABLES // AF_DCMotor rightMotor(4, MOTOR12_8KHZ); AF_DCMotor leftMotor(3, MOTOR12_8KHZ);

// TRANSCEIVER VARIABLES // int notFoundSensitivity = 500; int west = 0; int south = 0; int east = 0; int north = 0; int dir = 0; boolean detected = false;

// TRANSCEIVER DIRECTION MODE VARIABLES // const int NUM_READINGS = 10; int directionReadings[NUM_READINGS]; int modeOfDirections = 1; int index = 0;

void setup() { Serial.begin(38400); myservo.attach(SERVO_PIN); // attaches the servo on pin 9 to the servo object myservo.write(0); rightMotor.setSpeed(200); leftMotor.setSpeed(200); delay(1500); }

Ireland
#12  

@robotmaker You may be correct that its digital My reference to adc ports is because I use them to monitor the outputs from the IR Beacon at present and it works very well .

Please may I move the post forward @Rich is concerned about using up to 4 ports (digital or Adc) my proposal is to try to limit it to one ADC I am simply putting the idea forward If we were to add a potential divider to all the outputs ( using a different value resistor in all 4 circuits ) could we then use one ADC to identify which ir N,S,E,W is active

e.g 1 volt on adc0 North 2 volt on adc0 South 3 volt on adc0 East 4 volt on adc0 West

United Kingdom
#13  

That would work, and solve the problem of using 4 ports. It would need to be done on the ADC rather than digital though, but that's no issue from @Bravia's experience.

I assume on the ADC port it is either low of 0v and high of 5v or vice versa?

Ireland
#14  

I have used 4 adc ports to monitor ir beacon it works

@Rich on the adc (ez-b ) it monitors any voltage between 0 and 5v ,as i listed in previous post

I will test the idea,or if someone can suggest a specific component I would appreciate

would a 4 input D to A converter meet our requirements confused

Ireland
#15  

@robotmaker I note from your posts that you are an expert in circuit design Would appreciate very much ,when you have the time to upload a schematic of a circuit to monitor the 4 outputs and produce a corrosponding voltage that could be monitored by the EZ-B adc port

Pat

#16  

WOULD have to be tested to see if it will work,on idea might look good but testing is always better

And not shore is it will update as fast at 100000 per second on digital is aways faster then anolog ,main reason analog first reads ther valule and then converted to digital

SO using digital the conversion is direct and faster

there is a simple circuit to use only only 2 digital ports with 4 digitals using gates

AND after me reading my info again on A-D conversions its not faster