Robot orientation to beacon - Page 1
Forum section: electronics / beginners

author: colt
author_rank: Newbie
timestamp: November 06, 2020, 03:47:22 pm
content: I am making a robot to take my houseplants out of the garage into the sun during the day. I envision a sled that can drive itself. I am thinking about using a compass to orient the sled with respect to the sun and to make sure it is in the proper orientation when it goes back into the garage. I plan on using gps to get rough location. My main design concern is the final approach to the garage. What would be the best way to accurately drive it into its parking spot?I know I can do line follower but am looking for something more discrete. I was thinking about having a beacon in the back of the garage and then adjusting the robot position outside the garage until it was aligned with a compass heading and looking directly at the beacon. Then drive forward. What beacon/sensor combo should I use to do this (my instinct is single ir emitter beacon and on the sled dual receiver to triangulate)? Is there a different strategy that would work better?I want to use a low power micro (MSP430) to operate the robot, but could use raspberry pi if required.Thanks for any feedback-Colt

author: Siwastaja
author_rank: Super Contributor
timestamp: November 06, 2020, 03:58:28 pm
content: Note, compass is nearly useless. The magnetic field of the earth is weak, urban environment and even your robot itself have active magnetic sources (permanent magnet; wires carrying current), and passive disturbances such as metals deflecting the Earth's field. The end result is, you need to average the magnetic field over a large spatial area; if you think about classical compass-based navigation "by hand", that's exactly what you do, you take a look at the compass frequently and adjust your trajectory carefully.To get short-term stable direction, you can integrate gyros. Cheap $3 MEMS gyro ICs are stable within some ~1 minute timescale, more expensive $50 MEMS IC gyros are maybe accurate to ~10 minutes.Finally, if you need active beacon guidanceanyway, you can probably forget both magnetometers and gyros; or maybe you can utilize gyros during short intervals of losing sight to the beacon.For the beacon itself, IR emitter detected with a camera is OK; or you can paint/print a pattern and use computer vision to detect it. For cheap off-the-shelf hardware, this could be the Raspberry Pi with its camera.

author: colt
author_rank: Newbie
timestamp: November 06, 2020, 04:50:09 pm
content: Thanks for the good info. I have used a compass gyro combo successfully in a quadcopter and self flying glider. I used the compass/accelerometer as long term orientation correction for gyro. The sled will be big so I think I can get the compass far from interference.The plants will stay on the sled all day outside with garage closed so beacon will only be visible during entry and exit of garage. I guess a combo of everything for best results is needed? I know the pi/camera would be a solid solution, but it feels like cheating using a camera. The fun of it for me is to find the lowest tech option.

author: Manul
author_rank: Super Contributor
timestamp: November 06, 2020, 05:04:21 pm
content: If you are not on a very low budget, I would recommend to build an UWB location system. It is not so hard as it first seems and in most environments it works really great. You need to put minimum 3 (TWR) or 4 (TDoA) stationary anchors, which might look like a pain to do, but after that it is really enjoyable positioning technology to work with. I have built a prototype UWB location system in a matter of days using DWM1000 modules, including some custom coding, but you may also use open source code and ready made evaluation boards, so it might be even easier.I'm talking about these:https://www.decawave.com/products/Edit: ok, it is too much high-tech and not fun.

author: Syntax Error
author_rank: Frequent Contributor
timestamp: November 06, 2020, 05:18:21 pm
content: How far out of your garage do the plants need to travel? Could you just run the sled on a DIY railroad track?

author: colt
author_rank: Newbie
timestamp: November 06, 2020, 05:42:03 pm
content: Manul, those position sensors look like a really good option. A bit pricey, but not too bad. I will have to test them out.Syntax Error, Haha yes! A train of plants! I just have to be able to shut the garage door on the tracks. Maybe some thin strips of plastic as rails. Unfortunately, this would not be very discrete and would result in a veto from my better half.

author: atmfjstc
author_rank: Regular Contributor
timestamp: November 06, 2020, 06:15:03 pm
content: For this kind of application, I'd suggest using a Raspberry Pi with a camera and April Tags or AR Tags to orient the robot. The advantages of this approach include:- There's already plenty of hackable code for robot orientation, middleware and driving for the Pi with April/AR tags- The tags don't need power to work, just make sure they're visible and, if outdoors, made of something rigid, that can withstand rain and wind. Or you could paint them on the floor, like they do in Amazon warehouses- The robot can respond to some unexpected circumstances, e.g. if the garage door is closed and it can't see the tag, it will know something is wrong and stop, instead of driving blindly into wallsIn principle, one could even do away with the tags, but that requires a lot more CV-fu and experimentation to get right.

author: Manul
author_rank: Super Contributor
timestamp: November 06, 2020, 09:12:27 pm
content: Probably one of the cheapest and low-tech solutions would be an induction based system. I'm not sure about details, but I heard that it is used. You dig a wire shallow in the ground, run some AC current in the order of khz and use two pickup coils on the bottom of robot to make it follow this line, same as optical line following.

author: rstofer
author_rank: Super Contributor
timestamp: November 06, 2020, 10:18:08 pm
content: Infra-red LEDs? Sense with a camera module or even an infra-red sensor. Battery life will be a problem. Maybe use a uC in sleep mode to control the LEDs and just turn them on at the appropriate time.