So I'm very new to all this and I had this idea. What I want to do is have a toy boat be able to drive around a center point and stay at predefined distances from a center object. What I don't know yet is how to do this. The center object would probably be another arduino which communicated with the boat wirelessly. What sensors would be needed in this scenario? Also as its on water both devices would be moving up and down with smaller waves. I was thinking about ir sensors, or some way for the boat to know how far it was from the center object and either steer a rudder or adjust 2 motor speeds to steer? Any help would be appreciated!
sounds awfully tricky. what size of boat and what kind of distance were you thinking of? Is this in a pool, a pond. Does the center boat do anything other than provide a reference point? If not, it's probably easier for the robot-boat to "keep an eye" on it and not have a computer in the middle at all.
Well this would be on a pond and the center point dont have to do anything besides stay stationary in the center. The boat would be about 21 inches at the most as well. I knew this was going to be tricky, just racking my brain of a simpler method I might not be thinking of. Distances don't have to be great. I was thinking from 3 to 10 feet.
What I want to do is have a toy boat be able to drive around a center point and stay at predefined distances from a center object.
Have you considered 10 feet of string?
Ten feet of string is the easy way out haha... I don't want anything tied anywhere besides wirelessly.
One way could be with a light beacon or radio pulse at the fixed point, synced to an ultrasonic pulse. Difference in time-of-arrival gives an estimate of distance. It could all depend on how fast you want the boat to move - slow is easier, obviously.
Using a radio pulse seems like it would probably work the best at this point. I had a thought as well that instead of trying to keep it focused on one point, it would be easier to have it drive between multiple waypoints. That way when it got within range of a point it would trigger a radio signal, thus pulsing the motor.
I think this project is going to be close to impossible. You need a radio beacon but then you need an automatic directional finding receiver. I used to go on ham radio "fox hunts" where someone hid with a transmitter and several groups dashed around the locality trying to find him. Even swinging large directional antenna around it was not easy to get an accurate bearing, this became harder the closer you got to the transmitter. You have to do all this automatically with the arduino. I am not sure it can be done.
You could use an IR beacon at the center and three side looking IR detectors to tell you whether you are running true or need to turn to the left or right, kind of like the sun following logic on a solar panel. The problem of course is that there is nothing to maintain your ten foot range unless you also included some sort of sonar. The boat emits a sonic pulse which the device in the center hears and responds to. The boat then calculates the ping's round-trip time and derives a range.