09-18-2007, 01:22 PM
|
|
Linear servos?
Hello gang,
New member here. Have been admiring TTTT and other 1:87 scale RC/IR models for a few years now. Finally made a decision to make a start. For the first project I want to make my own micro servo. I know I can manage to construct the mechanical parts, but the electrics are worse.
My question is; how does the servo selfcenter and how is this system constructed?
Thanks for helping a newbe out!
|
09-19-2007, 04:14 AM
|
|
Registered User
|
|
Join Date: Nov 2006
Location: 3rd planet, tiny solar system
Posts: 24
|
|
Quote:
...My question is; how does the servo selfcenter and how is this system constructed?
...
|
Hi Edblad,
servos use a feedback mechanism, comparing the desired position (usually derived from a PWM signal [1-2ms pulses every 20ms]) with the actual position. In most standard RC servos, a potentiometer connected to the drive shaft senses the actual position. Some of the basics are explained here:
http://www.geocities.com/bourbonstre...rvobasics.html
Instead of a pot for position sensing, many alternatives are possible: Hall sensors (linear sensors or digital ones [together with a magnet on one of the shafts driving the gear; the microcontroller calculates the actual position by taking the gear ratio into account]), optical sensors, etc.
I have built my own (digital) servos (using optical and Hall sensors) for special applications. In many cases, you can trim down the case of a commercial microservo so that it fits into a 1/87 scale model.
Another very helpful source of information is the open servo project:
http://www.openservo.com/
All the best,
Fred
Last edited by Fred; 09-19-2007 at 07:25 AM.
|
09-19-2007, 11:04 AM
|
|
Hello Fred,
If I understand it correctly, the microcontroller counts how far (number of rotations of the axle) the servo horn travels when the transmitter stick is set back to the center position and then run the motor in the other direction for equal number of rotations, so that the servo horn ends up in the center again.
I've no experience what so ever about PIC-programming so I got some reading to do. What kind of info does the microcontroller need and how to put it into a code?
Regards and many thanks,
Alexander
|
09-19-2007, 12:14 PM
|
|
Registered User
|
|
Join Date: Nov 2006
Location: 3rd planet, tiny solar system
Posts: 24
|
|
Hi Edblad,
servos with switch type Hall sensors (the ones that can be used to count each shaft rotation) are tricky in terms of centering, unless you store the absolute position (as it relates to number of rotations). An alternative is to provide stops (at each end of the servos's travel). When the servo is powered up and the microcontroller goes through its initialization, it lets the servo run to both stops, keeping track of the position of each stop and defining the center as a certain position (e.g. 50%) between both stops.
There are many microcontroller families. I personally use the Atmel AVR family, many people prefer other tyes, e.g. PIC controllers. Google will help you find everything you need to know about programming these devices (use search terms such as "introduction microcontrollers" or "microcontroller tutorial", optionally adding the name of the controller family). Free development software and easy programmability (DIY interface to a parallel port or similar) are advantages, but not essential.
Writing servo software is probably quite challenging as a first microcontroller project and may end up in frustration. To get started, a more straightforward projects may be preferable (such as writing software to control the lights of a micromodel; adding flashing lights etc. makes for some interesting programming; you can later use the routines that analyze the RC signal for a servo project). Learning from the open servo project may be the next logical step.
All the best,
Fred
|
09-19-2007, 01:27 PM
|
Registered User
|
|
Join Date: Feb 2005
Posts: 40
|
|
If you are building a linear servo, can you not use a linear potentiometer such as the one listed in the following link directly at the output to measure the position?
http://www.panasonic.com/industrial/...OL0000CE13.pdf
For example, the 9mm stroke type has an overall dimension of 9mm X 16mm, not really tiny, but you might be able to reduce it even further by trimming it. What might be good is that you may not have to build any circuit, instead you might be able to use the circuit from any existing servo provided the resistance the linear potentiometer matches that of the pot in the servo.
Following along what Fred mentioned, if you chose to use switch type of sensors, can you use a sensor at the center as well? That way you can take the guess work out of the equation, and use the sensor to determine the center.
By the way Fred, did you use any sensor at all for you wheel loader steering mechanism? How does the model drive if the motor drives an open loop system with the operator acting as the feedback? I can understand why closed loop systems are better for larger models, but I am interested to know how such a system works at these scales.
|
09-20-2007, 02:36 AM
|
|
Registered User
|
|
Join Date: Nov 2006
Location: 3rd planet, tiny solar system
Posts: 24
|
|
Quote:
Originally Posted by kalkurap
...use a linear potentiometer such as the one listed in the following link directly at the output to measure the position?
|
Hello Prasanna,
you are certainly right. Here are some commercial servos (top 3 on this page) where linear pots were used in micro servos:
http://www.wes-technik.de/English/light_ng.htm
Quote:
... can you use a sensor at the center as well? That way you can take the guess work out of the equation, and use the sensor to determine the center.
|
That is certainly right, sometimes you may just not have sufficient room available when you try to build a real tiny servo.
Quote:
By the way Fred, did you use any sensor at all for you wheel loader steering mechanism? How does the model drive if the motor drives an open loop system with the operator acting as the feedback?...
|
It turned out that the stepper motor I am using for the steering mechanism is strong enough. It is not missing any steps. Therefore, the microcontroller can simply count steps to identify the center position.
Warm regards,
Fred
|
09-23-2007, 05:12 PM
|
|
Thanks for your help!
Now I realise how much work it is getting the servo working. In the meantime I've found another option; the muscle-wire servo. Is there anyone who have any experience with these?
Regards,
Edblad
|
09-25-2007, 11:28 PM
|
|
Thanks a lot! This servo/actuator would be perfect. 33 positions sounds pretty acurate, at least for steering. Just have to learn PIC- programming now... The code is available at the page but have no clue how to put it in the chip.
|
09-26-2007, 11:50 AM
|
Registered User
|
|
Join Date: Feb 2005
Posts: 40
|
|
You are right, the code is available on that site, but is in .hex format. That is fine if you want to program it in to your chip, but if you want to make any changes or use a different chip you might need to do more work on that such as converting it back to assembly.
It will be interesting to know how much torque an actuator like this one has.
As far as programming the chip goes, the fastest way probably is to contact someone who has a PIC programmer and ask them to program it for you. I could have done it for you, but I am in the states and I do not know if the trouble of shipping it from here is worth it. Let me know if you are interested, I will be glad to help.
|
09-26-2007, 12:45 PM
|
|
Great thanks for your offer! Is there much trouble learning programming? Maybe I could solder up the interface to start with and then learn about the actual programming. I guess it's much more work invold than just "copy and paste" the code?
Yes, it would be interesting to know how much torque it will produce, especially before the work is started. But, the aerodynamic forces acting on the rudder, which the actuator must overcome, can't be less than needed for the steering of a 1:87 car, I think.
|
09-26-2007, 03:23 PM
|
Registered User
|
|
Join Date: Feb 2005
Posts: 40
|
|
Programming isn't all that difficult, especially the PICs. Any prior experience with programming such as microcontrollers, microprocessors or even 'C' etc makes it even easier. It is logical and fun, hence anyone with enough interest should be able to tackle it.
Provided you have the programmer set up and are using the exact same chip as mentioned in the original article, then programming the chip is as easy as "copy and paste". But that isn't often the case, and that is why you might be required to know how to write the program yourself.
For example, Mr. Koichi's circuit uses the chip PIC12C509A which is an EPROM based device meaning it can be programmed only once. I prefer devices such as 12F625 which are EEPROM based, and can be re-programmed. Even though these chips are very much similar to each other, the hex file generated for 12C509 may not work on 12F625 without some minor modifications. In an ideal situation, you will need to have the source code of the program in assembly language (.ASM file as opposed to .HEX file), make a few changes as required and generate your own .hex file.
If you have the slighest interest in programming these chips, there is absolutely no reason for not doing it.
|
09-26-2007, 11:27 PM
|
|
When you put it this way it really sounds possible. I've always wanted to learn PIC-programming and build my own IR TX and RX, maybe I'm getting closer to my goal.
I made a search for the chip that you mentioned but it seems that it can't be found here in Sweden. The other one is available though. And cheap too, so if one or another fails I can always try a new one.
Do you know where I can find a layout for an interface?
Thanks for helping me out!
|
09-27-2007, 09:27 AM
|
Registered User
|
|
Join Date: Feb 2005
Posts: 40
|
|
Alexander,
I am not familier with the current generation of DIY PIC programmers. I did build one long time ago, but have been using programmers sold by Microchip for many years.
Having said that, there are a couple of things you need to keep in mind before you start. First thing is you need is a software which allows you to write the code, assemble it and simulate it on the PC. MPLAB IDE is probabaly the best one out there and you can download it from here:
http://www.microchip.com/stellent/id...&part=SW007002
Next, you will need a programmer. I have found several sites that show circuit diagrams of easy to build programmers. In my opinion it is better to go with a serial (RS-232) programmer as RS-232 can be still found on laptops etc. When you build your pgorammer you will have to choose the right type of socket for the PIC that you are going to program. For DIP packages ZIF sockets work well (although a bit expensive). For SMD devices you might need to make your own socket as some people have done (for example, look at Mr. Koichi's site). If you are doing in circuit programming, then you might need to make a pig tail connection. Here are some of the programmers:
http://www.jdm.homepage.dk/newpic.htm
http://www.myke.com/elcheapo.htm
And finally you need a program that can download the code you have written into the programmer. Assuming that you are using Windows, the following might be a good choice:
http://freenet-homepage.de/dl4yhf/winpicpr.html
It is mentioned in that site that is software works with the above mentioned programmers and doesn't need any additional drivers.
Hope this helps,
Prasanna.
|
09-29-2007, 02:28 PM
|
|
Thanks for the links. Before starting with the servo I'll start with a simpler project. Instead of creating a new thread I ask here. What I had in mind is a circuit connected to a radio receiver that allows you to control a couple of LEDs (only one channel, on and off function). Anyone who knows how it can be done?
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:55 PM.
|
|