I'm drawing a "shield" to this board.
which I already have.
I have written some code and the GCODE transfer over USB together with openpnp using USB-CDC seems to work.
My idea is to define a large vector for each stepper which contains int A_MAX * unsigned char a_max[v] , and solve it for every microstep. (a = acceleration | v = velocity)
It means that I can have 255 different levels of acceleration between 0 and A_MAX for each velocity between 0 and V_MAX;
The cool thing is that it can map up that vector itself by iterations, and checking against the end-stop if it slipped or not.
Home to endstop;
while( NOT ENOUGH VALUES TESTED){
Move away from the endstop with 50% of an a[v] that is proven to work in an earlier step.
Increases the acceleration and go back the same distance.
Counts the steps before the endstop signals.
If( no slip)
update the vector and go faster the next run
else
try different a[v] settings.
}
Each stepper has it's own hardware thread/(XMOS core) allocated to it, meaning interrupts will not be used at all.
An analogy to an Intel CPU would be that it is a dual core CPU with 8 hyper-threads for each core but it never uses interrupts, only events).
This approach doesn't guarantee that a X-Y move using 2 steppers simultaneous will be completely straight from point A to point B, but it should not matter in this case !?
I have only played with the X axis so far with an veroboard connected to the TILE I/O.
Now I need an shield with all the outputs I need for my pnp machine.
So far I have:
Output for X , Y0 , Y1 stepperdrivers, which are external 2DM860H and feed with 42V AC.
Z, C0 , C1 are AMIS-30543 drivers soldered directly on the shield (24 V DC). With SPI control and with up to 128 steps of microstepping.
4 endstops for X, Y0 , Y1 , Z
8 MOSFET output , with up to 3 different rails.
2 half H-bridges (MOSFET) with advanced PWM / Delta-Sigma support from a XMOS thread.
2 vacuum sensors with 12 bit A/D over I2C; (0 - 100 kPa abs. p)
One 12-bit A/D over SPI for load angle feedback for the Z axis stepper.
Header for I2C and SPI, and 4 extra GPO pins.
And it should fit the ALLPCB 10 cards for 5$ offer.
The blueish card in the bottom is the XMOS card with USB 2.0 and gigabit Ethernet.
The whitish card on the top is my shield.
Am I missing something important- maybe something for future feeders?
Other thoughts ?
(My smoothie-board will be used to my 3D-printer that I'm currently building if it works the way I want it to do).
Missing: A connector for an external killswitch button.
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/008d5946-b368-48a2-a5d7-9674e77024da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/4c4c9b5e-84ed-4c32-ae21-5e4cdfe8a6e3%40googlegroups.com.
I also made this board, trying to replace the 3 external stepper drivers for X,Y0,Y1.
The motherboard is a Xilinx ZYNZ 7020 made by myirtech.com
The MOSFET will be cooled by the AL 40x20mm profile.
Instead of running simple frame by frame current control, I will try to use Delta-Sigma with noise-shaping to avoid aliasing tones in the frequency spectra < 20kHz.
A common problem is non harmonic tones generated in the acoustic region for human hearing.
Also, it will not run steps, instead it will run at a constant sampling rate.
The planner will thus be integrated with the controller, making it possible for the controller to retard the acceleration if the output voltage is reaching the rail voltages.
It will create sine-waves at 48 kHz instead of trying to interpolate a sine-wave from a step signal.
TBC!
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/ea8ee6f8-fa81-46a4-95ff-6a09b97043cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
https://github.com/lilltroll77/openPnp1v1
I started with the USB Virtual COM port example from XMOS. Works out of the box in Win10.
Then I just added feature after feature myself. I know almost nothing about the other GCode implementations.
The stepper velocity is
recalculated for each step. An easy task for XMOS to do.
The current github code does not include the a[v] lookup table for the
steppers, but it is easy to add.
I can almost make my machine
jump of the table, spraying 0603 every there, so I do not need it before I can
bolt my machine into the floor or something like that.
a[v] means that the acceleration/torque is depending in the current velocity, since the available tourque depends on the angular velocity of the stepper (and the rail voltage).
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/17171d44-d096-402f-8d3f-cfffb0553c65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You should be able to fix the reflections by slowing the rising edges a bit, as they seem significantly faster than they need to be. Try using small (pf) capacitors on the outputs, or if the XMOS chip has configurable output rise times try a slower one.
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/0f0568db-a66a-42cd-8d1f-aaa8d8d13132%40googlegroups.com.
The objective with all PWM techniques is to create frequencies below the modulation switching frequency. The frequencies above is just a side effect.
If no frequency components where created below 20 kHz, no substantial torque would be generated by the stepper.
For a 200 steps/rev stepper we need a 200 Hz sine wave component (and cosine wave) to make it rotate at 1 rev / s. If you use a squre wave, the sine wave component will be a part of it, (proven by the Fourier series).
A side effect with all pwm, is that unwanted frequencies will also be created below the switching frequency, at least for a subset of all possible modulations.
An example often used in audio, is to used Delta-Sigma modulation with noise-shaping + dither to force as much of that energy unwanted energy above 20 kHz as possible.
I’m 100% sure of that there always will be frequency components below 20 kHz as soon the stepper is enabled. You can always ask the Fourier transform for guidance in that matter.
Since, I have the equipment I will capture a Spectrogram of the stepper current later.
What I do not know, is how much unwanted energy below 20kHz that is present, but the spectrogram will tell.
I understand why you want to switch to full steps at high rev etc, but I see it from a non-linear control system perspective, and finds the ideá with stepping the steppers ... outdated.
I understand that sub us axis synchronisation is irrelevant, especially for openPnP, where not perfect interpolation between XYZ axis is needed.
From the beginning I did not care at all, but then I got problems with my old nozzle-changer, when I needed the nozzle to move in a straight line in XYZ space.
At least for me, it is of “academic interest”, if it can be proven that there never will be any synchronisation problems due to the software/hardware implementation. Then you can encapsulate that function and hide it away, to never need to think about it again, even if someone starts to use the code for something that is more time critical.
I have a lot of MIPS to use, so let’s throw DSP instructions on the problem and see how perfect it can be done with XMOS.
Right now, I’m working on a lookup table for square root calculations, to improve the accuracy of the interpolation between a movement in XYZ == motion planning.
The start syncronization is no good, it the movement is not in sync at the end.
The objective with all PWM techniques is to create frequencies below the modulation switching frequency. The frequencies above is just a side effect.
Or wait, a full "step" is a 90 deg phase shift!? We need 200 x 90 deg phase shift for one rev.So we need a 50Hz (sin,cos) wave to make a 200 step/rev stepper rotate at 1 rev/s ?
The planner will thus be integrated with the controller, making it possible for the controller to retard the acceleration if the output voltage is reaching the rail voltages.
It will create sine-waves at 48 kHz instead of trying to interpolate a sine-wave from a step signal.
Measurement:
First pulse:
In the middle:
Last pulse:
The total error in the end is 6ns.
I might be able to live with that timing error, but it is possible to get down to [0 2ns].
The planner calculates the total number of steps, maximum velocity with 64 bits of fixed point precision, and acceleration as floating point with a 32 bits mantissa.
All other calculations is done in real-time in each stepper thread. 500kHz is no problem.