Configuring a 10Khz charge pump for a G540 gecko using BeagleBone Black running machinekit

224 views
Skip to first unread message

Tom M

unread,
Feb 1, 2017, 1:10:49 AM2/1/17
to Machinekit

We almost almost finished configuring our cnc build at the makerspace I belong to.

Since the G540 has a charge pump, we thought we would take advantage of it.
(We we're debating if we even need to since we don't think the bbb has the start issues that a pc parallel port does.

My understanding is that the G540 needs a charge pump frequency of 10Khz

It seems that config files that we started with was only setup with a 500hz servo-thread

I suspect the servo thread is setup within the calls made at this line..
https://github.com/Workshop88/machinekit/blob/OptimizePru/configs/ARM/BeagleBone/RosettaBoneGecko/RosettaBoneGecko.hal#L43)
Is this correct?

We tried setting up a 10Khz thread here: https://github.com/Workshop88/machinekit/blob/OptimizePru/configs/ARM/BeagleBone/RosettaBoneGecko/RosettaBoneGecko.hal#L31
When we put a scope on the charge pump signal it was very erratic and the gecko faulted.  (I was fine when it was on the servo thread but too slow)
(When we had the charge pump hooked to the 500Hz servo thread we got a very nice signal.

Are there any technical issues regarding the BBB that I'm not taking  account?
Thanks,
Tom


http://wiki.linuxcnc.org/cgi-bin/wiki.pl?About_Charge_Pumps

Kirk Wallace

unread,
Feb 1, 2017, 10:02:11 AM2/1/17
to machi...@googlegroups.com
On 01/31/2017 10:10 PM, Tom M wrote:
>
> We almost almost finished configuring our cnc build at the makerspace I
> belong to.
>
> Since the G540 has a charge pump, we thought we would take advantage of it.
> (We we're debating if we even need to since we don't think the bbb has
> the start issues that a pc parallel port does.
>
> My understanding is that the G540 needs a charge pump frequency of 10Khz

It is my understanding that the frequency is much less important than
the drive current. The pump input circuit has a DC blocking capacitor,
diode bridge, and charge capacitor that needs to be charged. I found
that a 5 Volt pull-up resistor or a buffer IC than can source 24ma works
well. This should allow going down to 500Hz or just about any convenient
frequency. I have some notes here:
http://wallacecompany.com/machine_shop/G540/

I seem to recall that the scope traces that got above 3Volts worked.
Such as the motherboard port set to EPP worked:
http://wallacecompany.com/machine_shop/G540/g540_mb_epp.jpg

But set to SPP didn't:
http://wallacecompany.com/machine_shop/G540/g540_mb_epp.jpg

I did a little bit of circuit tracing here:
http://wallacecompany.com/machine_shop/G540/G540_upper_bottom_z-1b.png

Pin 16 is the input, C is the series DC blocking capacitor, next comes
the half-wave diode bridge (KL4 Y8), a filter capacitor on the output
(two bottom pins), and the opto-coupler input LED and current limit
resistor (201) to ground.

I haven't done any work with the Beagle Bone but I suspect any buffer
circuit that can convert the BB low voltage to 5Volts at 24ma should
work at any convenient frequency.


--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

Kirk Wallace

unread,
Feb 1, 2017, 10:43:21 AM2/1/17
to machi...@googlegroups.com
On 02/01/2017 07:02 AM, Kirk Wallace wrote:

... snip

>
> I seem to recall that the scope traces that got above 3Volts worked.
> Such as the motherboard port set to EPP worked:
> http://wallacecompany.com/machine_shop/G540/g540_mb_epp.jpg
>
> But set to SPP didn't:
> http://wallacecompany.com/machine_shop/G540/g540_mb_epp.jpg

... snip

Oops, bad link above, this should be better:
http://wallacecompany.com/machine_shop/G540/g540_mb_spp.jpg

Tom M

unread,
Feb 1, 2017, 1:46:16 PM2/1/17
to Kirk Wallace, Machinekit
Thank for the quick response.
When we connected charge pump we got a nice 500 Hz signal albeit 3 volts.  When  I attempted to create a 10k thread this is what we got as far as a trace.

--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
--- You received this message because you are subscribed to a topic in the Google Groups "Machinekit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/machinekit/Mv7X6ddtPD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to machinekit+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
IMG_20170131_221535667.jpg

Charles Steinkuehler

unread,
Feb 1, 2017, 5:13:10 PM2/1/17
to machi...@googlegroups.com
I love the old 'scope!

You will definitely have to buffer the outputs of the BeagleBone, most
of which are only rated for a few mA of drive current. If adding an
'HCT245 style buffer (or something similar) doesn't help and you really
need to generate a 10 KHz PWM output signal, you won't be able to do it
reliably with the ARM. You should either use one of the hardware PWM
outputs, or you can get the PRU to output a PWM signal that fast.

To use the PRU, either setup a new PWM timebase with pwm_period=100000
or just run a stepgen in velocity mode and control the duty cycle with
the steplen and/or stepspace settings.

...but neither solution will help with safety if the ARM core crashes
and stops running code. Both the hardware PWM and PRU would keep
generating the chargepump output and your drivers would remain enabled.
>> machinekit+...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/machinekit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>


--
Charles Steinkuehler
cha...@steinkuehler.net

Kirk Wallace

unread,
Feb 1, 2017, 10:16:11 PM2/1/17
to Tom M, Machinekit
On 02/01/2017 10:46 AM, Tom M wrote:
> Thank for the quick response.
> When we connected charge pump we got a nice 500 Hz signal albeit 3
> volts. When I attempted to create a 10k thread this is what we got as
> far as a trace.


3 Volts isn't high enough. The current into the G540 won't start to flow
until you get above 3 Volts. Once you get flow, you need to make sure
you get enough current. The input is DC blocked so you need to ensure
there is enough high and low time to get good AC. The frequency isn't
that important -- 200 Hz to 2 kHz should be okay.

Tom M

unread,
Feb 1, 2017, 11:17:10 PM2/1/17
to Kirk Wallace, Machinekit
Kirk.. I was looking your post over smart phone this morning and this was the first chance I had to really look at your links in detail...
Nice job on the analysis on the  gecko btw..
We've been really happy with the G540 and sort of curious on what made it tick..
So... I'm pretty sure we can figure out something to buffer the voltage and amperage signal between the beagle-bone and the gecko. That's very useful to know  that the frequency isn't that big of a deal.   Like I side we where getting a nice signal just hooking up to the servo thread.

Charles,
I'm glad you like our vintage scope...
(Are any of you guys come out for the makerfaire that's happening in chicago?
https://www.eventbrite.com/e/maker-faire-chicago-town-hall-tickets-31268285283




mrarmyant

unread,
Mar 23, 2018, 5:01:47 PM3/23/18
to Machinekit
How did you get the G540 to work with the bbb?  Been looking all over the place on how to get a parallel port out of it.

Tom M

unread,
Mar 23, 2018, 10:12:52 PM3/23/18
to mrarmyant, Machinekit
Bart Dring had created a cape called a Rosetta Bone which could use either a grbl shield, a parallel port or a ramps shield..  Bart had gifted me a blank board which worked fine for the parallel port, but had some issues with the ramps..  so the cape never really got into production.

I noticed that Alex has created a cape for a parallel port that you can get from OSH park.  This    probably would work.

--
Reply all
Reply to author
Forward
0 new messages