Timed Servo Control for Computer Programmers

  • Thread starter Thread starter vbsaltydog
  • Start date Start date
  • Tags Tags
    Control Servo
AI Thread Summary
The discussion focuses on using a microcontroller, specifically the Picaxe, to control a servo for turning a knob on an electronic ballast five times a day, simulating sunlight phases. The user seeks a pre-assembled kit that includes a power supply, a Picaxe board, and a compatible servo, as they lack experience with electrical circuits and breadboards. There are suggestions for using a simple wall adapter for power and the importance of stepping down voltage to prevent damaging the Picaxe chip. The user emphasizes the need for clear instructions and a layman-friendly wiring diagram to facilitate assembly. Overall, the conversation highlights the intersection of programming and basic electronics for practical applications.
vbsaltydog
Messages
14
Reaction score
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
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:
Perfect. Thank you.
 
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.
 
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:
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:
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:

Similar threads

Replies
5
Views
4K
Replies
10
Views
2K
Replies
13
Views
2K
Replies
21
Views
2K
Replies
1
Views
3K
Replies
287
Views
25K
Replies
5
Views
3K
Replies
13
Views
2K
Back
Top