Servos

Madman

Registered
Country flag
I would like to learn the correct way to control servos. At present, I have a small LGB tool car that uses a reworked servo to open and close the door. By reworked, I mean that I rewired the servo to allow reversing polarity from AA batteries to reverse the servo. It works rather well, but I know that servos are supposed to be operated in some other manner. I may be wrong but operating them the way I do, could cause damage to the servo. Here is a very short video of the operation.

http://youtu.be/VMjU2rJFf5A
 
Hmmm. Gives me an idea for a guard looking out as the train passes a signal box..

Might have to get Greg involved with a Picaxe!
 
PhilP said:
Hmmm. Gives me an idea for a guard looking out as the train passes a signal box..

Might have to get Greg involved with a Picaxe!
That was going to be my suggestion. A Picaxe circuit would do all the controlling you need. Really easy learning-curve to do the sort of controlling which you'll need for that sort of application. Here's a basic tutorial which would get you started - you can then always seek advice from Greg et al. As you can see from the tutorial - very little electronics involved and the programming is pretty straightforward once you get the hang of it. The beauty is that you can tailor the program to suit any type of control you need.
http://picaxe.hobbizine.com/servo.html

Rik
 
Thanks. I'm going to study the documents. Will be back with ???? I'm sure.
 
If you're interested in trying Picaxe, you could start here:

http://www.trainweb.org/SaTR/Picaxe tutes.htm

and look at tutorial 4.


or use one of these.
http://www.hobbyking.com/hobbyking/store/__17143__Simple_Servo_Tester.html
 
If you are interested in the Atmel series (ardunio, etc) I've written some servo code in C and C++ for the Attiny 1634. It should work with most Atmel processors that have a 16 bit timer. You can find the source code on the 'files' page of http://controlwidgets.com/

It drives four servos but it wouldn't be hard to do more. It's just a simple state machine but it works well. It will build with Ardunio or the free Atmel Studio 6.
 
Back
Top Bottom