587,262 active members*
3,390 visitors online*
Register for free
Login
IndustryArena Forum > Community Club House > General Off Topic Discussions > what to do with this 3+ axis dental cnc machine
Results 1 to 20 of 48

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Posts
    230

    Re: what to do with this 3+ axis dental cnc machine

    as well as the precise homing method, I assume that only works with non-contact systems that have room for you to go beyond the switch?
    Actually, no - you don't have to go past the switch, you just go up to it; and now you know that you are in "rotation zero" of the ballscrew. Then, go forwards (away from the switch) until the I signal toggles. Then set the master machine position variable to some preset value that takes into account how far you typically have to move away from the switch - so, for example, if you have 10mm/turn ballscrews (just to pick a round number), and you know that the I signal toggles about a half a turn from where the switch toggles; you might set the machine position to +4mm (half a turn's worth of distance minus a mm to give it some "air" before it hits the switch when you tell it to go to position 0.000).

    -So we got 3 lines coming into samd21 from the encoder A, B & I.
    For software efficiency reasons, I'm going to suggest that the A and B inputs be on adjacent bits in the same IO port. PA06 (SAMD21G pin 11, Arduino pin 8) and PA07 (SAMD21G pin 12, Arduino pin 9) look like good candidates.

    The are three reasons that come to mind why you might not be able to use any specific optoisolator in this application; but with care in part selection that may be overcome. 1: The encoder's outputs need to be able to drive the LED in the optoisolator as well as anything else hooked up to them (or you need to put a buffer of some sort in front of it - perhaps a RS422 receiver that gets it's power and ground from the same supply as the encoder?). 2: Speed of the optoisolator - some of them are quite slow, so make sure you pick one that's fast enough to handle the encoder's output frequency. 3: Probably obvious, but some optoisolators require 5 volts on the output side to operate, so do make sure that it works at 3.3v.

    For clean edges, I would probably be looking for a logic-output optoisolator (i.e, one that has internal signal condition circuitry and a push-pull output); and not a simple phototransistor or photodiode output.

    -does usb run on 3.3v? i know V+ from the computer is 5V, so that definitively needs to be routed in through the voltage regulator, probably having a common input from the dc jack- will that be ok when usb is connected and power supply?
    Put a diode in between the USB +5v line and the power-input on the PCB. That will keep the board from back-feeding the USB port.

    and then I need to divide the data lines to drop to 3.3v right? and ground is ground.
    No, you don't need to do anything with the USB lines; they go directly into the SAMD21.

    On the Arduino schematics, there's some diodes that connect to the D+ and D- lines. These are just ESD protection diodes; they don't otherwise affect the signal. It's possible to do without them, but of course, better to have them.


    -the motor driver has an (2) aux outs of +-12vdc --should that be used as the power supply to create the analog control signals?
    I think that would be a good idea. I've had another look at the datasheet for the ADS_E drivers; and I'm thinking that instead of a virtual ground; a level shifting amplifier pair is a better idea (there's probably a formal name for this, but I dunno what it is). One reason is that I can't find a spec for common-mode voltage tolerance on the inputs to the ADS_E drivers... so I'm trying to come as close to what the data sheet shows in the minimum configuration section.

    I've attached two schematics for an opamp configuration that should do what's desired.... well, at least iCircuit says so.

    One has a voltage regulator shown in it, the other doesn't - the voltage regulator is to smooth out any noise in the -12v supply coming from the ADS_E board. If that voltage is relatively clean; a simple capacitor on the PCB between -12v and ground may be sufficient.

    could I not use NPN's on the +side and PNP on the -side?
    Yes, you could build it out of discreet parts, but given the above situation (and the need to isolate the DAC from the voltage shifting and amplification stages) I think you will wind up with more devices on the PCB that way; going the opamp route you just need a LM324, a handfull of resistors, and a trimmer to fine tune it.

    Even if its not advisable to use the aux outs of the driver, I am likely going to use an atx ps to power the controls, I will have -12 & +12 from there.
    That would work also; just make sure the whole thing has a common ground. Actually, there's that embedded PC in there... so... does it already have a suitable power supply (ATX or something like it)?

    -and now the question that is causing me the most concern: why are there two analog control signals (both -10 to 1+0) ? It SEEMS like you only NEED 1, if its negative spins one way, positive goes the other.
    Yes, you only need one signal... but...

    I have to assume there is some advantage or intended method for using a differential amplifier on two "set values"?
    Sort of. The reason this is usually done is for noise and ground loop rejection. If you send a voltage and it's inverse (or even just a reference ground) down a pair of wires in the same bundle (preferably a twisted pair) any electromagnetic interference will tend to affect both wires the same; so that the result is they both move up and down in voltage from the noise in unison, and the differential voltage is unaffected.

    but lets set setpt1 =0v and setpt2=5v...how does the driver act differently with sept1=0, setpt2=10v ?
    For the case of setpt1=0v and setpt2=5v, the differential (setpt2 - setpt1) is +5v; so the driver will spin the motor at 50% of the maximum speed that it can.

    For the case of setpt1=0v and setpt2=10v, the differential (setpt2 - setpt1) is +10v; so the driver will spin the motor at the full maximum speed that it can.

    If you have a case of setpt1=7v and setpt2=3v then you will get a differential of -4v; and the driver will spin the motor backwards at 40% of maximum speed.

    Does that up the output voltage resulting in a faster movement proportional to the change in difference?
    Yes.

    So then would setpoints(0,10) produce the same movement as (-10, 0).
    Yes.

    If so, what sort of logic could be used to determine those values?
    Assuming that by "logic" you mean how to convert from the desired velocity as a value in a variable in the software to the voltages that go into the Maxon ADS_E boards; half of the work would be done by setting the DAC on the SAMD21 to velocity+512, where velocity is a signed integer in the range of -512 to +511. The other half of the work is performed by the opamp.

    This is a growing concern as this logic greatly determine accuracy & responsiveness (along with PID tuning).
    Actually, no - the accuracy and responsiveness is principally a function of the update rate of the system, the encoder resolution, the servo amplifier bandwidth & power, and the PID tuning. Unless it's really, really awful, the signal conditioning going from the SAMD21's DAC to the +-10v differential inputs on the Maxon ADS_E servo amplifier boards doesen't play that big of a role - it just has to get approximately the right value to the ADS_E boards (and if it's off a little bit, the PID algorithm will correct for it, just as if it was an external drag on the motor).

    And while we are at it, is there a PID library you recommend? I have used a few different ones in the past, not in love with any of them, so watcha got?
    I don't have any favorite; I would suggest just going with whatever you've had the best luck with in the past.

    --the motor driver has current monitor outputs +- 10vdc, how do I read that back into adrunio so that information is available (dealing with the <0V side of that)?
    You don't need that value to do the PID operation; but if you really want to you could put another opamp on there and shift the voltage up into a range that the analog inputs on the processor can accept.

    -that brings up some communication questions I had: is the intent to set up the axis boards such that GRBL on the main control board treats it like a stepper driver with a step & direction pin?
    That's easiest. Otherwise you're looking at some fairly major modifications to the core motion engine of Grbl.

    -does GRBL have anything built in for closed loop systems? Mostly curious about error handling....for example if steps are missed, can GRBL make adjustments to catch up?
    No, it doesn't, but there should be no missed steps unless you have a rather bad noise problem in the interconnects between the Grbl processor and the SAMD21s, and/or the encoders and the SAMD21s.

    Missed steps from the mechanical side of things would, of course, be taken care of by the PID loop running on the SAMD21.

    -burning bootloaders --a quick search showed an option of using an arduino as the programmer. I have only seen that for avr arduinos, not sure if it would work for the samd21.
    I've only seen that described for a SAMD21 when you have another Arduino Zero with the EDBG chip on it; and you have to hack that Zero up to get at the pins needed to do the bootloader programming. Basically, the idea was to solder some wires onto the EDBG so that it's talking to the external SAMD21, and not the one that came soldered down to the Arduino Zero.

    I think I'd just get the J-link, or something like it.

    Others use a qfp48 test socket (not sure how that connects to a computer)--
    I'm guessing that they had something rigged up to a programmer like an AtmelICE or a J-Link.

    I like the idea of being able to test / burn the bootloader before I solder (since this work is a bit more fine than what I am used to).
    If you have good magnification, and a good soldering station with a nice big tip on it, and pleny of flux, it's actually easier than it looks. There's lots of QFP hand soldering videos on youtube; searching for "drag soldering qfp" gives a bunch of results. The one from Dave Jones (EEVBlog) covers QFPs starting at about 19:20 or so. I get better results than he did because I use paste flux and basically drown the pins in flux; however it is more of a clean-up hassle afterwords to get all the paste off the finished board.

    https://www.youtube.com/watch?v=b9FC9fAlfQE

    Re: Eclipse.

    I've had various versions on my machine over the years (typically something will have an IDE that the manufacturer built on top of Eclipse)... compared to BBEdit, it's huge - BBEdit is a ~13mb download; and expands to ~36mb on my drive. Also, I already must have XCode on my machine in order to compile my OS X and iOS software...

    __________________________________________________ ________________________________________________


    So I can keep a short history of pulse rates and determine how fast grbl is telling it to move.
    The PID function/library should be doing that for you.

    as I was typing this I realized there is an alternative method of deriving the amplitude of the output signal: That would be to track real position (encoders) vs instructed position (grbl step/dir signals) and use the difference to scale the output signal, + or - would correspond to CW & CCW.
    That's the P in PID. P = Proportional.

    the pulse rate will be inherent in the position differential (ie faster pulses will cause greater diff, that drives motor faster).
    That's the idea. The I term combats "following error" (among other things), and D tackles acceleration.

    it seems this is to combat "common mode voltage" and thus one of the signals is a reference.
    Ya know, I should probably read the whole post before writing a response. Um... yeah, that's one reason.

  2. #2
    Join Date
    May 2009
    Posts
    26

    Re: what to do with this 3+ axis dental cnc machine



    well my soldering station is finally done...man that was a hassle. photos here.

    so that took way too long, but I did learn quite a bit that will be directly relevant to these motor controllers.

    Firstly, opamps are frustrating, they seem so simple yet cause me sooo many headaches.

    Just for fun, I tried to make my own reference voltage for reading temp. I used a tl421 to create a 2.5v reference. At the time, I was unclear about the precision relative to what the aruduio could do. I now know that TL421b would have been significantly more precise. After the little work on the breadboard, I had nice looking 2.5v reference on my scope and proceeded to start tuning. But my read values were not very consistent and that made tuning the PID very challenging. So I went back to the scope to look at the amplified signal from the RTD in the iron and it looked real smooth. Went back to reference voltage and zoomed waaaayyy in on time to reveal what I think is called a sawtooth waveform. Very consistent, but definitely not constant. Is this normal? Is that where the 10% tol on the TL421 comes from? I ask all this because I feel a very good reference voltage will be critical to the motor drivers functioning at their best.

    The other major learning curve was PID tuning. I do hope its a touch easier to do with the motor.

Similar Threads

  1. Dental 4-axis machine + mach3
    By Franko123 in forum Machines running Mach Software
    Replies: 3
    Last Post: 03-16-2019, 10:48 PM
  2. Dental mill?
    By kolec94 in forum Benchtop Machines
    Replies: 11
    Last Post: 05-02-2018, 12:26 AM
  3. need help / dental technician / 5 axis milling
    By flasherbil in forum FeatureCAM CAD/CAM
    Replies: 0
    Last Post: 06-05-2015, 11:18 AM
  4. Anyone built a dental machine?
    By brian257 in forum Uncategorised MetalWorking Machines
    Replies: 12
    Last Post: 08-02-2012, 07:44 PM
  5. Replies: 4
    Last Post: 08-15-2011, 03:04 AM

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
  •