. .
Page 1 of 2 12 LastLast
  1. #1
    I had a notion that if I fitted cheap Chinese digital-scales to my mill I could stop worrying about backlash, stalled steppers, losing my zero etc. I could fit an automatic tool height detector and that positioning pendant I have always wanted, maybe leave it open ended so I could add other input devices I haven't thought of yet.

    I now have a little computer board which the PC can talk to. It reads 3 digital scales, drives 3 stepper motors, has a serial port to talk to the digi phase converter. Also SSR relay outputs to switch the suds and the main motor, plus 3 auxilliary ports for plugging in additional doo-dads.

    I've got the scales reading, haven't done their end sensors yet but that should be easy. Now working on the stepper control algorythm which sits on a timer interrupt...

    Anyone still with me? Or am I the only one who does this kind of stuff? :D

    Current plan is that each axis has two main variables, 'Where we are' WWA and 'Where we want to be' WTB. When the timer interrupt fires it does one axis out of 3. It compares WWA to WTB and if necessary steps in the appropriate direction.

    May seems complicated for a stepper algorythm, until you remember that WWA can change at any moment should the digital scale for that axis chime in with a new absolute position. I have the scales hard wired for speed, a complete 24 bit location received interrupts the CPU and gets read as 3 pre-digested bytes.

    On the last axis interrupt it does a more exhaustive test for position. If any axis is outside tolerance I don't update WTB for the next position so it does remedial steps until tolerance is satisfied. I think I have to allow a tolerance or it will get stuck. The screw resolution is .005 mm/step. The scale resolution is .00496mm, close enough that I can let the motors get a bit ahead of the scales. The scales report about 50 times a second, I usually do 300 steps/second so there has to be some leeway. If I can cut the tolerance to 3-4 steps I will be well within 1 thou accuracy.

    Quite enough for now. Did anyone read this far?
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	cnc.jpg 
Views:	349 
Size:	94.4 KB 
ID:	41  

  2. Quote Originally Posted by Robin Hewitt View Post
    I had a notion that if I fitted cheap Chinese digital-scales to my mill I could stop worrying about backlash, stalled steppers, losing my zero etc. I could fit an automatic tool height detector and that positioning pendant I have always wanted, maybe leave it open ended so I could add other input devices I haven't thought of yet.

    I now have a little computer board which the PC can talk to. It reads 3 digital scales, drives 3 stepper motors, has a serial port to talk to the digi phase converter. Also SSR relay outputs to switch the suds and the main motor, plus 3 auxilliary ports for plugging in additional doo-dads.

    I've got the scales reading, haven't done their end sensors yet but that should be easy. Now working on the stepper control algorythm which sits on a timer interrupt...

    Anyone still with me? Or am I the only one who does this kind of stuff? :D

    Current plan is that each axis has two main variables, 'Where we are' WWA and 'Where we want to be' WTB. When the timer interrupt fires it does one axis out of 3. It compares WWA to WTB and if necessary steps in the appropriate direction.

    May seems complicated for a stepper algorythm, until you remember that WWA can change at any moment should the digital scale for that axis chime in with a new absolute position. I have the scales hard wired for speed, a complete 24 bit location received interrupts the CPU and gets read as 3 pre-digested bytes.

    On the last axis interrupt it does a more exhaustive test for position. If any axis is outside tolerance I don't update WTB for the next position so it does remedial steps until tolerance is satisfied. I think I have to allow a tolerance or it will get stuck. The screw resolution is .005 mm/step. The scale resolution is .00496mm, close enough that I can let the motors get a bit ahead of the scales. The scales report about 50 times a second, I usually do 300 steps/second so there has to be some leeway. If I can cut the tolerance to 3-4 steps I will be well within 1 thou accuracy.

    Quite enough for now. Did anyone read this far?
    I do this stuff and will do more when I can mill PCBs instead of having to etch them...right now I am designing stepper drivers and trying to decide which chip to go for... I was thinking L297/L298 is cheap and cheerful for now.

    On your algorithm, you need to think about acceleration and deceleration and predictive placement since what you are creating is a closed loop servo system with a lag. Given that your scales read slower than the step speed if you are not to end up with a completely overdamped and sluggish solution you need to be considering the rate of change of scale value ds/dt as well as the actual value s.

    I like the idea of a automated 'go to location' but how will this integrate with EMC2 or Mach3 or are you planning to treat the stepper/scale combo as a big servo?

  3. #3
    Quote Originally Posted by irving2008 View Post
    I am designing stepper drivers and trying to decide which chip to go for... I was thinking L297/L298 is cheap and cheerful for now.
    I used the driver half of that with a 555 timer and dual comparator to chop it. Sight snag using their controller, you have to stop on the home position if you want to switch off and come back to it, you can't save the step pattern and location when you exit. It all worked okay until the mains voltage surge popped all three at once. Had to work a tad close to it's voltage limit to get any kind of speed.

    I've heard glowing reports of Mach3 but I do like to be in control so I avoid commercial software as much as possible. If you write your own you can add features and fix bugs. My next software will be version 3, so I have some experience to draw on. Has to run under Windows XP and cut from an AutoCad dxf file. I want vast amounts of memory and the thought of 32 bit integers has become almost irresistable. The GUI is good to :D

  4. #4
    Quote Originally Posted by Robin Hewitt View Post
    The GUI is good to :D
    Dont be shy, SHOW SHOW !

  5. Quote Originally Posted by Robin Hewitt View Post
    I used the driver half of that with a 555 timer and dual comparator to chop it. Sight snag using their controller, you have to stop on the home position if you want to switch off and come back to it, you can't save the step pattern and location when you exit. It all worked okay until the mains voltage surge popped all three at once. Had to work a tad close to it's voltage limit to get any kind of speed.

    I've heard glowing reports of Mach3 but I do like to be in control so I avoid commercial software as much as possible. If you write your own you can add features and fix bugs. My next software will be version 3, so I have some experience to draw on. Has to run under Windows XP and cut from an AutoCad dxf file. I want vast amounts of memory and the thought of 32 bit integers has become almost irresistable. The GUI is good to :D
    Love to see it Robin. Was thinking of writing my own DXF->GCode as haven't found one I truely like and what I want is seamless CAD -> mill (or PCB layout -> mill). Although I have lots of free software that does the job its all a bit of a faff and kludge.

    Going to stick with L297/L298 at 40v/2A for now as my steppers and 2mm ACME screws don't need any more, but have a 4-axis design on the drawing board using a PIC processor, 2109 hi/lo drivers and discrete MOSFETs for 80v, 5A/coil, 1/8 microstepping capability for the future.

    Where do you source your electronic parts from? I use Radiospares, Farnell (rarely, since mostly seems to be US-stock now), Maplins (even less so), and Cricklewood Electronics all online - the days of the great electronics shops have long gone :(

  6. #6
    I've done the read a dxf, pick out lines arcs and circles then stitch lines and arcs together into shapes (fudging the ends slightly so they meet up properly). Also the expand/contract it bit to get the tool path.

    No G-Code planned, it goes straight to my box of tricks and turns the handles. I have a wicked arc drawing algorythm my brother wrote, any start point, any end point, either direction. I just call it and it gives the next pixcel on the arc. I tried it drawing circles on screen, then had to add a delay between pixcels so you could actually see where it started and which way it was going :D

    My preferred small quantity supplier has to be Rapid Electronics.

    40 volts is very close to smoke if you're using a transformer, suggest you do something clever in the PSU to protect it.

  7. Quote Originally Posted by Robin Hewitt View Post
    I've done the read a dxf, pick out lines arcs and circles then stitch lines and arcs together into shapes (fudging the ends slightly so they meet up properly). Also the expand/contract it bit to get the tool path.

    No G-Code planned, it goes straight to my box of tricks and turns the handles. I have a wicked arc drawing algorythm my brother wrote, any start point, any end point, either direction. I just call it and it gives the next pixcel on the arc. I tried it drawing circles on screen, then had to add a delay between pixcels so you could actually see where it started and which way it was going :D
    Sounds interesting... so lets see some pics :)

    Quote Originally Posted by Robin Hewitt View Post
    My preferred small quantity supplier has to be Rapid Electronics.
    Thanks, I'll go investigate

    Quote Originally Posted by Robin Hewitt View Post
    40 volts is very close to smoke if you're using a transformer, suggest you do something clever in the PSU to protect it.
    Yes I know. Go to do a back-emf dumper and some sort of voltage limiter (not a regulator as such) - looking at some ideas that combine the two. Don't want to use a series regulator cos of the losses involved at 6A+ (if all 3 axis active) but thinking along lines of series/shunt MOSFETS (got a couple of samples rated at 120A, 200V and 0.003ohm Rds, so even at 10A its not going to get warm if turned fully on!)

  8. #8
    Quote Originally Posted by irving2008 View Post
    Sounds interesting... so lets see some pics :)
    I could do a movie of me slaving over a hot PC but apart from that there is little to see yet.

    Now working on the command protocol, having a slight snag with a worst case fast traverse doing 2 steps in one axis and 1 step in the other. It's a baud rate thing :D

  9. Quote Originally Posted by irving2008 View Post

    Quote Originally Posted by Robin Hewitt View Post
    My preferred small quantity supplier has to be Rapid Electronics.
    Thanks, I'll go investigate
    Well I priced the parts for my controller from Rapid - they came out about 3% more expensive than Cricklewood and didn't have a couple of parts but had some better options on others... Only sell resistors in packs of 100 though.

  10. #10
    Quote Originally Posted by irving2008 View Post
    Well I priced the parts for my controller from Rapid - they came out about 3% more expensive than Cricklewood and didn't have a couple of parts but had some better options on others... Only sell resistors in packs of 100 though.
    That's a surprise because they are having a sale at the mo'. I ordered a hundred quids worth yesterday and it was on my desk by 10:30 this morning :D

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Digital angle gauge
    By njhussey in forum Tool & Tooling Technology
    Replies: 4
    Last Post: 04-12-2012, 08:07 PM
  2. FOR SALE: DRO + 4 Scales
    By Rikk in forum Items For Sale
    Replies: 0
    Last Post: 22-10-2011, 09:41 AM
  3. Digital drivers from Zap
    By Simon C in forum Motor Drivers & Controllers
    Replies: 5
    Last Post: 31-03-2011, 03:27 PM
  4. FOR SALE: digital vernier.
    By i2i in forum Items For Sale
    Replies: 8
    Last Post: 13-08-2010, 11:31 AM
  5. Reading and fixing Chinese scales
    By irving2008 in forum Tool & Tooling Technology
    Replies: 26
    Last Post: 24-02-2010, 10:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

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