dsPic-Servo

Page 1 of 9 1234 ... LastLast
Results 1 to 20 of 172

Thread: dsPic-Servo

  1. #1
    Registered slp_prlzys's Avatar
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    222
    Downloads
    0
    Uploads
    0

    Default dsPic-Servo

    It's been a while since my last post.

    Here, as if there's not enough projects here to keep some of us busy.
    I found this http://members.shaw.ca/swstuff/dspic-servo.html
    haven't tried it yet tho, doing something else for the moment.

    If any1 ever build this please post result.

    Similar Threads:
    mhel
    "This is intentionally left blank."


  2. #2
    Registered
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    45
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by slp_prlzys View Post
    It's been a while since my last post.

    Here, as if there's not enough projects here to keep some of us busy.
    I found this http://members.shaw.ca/swstuff/dspic-servo.html
    haven't tried it yet tho, doing something else for the moment.

    If any1 ever build this please post result.
    I have 2 of these running the X and Y on my cnc router.



  3. #3
    Registered
    Join Date
    Dec 2007
    Location
    tr
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default

    thanksss



  4. #4
    Registered
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    45
    Downloads
    0
    Uploads
    0

    Default Further Development on this project.

    There is some further development on this project under way.

    I have a working prototype of a higher current version that uses two op-amps in parallel to increase the current capacity of the drive.

    I have some larger motors that I would like to use that require more current than a single op-amp can provide.

    Also, I am building a version that uses two op-amps as an H-Bridge to give me higher voltage capability. Hope to have a working prototype in a few days...

    There is a U-Tube video of the servo drive in action.

    [ame]http://www.youtube.com/watch?v=RJEXbEXn0CQ

    Cheers...
    Ted



  5. #5
    Registered babinda01's Avatar
    Join Date
    May 2003
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default

    Hi Ted,
    I have been looking over this project and am quite interested. Do you feel there is much work required to get this to work with a HBridge????
    Regards
    Andrew



  6. #6
    Registered
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    45
    Downloads
    0
    Uploads
    0

    Default

    The present design relies on the op-amp power stage to look after current limiting. The dsPic controller outputs a pwm signal which is filtered to a voltage proportional to the required output current.

    The new design uses 2 op-amps as an h-bridge. The design should be capable of up to 60 volts and 7 amps, which are the op-amp specs.

    I have not fully tested the new design but initial test look good.
    It runs the servo and didn't let the smoke out of anything.



  7. #7
    Member
    Join Date
    Mar 2005
    Location
    canada
    Posts
    523
    Downloads
    0
    Uploads
    0

    Default

    hello
    perhaps check out some of these op amps
    http://www.ife.tugraz.at/datashts/nsc/h8710.pdf
    http://www.ortodoxism.ro/datasheets/...wn/mXuussw.pdf
    (opa447,548,549)
    perhaps a few lm3886 gain clones ($6.00 each)
    _________________________________________
    e_mail recieved about lm3886
    Cool, glad you liked it!

    Yes I think the National chips would make great servo drivers. Not that the
    LM1875 I had in the drawer ever got used for that. Just treat them as an
    ordinary opamp and as long as you run them with a high enough gain (above
    10 to be safe) and good power supply decoupling they should work as
    expected without stability problems.

    One thing I noticed though is they don't like a lot of reverse current
    (regenerative braking), as this places maximum stress on the output devices
    (I think). I think they are protected to an extent but it would pay to run them
    well below their power limit and with really good heatsinking, or at least drive
    one hard and see if it survives whatever mode of operation you want to throw
    at them. A really well protected chip will run without a heatsink, it'll just cut in
    and out.

    Best of luck!

    - Antony.

    --------------------------------
    From: "smarbaga"
    To:
    reguards garry

    Last edited by smarbaga; 03-05-2008 at 12:27 PM.


  8. #8
    Registered
    Join Date
    Jul 2005
    Location
    Iraq
    Posts
    88
    Downloads
    0
    Uploads
    0

    Default

    A PIC 30F4012 is used in this controller
    Can I use an alternative PIC instead of this one ? like the 16FXXX to do the same job ?

    Thanks



  9. #9
    Registered
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    45
    Downloads
    0
    Uploads
    0

    Default

    The 30F4012 has built in provision for the quadrature input and hardware counter for the input from the encoder.

    the 16F pics do not have this.



  10. #10
    Member
    Join Date
    May 2006
    Location
    Australia
    Posts
    2420
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by tfmacz View Post
    The 30F4012 has built in provision for the quadrature input and hardware counter for the input from the encoder.

    the 16F pics do not have this.
    How about the dsPIC30F2010 ?

    I am interested in trying this and using the PWM drive signal and direction signal, converting this using logic into PWM and NOT PWM and feeding this straight into a discrete H-Bridge.

    Any thoughts would be appreciated.

    Nice work so far btw.

    Russell.



  11. #11
    Registered
    Join Date
    Jun 2007
    Location
    usa
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default

    I'm (slowly) working to convert the output routine to h-bridge operation compatible with a hip4080/81 bridge driver so I can make some with only junk box parts.

    The way it's put together should make it really simple to convert, it already does the PWM by itself so it's just a matter of getting a "direction" signal out of the PIC, coming up with a way to limit the current, and making sure that the deadband operation is OK. I think all of this stuff is in a single function in the code.

    kudos to Lawrence/Tom for putting together and sharing such a well documented and great project.

    Also:
    I think at some point I read that someone else was doing the exact same thing, but I lost track of it?

    Last edited by ladzhari; 06-03-2008 at 06:11 PM. Reason: said wrong chip!


  12. #12
    Member
    Join Date
    May 2006
    Location
    Australia
    Posts
    2420
    Downloads
    0
    Uploads
    0

    Default

    I would be interested in how you go, I have put together a board, and logic to use the output from the DSPIC to drive a discrete bridge, but I think the PWM output needs to be inverted, as 4.75 V is zero current and 0V is full current from the original Op Amp configuration, I got distracted and have not been back to try again. I also couldn't get any serial comms so there were other issues with my board, I don't think I set the clock configuration correctly.

    I have a friend that used the DSPIC servo with a different op amp (smaller) to drive +- 10V industrial drives and it works very well, just have to get it working with discrete's.

    Russell.



  13. #13
    Registered
    Join Date
    Jun 2007
    Location
    usa
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default

    It's been a while since I looked at the thing after moving my workbench but IIRC there was just one function that set the duty cycle of the PWM based on the error calculated by the PID loop. I think that floating at 2.5 was the "zero error" (Motor is in the correct spot) place and nearly full-off and full-on was the max and minimum error. Changing it to whatever we want should just be a matter of modifying the one function.

    The project already has the hard bits done, the PID math and serial-port tuning code.

    I'm aiming for something with similar specs to the Gecko g320/340. It could be that they are using these same HIP4080 drivers since the maximum voltage is 80V, which is the same as the HIP parts.

    Also, I've got already from a previous project a slick single-sided PCB foil layout for an H-bridge that should be pretty hobbyist friendly to construct.



  14. #14
    Gold Member
    Join Date
    Jan 2005
    Location
    Toronto, Canada
    Posts
    1695
    Downloads
    0
    Uploads
    0

    Default

    Why not use the pwm signal to drive a discrete mosfet power stage directly, instead of the linear op amp? The efficiency, current and voltage capability would be so much higher.



  15. #15
    Member
    Join Date
    May 2006
    Location
    Australia
    Posts
    2420
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ladzhari View Post
    It's been a while since I looked at the thing after moving my workbench but IIRC there was just one function that set the duty cycle of the PWM based on the error calculated by the PID loop. I think that floating at 2.5 was the "zero error" (Motor is in the correct spot) place and nearly full-off and full-on was the max and minimum error. Changing it to whatever we want should just be a matter of modifying the one function.
    From what I understand the output is sign magnitude, from the schematic "RE2 sets direction and PWM on RE0 sets current" so this almost all we need to drive a H Bridge directly, thinking of it it may be as simple as putting the PWM signal through an inverter, say a 74HC14 to swap the max/min value and voila ! I can try this on my board once I get back to it, maybe this weekend.

    Aparrantly sign/magnitude is a little better than locked anti-phase for driving a full bridge, but I don't know enough about it to say much more than that.

    I have a friend who mentioned a line of the code that actually inverts the output PWM and he thinks commenting this out will do the same thing, even better...no hardware change


    Quote Originally Posted by H500 View Post
    Why not use the pwm signal to drive a discrete mosfet power stage directly, instead of the linear op amp? The efficiency, current and voltage capability would be so much higher.
    That is exactly what we are trying to do, I mentioned the small op amp configuration used to drive industrial amps just to point out how effective the drive functions are.

    Russell.



  16. #16
    Gold Member
    Join Date
    Jan 2005
    Location
    Toronto, Canada
    Posts
    1695
    Downloads
    0
    Uploads
    0

    Default

    I experimented with an ir2104 based h-bridge servo some time ago. The DIR signal was AND'ed with the pwm signal and droved the left half bridge. The inverted DIR was AND'ed with the pwm signal and drove the right half.

    The same approach should worked with this servo also. As you mentioned, the pwm signal need to be inverted either by software or hardware.



  17. #17
    Registered
    Join Date
    Sep 2007
    Location
    u.s.a.
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default i am also interested in this design

    i dont know alot about dspics but i am very good with the other pics.

    i also can help with pcb's and such. i am well versed with altium.

    please keep me informed.

    roger



  18. #18
    Registered
    Join Date
    Feb 2007
    Location
    Serbia
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default

    tecfacet, where to find dspic lib for altium?



  19. #19
    Registered
    Join Date
    Sep 2007
    Location
    u.s.a.
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default

    i just make the library parts as i need them. in some ways, altium is a pain but .... once one dives into it, the process is not too bad.

    roger



  20. #20
    Registered
    Join Date
    Feb 2007
    Location
    Serbia
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default

    Firmware is so huge. Maybe removing all those printf calls can make them fit in smaller Motor Controller dsPIC like 2010. I dont have dsPIC30F4012 samples so ill try to compact hex size first.



Page 1 of 9 1234 ... LastLast

Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

dsPic-Servo

dsPic-Servo