step motors: how to extract info from the coils - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: May 04, 2018, 04:04:36 pm
content: no doubt a thing that is not what it is purported to be, but ...... but I have a closed-source 3d-printer device that handles three step-motors and it doesn't bark-report the X-Y-Z position to the operator, and it would be useful to know at which step of the gcode-model it has arrived during the process.Due to dimension (and silly design of the engine) problems, I can't mount encodersSo, you have three bipolar step-motor, powered at 24V, and you can't hack the motherboard to extract the command line (that is TTL), you are after the driver, everything else is a black-box (literally).It’s a common approach in the industrial world to micro-step a stepper motor to achieve better resolution in the system. The movement of the stepper motor is caused by exciting currents through the motor coils, and since the goal is to divide a full motor step into multiple micro-steps, the “how-to” part of the task is very straightforward – simply generate multiple current levels. This is the so-called “current regulation” in stepper motor controls.two H-briges are used to drive the motor, one bridge per coilI do not know how the driver works internally, but probablyit applies PWM to the "V+motor supply" of the bridge in the fig.Thus, on a pure logic level I can design a mini-CPLD module able to follow the microstepping increment/decrement (that means I can have a status array, {X,Y,Z}, to be queried on demand through a serial connection, from this CPLD to a .. say .. linux board), but I have some doubt about the physical interface, (how to sense the current?) and more specifically about HOW to extract this information on the driver side at coils: cause I can only access coils!Trough a couple of Optoencoders per coil? UmmmmTips? Idea?

author: langwadt
author_rank: Super Contributor
timestamp: May 04, 2018, 04:36:47 pm
content: Quote from: legacy on May 04, 2018, 04:04:36 pmI think rand() will be slightly more accurate

author: legacy
author_rank: Super Contributor
timestamp: May 04, 2018, 05:26:20 pm
content: Quote from: langwadt on May 04, 2018, 04:36:47 pmoh, well, humor.

author: legacy
author_rank: Super Contributor
timestamp: May 04, 2018, 05:38:25 pm
content: why do you need to quote the whole universe to reply a bullshit?... looking at my shoes ...... but that's not the irritating point. These 3d-printers are made to be irritating ... you know? the task takes 14 hours to complete, and it's missing just 4 minutes to fully complete the job, when ...oh-oh-oh the electricity is interrupted, and you have to start from the beginningbut, you can't hack the printer! Do you want extra features? like resume from electricity interrupted? those dudes know how to make it impossible, and you have to pay more money for the enhanced version.That's life. Anyway

author: legacy
author_rank: Super Contributor
timestamp: May 04, 2018, 06:03:26 pm
content: so, what have we learned?- 3d-printers do use micro stepping- micro stepping is more complexhow accurate is micro stepping? anarticleon hackaday.Interesting

author: legacy
author_rank: Super Contributor
timestamp: May 04, 2018, 06:11:12 pm
content: ( as far as I have understood, "probably" 3d-Printers benefit from micro stepping by reducing surface artifacts )

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 04, 2018, 11:46:30 pm
content: Quote from: legacy on May 04, 2018, 05:38:25 pmi think the last 4 minutes is on the last layer. i will just scrap the last layer and live with it i dont think its too important, its not like you have to scrap 7 hours or 10 hours job. with many layers to go and the printed output still exposing holes on it.Quote from: legacy on May 04, 2018, 05:38:25 pmi thought about this, but if it doesnt exist you have to make yourself well.... the cheaper solution maybe is battery backup UPS and auto start GenSet. to avoid power outageQuote from: legacy on May 04, 2018, 05:38:25 pmyes 3d print operators well aware of this. the people involved in OSS reprap development should easily implement this by providing "pause" and "resume" print for power outage issue. but we havent seen that happening its ironic, if i know the code i'm the one who will do that. pause meaning, saving in temporary file in sdcard the location of the last executed gcode file location and name, and last coordinate and other necessary setting for the next "resume" printing when power is restored. i saw "pause" and "Resume" function but i dont think its for power outage situation, when printer is OFFed everything back to zero we have to start again. but this feature will still require battery backup ups regardless, to give time to save the necesary parm before shutting down. and when shutted down, you absolute cant touch anything inside the 3d printer, leave it as it were or you'll screw up when resume printing.back to your question, i think hacking into motherboard to tap the stepper pulses command will be much economical in term of time and cost developing your state of the art current detection stepper motion. thats why i think you got a funny replyymmv.

author: Nusa
author_rank: Super Contributor
timestamp: May 05, 2018, 01:09:39 am
content: Just be aware that some of the smarter stepper drivers and/or software will switch between full stepping and various levels of microstepping depending on what motion is required. Which is all countable in terms of phase changes, but don't expect microsteps to be individually detectable at all times.

author: C
author_rank: Super Contributor
timestamp: May 05, 2018, 02:30:59 am
content: Micro-stepping is just a fancy name for driving a stepper motor with AC like signals vs two digital levels. In the past you might have used a pair of DAC's. The ratio between the two DAC outputs gives you control between the digital steps with the bits of the dac the number of microsteps.Today, a stepper driver is using the ratio of currents and using ON/OFF to control the current. The stepper winding inductance is the filter. Due to the ON/OFF control the winding is averaging the result. So you have a ratio of voltages across the windings.To say this a different way, some control methods for a brushed DC motor use a 50% reverse & 50% forward PWM for stop. As long as the forward & reverse match, output is stopped. For steppers you have time ratio between steps controlling shaft ratio.To sense, think you want to measure the voltage across each stepper winding & filter some.Todays stepper drivers are using a larger voltage source to force a faster current change in the windings, for better control.C

author: legacy
author_rank: Super Contributor
timestamp: May 05, 2018, 09:36:27 am
content: Quote from: Mechatrommer on May 04, 2018, 11:46:30 pmunfortunately, the motherboard is made in a very irritating way: there is a big heat sink on the top of three stepper drivers and it seems stuck on them. There are no screws, probably it's really stuck, and I can not remove without causing damage. Also, around these chips, there is a sort of black resin that makes impossible to touch pins.the label on the control chip got blanked, what is that? Atmega? Xmega? which part? you do not need to knowThere is no jtag/programming header for any programming cable, so you can't neither try to download the firmware (that of course, it's protected)

author: legacy
author_rank: Super Contributor
timestamp: May 05, 2018, 09:42:21 am
content: Quote from: Mechatrommer on May 04, 2018, 11:46:30 pmYes, a sort of pause and resume. My CPLD board would come with an independent battery, and if it's able to follow the 3d printer, it's also able to save the last position inside an NVRAM.But imagine you also want to change the color of the printing wire. You need a triggering circuit that puts the printer into pause, so you can change the printing wire, and resume.This kit does not exist for my 3d printer, you have to replace the whole printer with an enhanced version.

author: C
author_rank: Super Contributor
timestamp: May 05, 2018, 10:31:18 am
content: I would think that best long range thing to do is1. use as is.2. replace control electronics so that you gain control and can then make program & electronic changes.Many open source 3d printer controllers exist.C

author: legacy
author_rank: Super Contributor
timestamp: May 05, 2018, 11:03:13 am
content: I also own an open source 3d-printer, and nothing has worked as expected. It's the reason why I bought this closed-source 3d-printer that has always done a good job.Anyway, back to the topic, perhaps ... I have an idea to solve the pause-resume problem.

author: Monkeh
author_rank: Super Contributor
timestamp: May 05, 2018, 11:05:40 am
content: Quote from: Mechatrommer on May 04, 2018, 11:46:30 pm'we' have seen this happening, you haven't looked. It's already been done.QuoteAnd you'll fail because there isn't time to write to an SD card if the power goes out.QuoteNo batteries required.QuoteNonsense. They have to rehome anyway.

author: legacy
author_rank: Super Contributor
timestamp: May 05, 2018, 11:18:30 am
content: Quote from: C on May 05, 2018, 02:30:59 amYup. It's 24V.

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 05, 2018, 12:51:07 pm
content: Quote from: legacy on May 05, 2018, 09:36:27 amyou do have manual x/y/z control by the knob on the printer's menu right? probing each mcu pin (or the trace whichever convenient) while moving x axis stepper will enable you find the x axis control pin.

author: legacy
author_rank: Super Contributor
timestamp: May 05, 2018, 01:15:55 pm
content: Quote from: Mechatrommer on May 05, 2018, 12:51:07 pmyep. Excellent idea! This can be done

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 05, 2018, 01:31:24 pm
content: be careful dont short anything

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 05, 2018, 03:33:10 pm
content: Quote from: Monkeh on May 05, 2018, 11:05:40 amBoth the Prusa MK3 and the CR-10S use capacitors for that purpose.

author: langwadt
author_rank: Super Contributor
timestamp: May 05, 2018, 03:41:01 pm
content: Quote from: legacy on May 04, 2018, 05:26:20 pmsorry,ignore the microstepping, opto in parallel with each coil lots of filtering and treat the signal as you would a quadrature encoderwill get you in the ball park