Go Down

Topic: Arduino Pro Mini and a Trolley (Read 1 time) previous topic - next topic

electric_AL

Oct 18, 2011, 03:50 am Last Edit: Oct 19, 2011, 01:54 am by electric_AL Reason: 1
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


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!

wildbill

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

AWOL

When is our assignment due to be handed in?
"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.

electric_AL

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 XD .
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!

floresta

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

electric_AL

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.
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!

electric_AL

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!

wildbill

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.

electric_AL

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
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!

Go Up