603,975 active members*
3,389 visitors online*
Register for free
Login
IndustryArena Forum > OpenSource CNC Design Center > Open Source Controller Boards > PIC Open source Servo Driver Schematics development?
Results 1 to 20 of 91

Hybrid View

Rossz PIC Open source Servo Driver... 03-10-2004, 06:33 PM
cncadmin Welcome to the site. 03-10-2004, 07:08 PM
tachus42 I have a half finished design... 07-19-2004, 06:29 AM
shahid Hi I am shahid from saudi... 03-30-2005, 05:18 PM
danadams Hi Yes, I woud be... 09-19-2006, 10:41 PM
fyffe555 the great thing about this... 07-19-2004, 03:08 PM
CNCAddict I'm very interested in a DIY... 07-19-2004, 05:54 PM
Ito-Brazil Amazing! I hope you be heare... 09-21-2004, 04:17 PM
CNCAddict Ito, whom where your comments... 09-22-2004, 07:08 AM
Greg Fill I too have been playing and... 07-19-2004, 06:00 PM
ESjaavik Greg: Yes, it's quite common... 07-19-2004, 10:16 PM
Greg Fill Thanks that makes sense ES. ... 07-19-2004, 11:28 PM
tachus42 Ok source code for my servo... 07-20-2004, 05:09 AM
CNCAddict tachus42, Do you want me... 07-20-2004, 06:11 AM
tachus42 David feel free to put it up... 07-20-2004, 07:49 AM
ESjaavik I've had the doubtful... 07-20-2004, 09:51 AM
tachus42 I used a Mega 162 for this... 07-20-2004, 12:45 PM
CNCAddict ok, it's all up on my webpage... 07-21-2004, 08:03 AM
gabrielus do you have any documentacion... 09-25-2005, 06:34 AM
ESjaavik Yes, and no. Let's say you... 07-20-2004, 09:29 AM
zekk_2 Hi There seems to be... 02-17-2005, 10:54 PM
zekk_2 Hi Einar Ref. your link to... 05-31-2005, 08:23 PM
tachus42 I must be one of the few... 07-21-2004, 02:26 PM
slp_prlzys I don't know if you guys have... 08-05-2004, 04:27 PM
CNCAddict tachus, Any updates? As... 09-12-2004, 04:11 AM
tachus42 Sorry for the low quality... 09-12-2004, 05:27 AM
CNCAddict WOW, thanx alot. I'll post... 09-15-2004, 10:50 PM
tachus42 You will need to place a... 09-16-2004, 04:36 AM
jfong tachus42, I'm a little bit... 09-16-2004, 03:18 PM
tachus42 I took the encoder polling... 09-16-2004, 03:58 PM
CNCAddict We are writing the entire... 09-17-2004, 12:08 AM
tachus42 Im not sure the motor sitting... 09-17-2004, 03:40 AM
CNCAddict I think you're right about... 09-18-2004, 07:27 AM
ESjaavik A schmitt trigger alone will... 09-18-2004, 09:37 AM
DragnsBane Just thought everyone would... 10-11-2004, 04:19 AM
ESjaavik Re: Encoder sitting... 10-11-2004, 10:29 AM
cncadmin Is that "fuzzy... 10-11-2004, 03:14 PM
ESjaavik @DragnsBane: That link just... 10-11-2004, 10:34 AM
DragnsBane sorry about that sometimes mt... 10-11-2004, 03:02 PM
sbrpollock I,m very impressed by this... 10-11-2004, 06:28 PM
tachus42 Patrick avrfreaks.net is a... 10-16-2004, 01:02 PM
heyarnold Recently DragnsBane asked if... 10-17-2004, 07:20 AM
ESjaavik @Paul: Actually I'm not sure... 10-17-2004, 09:41 AM
heyarnold Elm Smc 10-17-2004, 03:54 PM
ESjaavik What about the cost? Too high... 10-17-2004, 07:41 PM
cncadmin That's fine with me. 02-08-2005, 02:24 PM
lerman ATmega16 Seems Fast Enough to... 12-06-2004, 02:05 AM
Hardwarekill Here on this Link is an... 12-06-2004, 02:46 AM
ESjaavik @Hardwarekill: I have... 12-07-2004, 12:13 AM
ESjaavik @lerman: Did you consider... 12-07-2004, 12:51 AM
Hardwarekill @ESjaavik The Quellcode or... 12-07-2004, 03:57 AM
jshroff Hi do you know where I can... 03-31-2005, 02:33 PM
lerman Why I Would Not Use Counters 12-09-2004, 02:41 AM
mmjpotter Some interesting ideas on... 06-01-2005, 12:36 AM
mmjpotter I appreciate that this thread... 06-01-2005, 03:20 PM
Vider If it is usefull, here you... 03-31-2005, 02:55 PM
James Newton 1. The source of the step and... 06-01-2005, 06:10 PM
mmjpotter Thanks James. I think you... 06-01-2005, 08:58 PM
James Newton "Why design a servo driver... 06-01-2005, 09:16 PM
Mariss Freimanis Its the old "chicken or egg"... 06-02-2005, 01:03 AM
SimonArthur James: What does the... 07-06-2005, 05:56 AM
Vider Dear friends: As I see... 07-06-2005, 07:47 AM
slp_prlzys Trajectory generator? 08-03-2005, 03:56 PM
smarbaga tachus42 can u convert your... 09-24-2005, 03:03 AM
smarbaga spl the trapeziod must be... 09-24-2005, 03:25 AM
dirk c Hi to everybody, I picked up... 10-02-2005, 08:43 AM
smarbaga show me the schematic ro a... 10-02-2005, 11:37 AM
Luslugger http://www4.ncsu.edu/~dsbloomf... 10-08-2006, 02:40 AM
venomx999 I have these DC servo motors... 03-06-2007, 05:51 PM
zoltan It is $100 each? Are you... 03-06-2007, 08:59 PM
spotlite Hi, I think I have easy... 11-19-2007, 09:33 PM
pongthep Very Good post for knowledge 01-12-2008, 02:23 AM
agelkom I made a single side PCB for... 01-28-2008, 01:22 PM
James Newton Are you willing to share that... 01-28-2008, 11:00 PM
agelkom Linistepper PCB 01-29-2008, 03:00 PM
astal thanks 07-25-2009, 02:58 AM
agelkom Linistepper Lini8 PCB 02-01-2008, 01:18 PM
agelkom Hi, Here is the PCB copper... 02-06-2008, 10:34 AM
RRR Hi Argun, It's very... 02-17-2008, 04:05 PM
tady tachus42 coud you please post... 02-16-2008, 10:32 PM
agelkom Linistepper New Board 02-18-2008, 03:36 PM
agelkom Linistepper Lini8 New PCB 02-21-2008, 01:15 PM
RRR Hi Argun, Some components... 02-22-2008, 12:03 AM
agelkom components for lini8 02-22-2008, 12:23 PM
Tariq Assar Hi, Lini8 charge-pump... 10-26-2011, 09:37 PM
Tariq Assar Hi, Lini8 charge-pump... 10-26-2011, 09:37 PM
brave1brave Hi to community :) (this is... 04-03-2009, 11:23 AM
pieroandreini Hi, just redrawn schematic... 03-20-2011, 02:23 PM
berin So is this a servo driver or... 10-07-2011, 05:23 PM
James Newton berin, you are absolutely... 10-07-2011, 05:47 PM
  1. #1
    Join Date
    Apr 2004
    Posts
    678
    Greg: Yes, it's quite common that servo drives take step/dir input. All I have does that. Internally it counts the desired-position value up/down based on step/dir. This means the drive must do the torque, velocity and position loops computations internally. With a voltage input drive often doing just the first or the two first.

    And the step/dir servo can take pulses at high speeds. If the motor is not able to follow, it will not loose the end position. It will just loose position on parts of it's journey there. Not like a real stepper where a lost step will never be regained. (Unless by chance it looses the same number of steps going in the other direction.)

    Here is a simple approach to the main components, except step/dir input: http://elm-chan.org/works/smc/report_e.html

  2. #2
    Join Date
    Mar 2004
    Posts
    37
    Thanks that makes sense ES. The motor will resolve its final position based on commanded number of steps, direction and the encoder feedback. I guess there is probably no need to set an acceleration profile in the computer front end, you just feed the step pulses as fast as the controller can accept. In my case probably only 80 KHz or 160 kHz. So to say it another way the controller uses the constantly arriving step pulses to dynamically set a position to reach and uses the PID algorithm to get there. Is there any type of feedback the controllers and PCs use so that the front end controller will stop sending step pulses until the commanded position is reached?

    ie goto x = 3, y = 2 then wait until it gets there before sending x = 4, y = 1

    I will read the document you mentioned.

  3. #3
    Join Date
    Apr 2004
    Posts
    169
    Ok source code for my servo controller in the attached file.
    It's probably not very clear whats going on at a first look - i didn't comment the code with other viewers in mind. Basically all the important stuff is handled by the interupt handlers at the top of pid.c. The SIG_OVERFLOW0 handler gets excuted at a 40kHz rate and reads the encoders and updates a 8 bit postion.
    The SIG_OVERFLOW2 handler runs at 400 Hz or every 2.5ms and transfers the 8 bit encoder and target counts into their 32 bit equivalents and then calls DoPID where the PID algorythm takes place and the PWM drive to the motors is updated.

    The SIG_INTERRUPT0-2 interrupts are excuted on the falling edge of a step pulse and read the corresponding direction input and update 8 bit target postion.

    The rest of the code Initialises the timers and Interrupts etc and Drives the LCD reads the keypad does the menu etc.
    Attached Files Attached Files

  4. #4
    Join Date
    Jun 2003
    Posts
    125
    tachus42,
    Do you want me to put this on my webpage so it can be referred to more easily? I am trying to learn as much as I can about AVR's, and this looks like a fun project.

    David B.

    www4.ncsu.edu/~dsbloomf

  5. #5
    Join Date
    Apr 2004
    Posts
    169
    David feel free to put it up on page jusr credit me, Stephen Dredge ( not that i think the code is that worthy)
    The code was compiled with the gcc-avr http://winavr.sourceforge.net/
    And I use pony prog to program the avr http://www.lancos.com/prog.htm with the (STK200/300) parallel port interface descibed on the pony prog page.
    The LCD Port will connect to a standard 2 * 16 LCD with a ribbon cable and the keypad is a 4*4 matrix.

  6. #6
    Join Date
    Apr 2004
    Posts
    678
    Quote Originally Posted by tachus42
    It's probably not very clear whats going on at a first look - i didn't comment the code with other viewers in mind.
    I've had the doubtful pleasure of reopening my own code years later. That taught me to try to comment for other viewers. :frown:
    You might say I'm not the same as I used to be.

    Thanks for sharing the code. What device do you use?
    Myself I have a fairly full setup for older AVR's (STK500 + ICE200). But the only design that came past the qty. one breadboard stage was with ATtiny15 where the ICE will do nothing.

    Would it be possible to see the schematics in .PDF .GIF or some other easily viewable format?

  7. #7
    Join Date
    Apr 2004
    Posts
    169
    I used a Mega 162 for this design.

    Jpg's attached the schematic's aren't very clear but enough to give the idea, If you want a closer look google for and grab eagle - there is a free version that has become a bit of a defacto standard.

    I think that stepper emulation is the only sensible way to make a roll your own servo controller unless you really want to be a smarty pants. A modern pc is going to be able to a much better job of motion control than a puny microcontroller can.
    Attached Thumbnails Attached Thumbnails controller layout.jpg   controller schematic.jpg   driver layout.jpg   driver schematic.jpg  


  8. #8
    Join Date
    Jun 2003
    Posts
    125
    ok, it's all up on my webpage now for easy viewing. Tachus, if you have any pictures of your assembled board it would really help out. Right now the page looks pretty anemic

    http://www4.ncsu.edu/~dsbloomf/Steve...vo%20Drive.htm

  9. #9
    Join Date
    Oct 2004
    Posts
    1
    do you have any documentacion about this hardware?
    and what is the software can i use with this hardware?

  10. #10
    Join Date
    Apr 2004
    Posts
    678
    Quote Originally Posted by Greg Fill
    Thanks that makes sense ES. The motor will resolve its final position based on commanded number of steps, direction and the encoder feedback. I guess there is probably no need to set an acceleration profile in the computer front end, you just feed the step pulses as fast as the controller can accept.
    Yes, and no. Let's say you want to mill a large circle. Then you feed in all the pulses as fast as possible. The motors will start out in the right direction. But very soon the 'puter will be done feeding in all the pulses and the desired position will again be where it started. But the slow motors/mechanics will all the time try to move towards the desired position. So you will not get a circle, but just a small doodle.
    That's the "no". You need to wait out at least some of each incremental movement.
    The "yes" is that each incremental movement can be pulsed out as fast as your controller can receive them. As the pulses are not used to control the motor, there is little constraint in the timing. This makes it possible to put less realtime constraints on the PC doing the machine control task. It can output a bunch of pulses in succession, and do other computational tasks interrupting the pulse stream.
    Quote Originally Posted by Greg Fill
    In my case probably only 80 KHz or 160 kHz. So to say it another way the controller uses the constantly arriving step pulses to dynamically set a position to reach and uses the PID algorithm to get there. Is there any type of feedback the controllers and PCs use so that the front end controller will stop sending step pulses until the commanded position is reached?

    ie goto x = 3, y = 2 then wait until it gets there before sending x = 4, y = 1
    The feedback is up to you when you design the drive. You can implement a "move done" as a status output to the PC. But I use them in stepper-emulating mode. That means the PC thinks it feeds a stepper drive. And it calculates each move as for a stepper. But as I wrote, without the timing constraints down to the spacing of each step pulse. If using a move-done output on the drive, the control software must handle this. I don't know about others, but neither EMC nor Mach2 does this.

    One output you should have is a following error output. The drive knows the commanded and the current position. When the difference is greater than a configurable amount, you output a following error. The PC would typically use this as a fault input. It could mean that your axis have met a solid object along the path that should not have been there. Some following error must be allowed, as a PID loop with no error is an infinite improbability.

  11. #11
    Join Date
    Feb 2005
    Posts
    11
    Hi
    There seems to be somthing missing from this cirut. Where is the 4 X Zenadiodes hooked up to??(left of 4 X U3)?
    regards
    Zekk_2

  12. #12
    Join Date
    Feb 2005
    Posts
    11
    Quote Originally Posted by ESjaavik
    Greg: Yes, it's quite common that servo drives take step/dir input. All I have does that. Internally it counts the desired-position value up/down based on step/dir. This means the drive must do the torque, velocity and position loops computations internally. With a voltage input drive often doing just the first or the two first.

    And the step/dir servo can take pulses at high speeds. If the motor is not able to follow, it will not loose the end position. It will just loose position on parts of it's journey there. Not like a real stepper where a lost step will never be regained. (Unless by chance it looses the same number of steps going in the other direction.)

    Here is a simple approach to the main components, except step/dir input: http://elm-chan.org/works/smc/report_e.html
    Hi Einar
    Ref. your link to :Here is a simple approach to the main components, except step/dir input: http://elm-chan.org/works/smc/report_e.html

    Can you download the software that is posted on http://elm-chan.org/works/smc/report_e.html via the serial I/F on the schematic, or do you need a separat burner to download the software??
    Regards
    Zekk_2

Similar Threads

  1. Open Source Driver electronics
    By pminmo in forum DIY CNC Router Table Machines
    Replies: 1
    Last Post: 11-22-2009, 09:42 PM
  2. Any ideas for open source CAM package?
    By galacticroot in forum OpenSource Software
    Replies: 26
    Last Post: 10-22-2007, 05:35 PM
  3. Open Source CNC Controller Specification
    By gregmary in forum DIY CNC Router Table Machines
    Replies: 28
    Last Post: 12-05-2005, 04:58 AM
  4. 2nd Generation DeskCNC servo driver released
    By imserv in forum News Announcements
    Replies: 0
    Last Post: 11-25-2004, 01:22 AM
  5. Open source driver designs
    By pminmo in forum CNC Machine Related Electronics
    Replies: 0
    Last Post: 05-05-2004, 03:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •