Timed Servo Control for Computer Programmers

In summary, timed servo control is a method used by computer programmers to control and manipulate servo motors in a precise and timed manner. This technique involves setting specific intervals of time for the servo motor to move to a designated position. This allows for more accurate and controlled movements, making it a valuable tool for tasks such as robotic automation and mechanical engineering. Timed servo control is often implemented through programming languages and can be used in a variety of industries, from manufacturing to robotics to gaming. It requires a strong understanding of coding and electronics to effectively utilize this technique.
  • #1
vbsaltydog
14
0
I am a computer programmer and not an electrical engineer so please pardon my ignorance in your field. I am interested in turning a knob 5 times per day, the fifth turn is for returning to the neutral position at the end of the day using a servo (unless you know of another method).

I basically want to set a programmable timing device capable of 5 settings in a 24 hour period (alarm clock maybe?) that will deliver the correct voltage and pulse length(s) to a servo and cause the servo to turn x number of degrees at each time setting. The fifth setting returning the servo to the neutral position.

Any ideas how I can achieve this? It is meant to turn a small knob on an electronic ballast for a set of lights to simulate the phases of sunlight throughout the day without opening the ballast and messing with the internal circuitry.

Thank you.
 
Engineering news on Phys.org
  • #2
As a computer programmer, you might enjoy getting used to microcontrollers.

Depending on your background, you can get different chips that are programmed in C or Basic and then the chip can use a large library of built-in tools to control its many inputs or outputs. The Picaxe has a "debug ' command and this feeds information back to the computer while the program is running, so you can easily find programming errors.

I have used the Picaxe chips and like them, but there are others like Arduino and Stamp.

Have a look at this:
https://www.physicsforums.com/showpost.php?p=2521600&postcount=6

This link gives more info about these chips and some programming examples.
http://www.picaxe.orconhosting.net.nz/

Or do a search on this Forum for "Picaxe". There have been a lot of articles about them and I have posted a few of those.

Doing this with a micro would allow you to make changes to the servo setting each second during the day if you like.

If you used incandescent lamps, you could skip the servo and control the lights with pulse width modulation from the micro.
 
Last edited by a moderator:
  • #3
Perfect. Thank you.
 
  • #4
I have read about picaxe and microcontrollers in regard to servo control and it seems like a good fit however, I don't work with breadboards and electrical circuits so I don't know how to mount the picaxe chip, power it, wire the servo, etc.

Is there a kit that has the power supply, circuit board with picaxe wired, compatible servo, etc that I can buy? Then use the picaxe programmer software and cable to program the picaxe chip to control the servo?

Thank you.
 
  • #5
vk6kro might have a better suggestion but this http://www.apogeekits.com/pic_programmer_vm111.htm" is pre-assembled.

Edit: For a power supply, a simple "wall wort" like this one will work.
http://www.apogeekits.com/12vdc_adapter.htm"
 
Last edited by a moderator:
  • #6
dlgoff said:
vk6kro might have a better suggestion but this http://www.apogeekits.com/pic_programmer_vm111.htm" is pre-assembled.

Edit: For a power supply, a simple "wall wort" like this one will work.
http://www.apogeekits.com/12vdc_adapter.htm"

The experiment board does not have a servo integrated and does not use picaxe so the cost is too high given my project and considering the fact that I still have to obtain and wire up the servo.

The ac to 12v dc converter is helpful but I thought I read that picaxe runs at 6v and that anything higher would burn the chip. I assume that if that is true and I used the ac to 12v dc converter that I would have to use a resistor on the board to step the 12v down to 6v before it gets to the picaxe chip? Please keep in mind that I am not an electrical engineer and do not know about resistors/transistors/capacitors/relays in any detail.

All I am looking for is an actuator that can be set to mechanically turn a knob x degrees a few times a day and since I am a computer programmer, it was suggested to use a microcontroller.

I have read and I do understand the logic behind setting the microprocessor to send x voltage for x seconds on output pin x to the servo to change the servo position and if I am using the picaxe servo command to do this, picaxe will also send the pulse commands to keep the servo in the last command position until a new command is sent or until the program exits. This is easy for me to grasp and works for my project. My issue is that I can't read electrical diagrams or build the board so I need a board that can:

(1) take 12v dc and step it down to the input voltage for picaxe.
(2) have a usb interface so I can program the picaxe chip.
(3) have a single servo integrated that has an output lead from picaxe going to the servo control lead.

Thats really all that I need and I should be able to tell picaxe to:

(1) send x voltage for x seconds on pin x to the servo control and reposition the servo.
(2) hold the servo there while pausing for x seconds.
(3) after x seconds, send y voltage for y seconds on pin x to the servo control and reposition the servo.
(4) hold the servo there while pausing for y seconds.

... you get the idea.

I don't need programming or concept help at this point. I just need the assembled hardware.

Any ideas where to get this hardware? I can assemble something as long as i have a complete list of parts and a wiring diagram that is written for a layman vs an electrical schematic. Something that says put part 1 in the breadboard in pins 380 and 382.
 
Last edited by a moderator:
  • #7
Any ideas where to get this hardware? I can assemble something as long as i have a complete list of parts and a wiring diagram that is written for a layman vs an electrical schematic. Something that says put part 1 in the breadboard in pins 380 and 382.

Have a look at this:
http://dl.dropbox.com/u/4222062/Picaxe%2014.PNG

These are very simple circuits. All you need is some way to anchor the parts so they don't short circuit to each other.
Mostly, you can just lay the circuit out exactly like the schematic.

If you make up a circuit it only takes a couple of resistors to make it programmable. So, you would just have a small cable going to the serial port of a computer and you could change the operation whenever you like. If you do this, you can even solder the chip into the circuit and leave it there. It can still be reprogrammed.
 
Last edited by a moderator:

1. What is timed servo control?

Timed servo control is a method of controlling a servo motor, which is a type of motor that can rotate to specific positions based on electrical signals. In this method, the servo motor is controlled by a computer program that sends pulses of varying widths to the motor, allowing it to rotate to specific positions.

2. How does timed servo control work?

In timed servo control, a computer program sends a series of electrical pulses to the servo motor. The width of these pulses determines the position that the motor will rotate to. By varying the width of the pulses, the computer program can control the precise position of the servo motor.

3. What are the benefits of using timed servo control?

Timed servo control allows for precise control of servo motors, making it useful in applications where accuracy is important, such as robotics, automation, and manufacturing. It also allows for smooth and precise movement of the servo motor, making it ideal for applications that require precise positioning.

4. What type of computer programming is needed for timed servo control?

Timed servo control can be achieved using a variety of programming languages, including C++, Python, and Java. Most programming languages have libraries or modules that allow for easy control of servo motors, making it accessible to computer programmers of all levels.

5. Can timed servo control be used for multiple servo motors?

Yes, timed servo control can be used for multiple servo motors. Each servo motor will require its own set of electrical pulses and can be controlled independently by the computer program. This allows for the control of multiple servo motors simultaneously, making it useful in applications that require coordinated movement of multiple motors.

Similar threads

  • Electrical Engineering
Replies
5
Views
3K
  • Electrical Engineering
Replies
10
Views
868
  • Sci-Fi Writing and World Building
Replies
13
Views
1K
  • Programming and Computer Science
Replies
29
Views
3K
  • Feedback and Announcements
Replies
21
Views
2K
  • Biology and Medical
9
Replies
287
Views
19K
Replies
10
Views
2K
Replies
13
Views
2K
  • Science Fiction and Fantasy Media
Replies
13
Views
1K
  • Sci-Fi Writing and World Building
Replies
2
Views
2K
Back
Top