Pages: [1]   Go Down
Author Topic: Arduino Pro Mini and a Trolley  (Read 1547 times)
0 Members and 1 Guest are viewing this topic.
New York
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Ignorance is curable with education. Stupidity is refusing to be educated.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greetings All:

May I ask your collective assistance in writing the code for a project I am working on.  Thank you in advance.
I will be using the Arduino-Pro-Mini to control a continuous rotation  RC servo of a RC speed control for locomotion and a few range finder sensors.

Imagine a Trolly on 10feet of track with physical stops on each end.  


Start up: The trolley will drive 2 feet stop and return to start, slowing down as it approaches the end stop, then drive 4 feet and the same return process and then 6,8 until it reaches the end (stop).  Then it reverses and do the same from the opposite end. 2ft return, 4ft return, 6ft return, 8ft return, at  (start) it starts all over again and continue running until it is turned off.  I am using an Arduino 2560 for code testing but I have nothing to represent my progress.

components:
Trolly
Ultrasonic Range Finder
Arduino Pro Mini
RC CR Servo or Speed controll
6v dc power supply




* monkey 2.JPG (21.98 KB, 821x356 - viewed 51 times.)
« Last Edit: October 18, 2011, 06:54:29 pm by electric_AL » Logged

Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming

WOW!!!   What a Ride!

New Jersey
Offline Offline
Faraday Member
**
Karma: 65
Posts: 3639
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What have you managed to make your hardware do so far?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25874
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When is our assignment due to be handed in?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

New York
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Ignorance is curable with education. Stupidity is refusing to be educated.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi and thanks.  First, my fat thumbs typo corrections.  RC servo or a RC speed control for locomotion.  I have been working on an AeroQuad for a while and was able to make everything function as expected.  But that was easy as I didn't learn anything on writing code with it.  I have nothing, as far as code is concerned written. I am an admitted rc addict and can make anything radio controlled. This project is due as soon as I can finish it.  My son donated a small rc car for the test platform smiley-lol .
Logged

Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming

WOW!!!   What a Ride!

Western New York, USA
Online Online
Faraday Member
**
Karma: 32
Posts: 4259
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
My son donated a small rc car for the test platform

Can you replace it's motor with a stepper motor?  That would simplify things a lot.

I think you are modeling a troll
ey.

Don
Logged

New York
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Ignorance is curable with education. Stupidity is refusing to be educated.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oops, cant blame that one on the fat thumb.  A stepper can be used instead of the servo.  I do have one on hand, removed from a printer.
Logged

Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming

WOW!!!   What a Ride!

New York
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Ignorance is curable with education. Stupidity is refusing to be educated.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any ideas?
Logged

Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming

WOW!!!   What a Ride!

New Jersey
Offline Offline
Faraday Member
**
Karma: 65
Posts: 3639
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you can get the stepper working, you can solve the whole thing using it by dead reckoning, i.e. assuming that the stepper did what you asked it. You can add sensors to make it more certain, but the stepper will get you going. Can you salvage the stepper controller from the board? if not, make or buy one e.g http://www.sparkfun.com/products/10267 and you're in business.
Logged

New York
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Ignorance is curable with education. Stupidity is refusing to be educated.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All,  I have changed the sensors to these little guys from Pololu. 

I will post my rendition of the code for the  collective to chime in on.
thanks


* 0J1178.600.jpg (45.79 KB, 600x533 - viewed 17 times.)
Logged

Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming

WOW!!!   What a Ride!

Pages: [1]   Go Up
Jump to: