Author Topic: Project.....need help......  (Read 2863 times)

0 Members and 1 Guest are viewing this topic.

Offline Biscuit1987Topic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Project.....need help......
« on: January 04, 2010, 07:04:23 PM »
Hey guys! I could really do with a hand on this.....
 
I am currently working on a project involving a radio controlled car. I am attaching 4 proximity sensors to the body shell (one on each corner), and I need to make it find its way back to the user when it goes out of range, with a built in override, so that the user can take control again rather than waiting for it to come all the way back.
I'm going to using a comparator to measure when the car gets out of range by measuring the signal, and am looking at incorporating an h-bridge circuit for controlling the motor, however I am quite new to coding....and could do with a hand! In fact....my coding is pretty poor to be honest! I could do with any help you guys can suggest, even if its as simple as any helpful links or websites you can suggest. Oh and i forgot to say....i have got to use c++ as this is the only type of coding i have any sort of experience in, (although i have done a little bit of assembly language as well). So yeah... help!!
Cheers!

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: Project.....need help......
« Reply #1 on: January 04, 2010, 07:35:29 PM »
Although using C++ is completely possible, I'd recommend learning C (since you say you aren't that experienced anyways)
Since you know C++ already, it should be a walk in the park to learn C. Just think of it as C++ without some extra features. (That you don't need for a robot anyways)
http://www.cprogramming.com/tutorial.html is a good all around tutorial, and there are plenty of robot based ones around SoR.

Also, please shoot for a more descriptive title next time, even something like "Need programming guidance" is much more informative.
« Last Edit: January 04, 2010, 07:36:46 PM by z.s.tar.gz »
Save yourself the typing. Just call me Zach.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: Project.....need help......
« Reply #2 on: January 04, 2010, 07:44:55 PM »
We would love to help, but you need to give us more details.

What car are you using?

what micro controller are you using?

My first guess to help you with this is you might need to add a GPS (assuming this is an outdoor car). Other then that how are you planing on the car knowing where it is related to where the operator is?

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: Project.....need help......
« Reply #3 on: January 04, 2010, 07:49:08 PM »
I'm going to using a comparator to measure when the car gets out of range by measuring the signal...
Sounds like he has a plan for that, as the absolute location relative to the operator is irrelevant, only the signal strength really matters. Once the car goes out of range, it can use very basic mapping software to go back to the operator.

As far as MCU's go, I recommend an AVR based one, preferably an atmega.
« Last Edit: January 04, 2010, 07:51:27 PM by z.s.tar.gz »
Save yourself the typing. Just call me Zach.

Offline rgcustodio

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 0
  • Use "Search" and ye might find answers!
Re: Project.....need help......
« Reply #4 on: January 04, 2010, 07:57:52 PM »
C++ can be used if he/she doesn't use classes, inheritance and other object-oriented hula-balu.
C++ without "OO" is just plain old C.

In software can do backtracking.
For GPS, save information about its location every x-seconds.
For non-GPS save information of direction (compass) and distance traveled (would need a wheel encoder).
Main issue is storage. If you're willing to limit the range of the robot to the number of points that can be saved then you can remove the comparator from the system.
The best thing one can do when it's raining is to let it rain. - H. W. Longfellow

understanding is the path to enlightenment

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: Project.....need help......
« Reply #5 on: January 04, 2010, 08:10:11 PM »
If storage is the issue, string a couple of these together.
It's a 1 megabit (125kb) which should be a lot of memory to mess around with.
Save yourself the typing. Just call me Zach.

Offline Biscuit1987Topic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: Project.....need help......
« Reply #6 on: January 04, 2010, 08:26:40 PM »
hey guys appreciate all the help coming in already! regarding the car im using it is just an old kyosho car which is running a scumacher matrix 12R speed controller (nicked from my cat 3000), which is just a standard run of the mill BEC speed controller i believe?
I was using the comaprator for the car to tell where it was in relation to the user, because this will just look at the signal strength, obviously to make it easy for me i was just going to run it until the signal gets below a certain signal strength and then it will take control, so that it is stil technically just within the range.
i'll be honest i never thought of using gps for the project....may have a think about that one.
oh and i also forgot to mention initially, i have to design any boards that need to be added to it lol (that is currently being researched at the moment, i should have sorted out how i am going to integrate everything in the next couple of days).

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: Project.....need help......
« Reply #7 on: January 04, 2010, 09:14:06 PM »
Sounds like he has a plan for that, as the absolute location relative to the operator is irrelevant, only the signal strength really matters. Once the car goes out of range, it can use very basic mapping software to go back to the operator.

As far as MCU's go, I recommend an AVR based one, preferably an atmega.

C++ can be used if he/she doesn't use classes, inheritance and other object-oriented hula-balu.
C++ without "OO" is just plain old C.

In software can do backtracking.
For GPS, save information about its location every x-seconds.
For non-GPS save information of direction (compass) and distance traveled (would need a wheel encoder).
Main issue is storage. If you're willing to limit the range of the robot to the number of points that can be saved then you can remove the comparator from the system.

Encoded wheels slip and no mapping software can make up for that fact. If you only rely on encoders, a compass and mapping software, the more time spent traveling, the larger the navigational error, the more 'lost' the robot becomes.

A $50 GPS and a NEMA C++ library and you can write a simple 'return to start coordinates' program when signal is lost.

It's also very hard to triangulate signal source with one antenna, and would require some pretty in depth code to drive the car around and compute source of a signal.

 


data_list