Good evening, LMR! Last month or so I had some time to do little progress on my Docking station for IsoBot02. I have fixed IR beacon inside the base. Picaxe 28x1 makes it continiously emit signals.
And after hours of searching around my house, I found proper housing for IR reciever to be fixed on back of 02. Yes, he will be doing reverse parking :)
Now comes the software side of things. I managed to Make 02 find direction to the beacon. It was fairly easy to do. You can see the results on video. But when I moved into working with compass I got whole bunch of wierd actions from Rover... Better to say he doe not want to perform any action... So far I figured out the problem could be in trying to drive 4 servos and communicating with compass module via I2C simultaneously... This is my next taskfor now...
https://www.youtube.com/watch?v=zAqJX4yhG8E
post a walkthru
i have got to know how you did this! parts ahd a howto pleas…
I’m planning to do it a bit
I’m planning to do it a bit later, when it works better
nice thanks.
i have absolutely got to know how you accomplish such awesomeness. Mark3 will follow me
I can help…
I am doing this EXACT same thing with the EXACT same set-up with Walter. I also had problems with sweeping the IR receiver while in the main “drive” loop in the main code. The first thing I have found is you need a pause in between the irout commands on your beacon. About 10us worked fine for me and more that doubled the sensor’s ability to find the beacon. Next, and this was really key, put the sensor and sensor servo on a seperate picaxe chip. Keep the beacon sweep completly self-contained. From here, you can do a lot:
Have the beacon sweep picaxe send out a constant stream of serial data, in reference to the position of the sweep servo. Or send a pulsout in reference to the position of the sweep servo and allow the drive chip to read this data with pulsin. Or what I did, was setup a little resistor bridge using 2 output pins on the sweep chip. This allows a simple 0, 125 or 255 to be sent out and be read as an adc input by the drive chip. 127= the beacon is straight ahead or is not found i.e. keep running the regular drive routine. 0= the beacon is on the left and gosub to a “slide a little that way” routine and 255 means that the beacon is on the right and slide a little that way. This is a little sloppy, but really I just need to get close to the beacon where Walter crossed a big, flat black line, which is read by his line follow sensors. When he crosses this line (at a right angle) and if at least 3 of the line follow sensors are triggered, he turns 90 degrees to the right, follows the line and eventually gets to the end of that line. There he crosses yet another black line (the line he is following is basically a “T” with the top of the “T” being his final stop line. At this point, he knows he is docked and lined up.
Here is my beacon find code:
(By the way writei2c 4,(??) is my servo command --I use a servo driver
I2CSLAVE $C2, i2cslow, i2cbyte
let pin4=1
let pin3=1
irbeaconmain:
for b8= 50 to 250 step 5
writei2c 4,(b8)
gosub ircheck
next b8
for b8= 250 to 50 step -5
writei2c 4,(b8)
gosub ircheck
next b8
let pin4=1
let pin3=0
goto irbeaconmain
ircheck:
IRIN [12, ircheck2], 1, b9
if b9=111 then goto gotit
ircheck2:
pause 10
return
gotit:
if b8<150 then
let pin4=1
let pin3=1
endif
if b8>150 then
let pin4=0
let pin3=0
endif
return
clearscreen:
serout 6,N2400_4,(254,1)
pause 10
return
just saw the video…
Aha! I didn’t see that you were turning the whole robot… Everything I said above still stands, I would put your IR sensor on it’s own servo.
Thanks for sharing
Thanks for sharing experience, Chris!
My beacon has 20 ms pauses between command pulses, and it works pretty fine. I did not have problems with IR so far. My problems started when I moved to code the part responsible for compass module, It became absolute crap, so I had to stop driving my servosand make a pause before reading azimuth from CMPS03. I have made progress from that point playing with code as well. Now I’m working on Hardware of station, adding guides and thinking of contact plate design… I’m not going to add servo to robot neither to docking station for sweep, as my goal is to use stationary beacon and use compass data combined with direction on beacon to align 02 with entrance and eventually drive him into dock. Wow! I did not think of line following from close proximity of the base! Brilliant! And so easy to get robot docked, is it!? But I think I will not be able to mount it on my 02… Hmm, we’ll see how it goes…
How do you dock Walter? With regards to electrical contacts? I was thinking of some kind of contact plate coupling by plate with contact springs or something…
Most probably I will use
Most probably I will use this technique with narrow angled beacon broadcasting its position in my next project…
Docking…
I have not gotten to the actual “docking” part yet, just the “getting there” part… However, I stole most of my ideas from this which should help you quite a bit. As I sit now, I have all the different sub-sections done (i.e. line follow, beacon follow, stop-when-you-get-there etc.) I am just in the process of putting them all together. And really, I have 3 different battery packs to charge so I don’t know if I will ever use this system to as a charge station… I am working on a simple stopping point where an external arm could place a beer on the back of my bot as to then bring it back to me!