Realtime PWM mode added.

Discussions and file drops for Auggie
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

Hi Joakim:

 Amazingly ( or not), yours is near identical to YaNvrNo's, who hooked up last night and will test shortly under Auggie.
Its always easiest to test with Pokeys software first when you hook up..

 So lets talk about the schematic, he hooked up different to you, but there are many ways to do it..

 OK, so lets talk about PWM first.. We disconnected the pot, and connected hte 0vdc line of the boards POT connector
to Pokeys Ground. This references the Pokeys to the board. We then used PWM Pin 20 on the TestIO connector
to the center POT pin. That pin, ioncidentally, has changed location, its on pin 14 in my board of the testIO connector,
and on Pin1 of YaNvrNo's baord. So check your board for version info if you decide to use Pin20.

  That connection will then supply the PWM. In Auggies Config/Planner, you will set a period of .00005 for 20Khz PWM
and channel 2 if you use the TestIO connector . ( I use Channel 4 here, pin 18 from the LCD connector).

That having been done, your PWM should now control the power.

 Now for LaserON, we used the Test Switch inputs, feeding  the positive side
of the test switch to OC2+ and the other to OC2-.  Also the Laser on was fed
to OC1+ and OC1-.

  On this board for some reason the test switch must be pressed for it to work.. I might add
his board is different than yours, a modification or revision Id think..

I use relay1 to control my laser on, so you may use relay 1 instead on an OC.. The
on, whether you use and OC or a relay, will have to be changed from what I use as
I use only the relay #1, and its triggered by the button on the screen , which has a
variable name that makes it trigger Relay1.

 So, if you get the OC's or relays you need turning on the LaserON or Test  button ( or both),
so long as the PWM is hooked up, the LaserSpindle script will automatically use the config/planner
settings to control the power.

  We're just getting YaNvrNo's working today, so Ill post updates as to where we were
wrong or add data to help you figure it out. He'll post if I have screwed up any
details, as he actually has the laser there.. I am viewing from a distance. :)

If confused, Ask away, we'll figiure it out together, but it looks like your well on
your way and very close to radiation..

Art


Last edited by ArtF on Mon Apr 25, 2016 1:05 am, edited 1 time in total.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

J:

  OK, I have just uploaded a new version of Auggie. In its config/Planner you will find a setting for

PWMChannel -> This sets the PWM channel used, no need to edie the laserSpindle scripts, they load this value.
PWMPeriod-> I use 5Khz, ( 200us), but yours is High Voltage, I hear 20K is better, so set to .00005
PWMMin -> This , in your case should be set to 1. Its not really needed as this nortmally is the tickle pulse, and
                  I dont belive you need a tickle, but having it at , will allow you to see your freeaxis#8 count at 1000
                counts persecond when PWMRealtime is on. Its a good Diagnostic. For Tickle requirements, one can
                  set a tickle power here.
PWMMax - > I set mine to 97%. This keep sme from driving at 100%, not good for some lasers. For high voltage
                  lasers Id recomment finding the pwm for the max MA you wish to use and set it there.
PWMMinPower  ->This is a setting I set to 2 , to indicate its the turn on power of my laser. The program will scale its levels
                  from this level up, so if your laser doesnt turn on till a PWM of 20 or 40, set that here. If , for example it turns on
                  at 30% pwm, then Auggie will scaled 3d and photos from 30-maxpwm as 0-100% power..


  Ill post more as we figure out more from YaNvrNo's test site. He's a great tester and has tested most of Auggie over time,
so if we dont electrocute each other, we'll post details on success or failures. :)

  Let us know how it goes.

Art


User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

One more piece of data, ( because threads such as this exist for years and many tend to read them for info..)

The following photo shows the Pokeys57 revision 2 changed the PWM location on the TestIO connector. As indicated by the arrow..

Art
Attachments
mine.JPG
Ya-Nvr-No
Old Timer
Posts: 188
Joined: Wed Sep 08, 2010 11:15 am

Re: Realtime PWM mode added.

Post by Ya-Nvr-No »

Here is a view of my wiring on the laser board, I tried to label the connections, but it turned out to be quite straight forward. That is other than the pot plug had to be removed for the pokies pwm to control it.

In my case I used the OC's you just have to provide the OC+ with the voltage source from the buttons (note where the +/- are) and when the pokies turns on that OC it closes the contacts just as if I pushed the button. I wired them so I can still use the buttons in a manual mode. I also added a remote Test button so I can fire if i need to walk around. (not necessary but it makes it nice for laser/mirror alignments)

So hopefully you can see on one side I send the signal over "TO" the pokies thru a terminal block then the pokies is connected OC- "FROM' back thru the terminal block. (more that you follow the logic then using this hardware)

And then the pwm test connector art showed in my photo above was just connecting my choice (Pin22 PWM2) back to the center tap of the pot with a common ground from both laser and pokies boards.

In my case it takes about 2volts to start to fire the laser, somewhere around 42% on the pwm slider. And that's what lead to the scaling routine Art created for your particular requirement.

Safety Note: stay away from the left side of the board if testing with button or firing laser. Take my word for it ;)

its pretty straight forward and damn cool to see in action.
Attachments
laserwiring.jpg
Joakim
Old Timer
Posts: 56
Joined: Mon Sep 17, 2012 5:48 am

Re: Realtime PWM mode added.

Post by Joakim »

Art:
I have summed it up for my board and have made a sketch (only handmade).

1) The power is controlled with PWM 2 on Encoders pin 9 and GND on pin 10. (It is the same as DB-25 connector or Test IO connector but without the version confuse).

2)  The Laser On/Off button is connected to OC1 on the Galvanically Isolated I/O.

3) The Laser Fire (Test Switch) is connected to OC2 on the Galvanically Isolated I/O.
This input bypasses the opto coupler on K40, but it makes sense as Pokeys has its own opto isolation and the delay will be less.

Ya-Nvr-No:
I made the drawing before I saw your post. Only difference i see is that we switched OC1 and OC2. I haven't made the physical changes yet so I will change to match your configuration.
What I don't understand is the PWM connection to the power pot. If I measure the voltage on the center pin it is about 1.22V. Switching it to ground will not give the correct voltage (0.9 - 3.5V) as the pot gives.

I will keep the manual switches as well - good idea.

Just a short status - I will be away this evening.
Attachments
P1060902 - Forum.jpg
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

J:

Looks good. As to the pot,  the center tap being connected to the pwm means it shoudl see from 0 - 5 as pwm goes up.
The 0volt line of the pot is connected to pokeys ground just to give it a referance for the pwm.. You do need to remove the pot
though.  You sould then be able to measure form 0-5 volts as you slide the pwm slider on the pokeys software..

If so, your good to go, we're runnign tests, so we'll tell you what to look for as we find weaknesses in setting up..

Art

GlennD
Old Timer
Posts: 80
Joined: Tue Oct 18, 2011 4:19 pm

Re: Realtime PWM mode added.

Post by GlennD »

I only unhooked/hooked the TTL line and the PWN line (sorry for the dark blurry photo).
I did that to just test it out.
I still have to hook in the water pressure switch and a door switch but it runs.
I am pulling the 24v off of this power supply to run the Pokeys as well.
The blue wire labeled 2 goes to the Relay OC1
The black wire with the label is using Pin20 for PWM(PWM2).  I have it run through a small 3.3v to 5v booster circuit.
I used encoder connector since it had a smaller foot print.

The bob I am using is shown as well.

I will post a picture, I got off of the google K40 site, over in the laser stories side.
It looks reasonable.

Glenn
Edit was removing some possible confusion with the pin number P20 is PWM Pin2 not pin2
Attachments
PSLaser.jpg
PoKeysBobR2.png
Last edited by Anonymous on Mon Apr 25, 2016 1:40 pm, edited 1 time in total.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

Thx Glen:

  Looks like its all coming together..
  :)

Art
Joakim
Old Timer
Posts: 56
Joined: Mon Sep 17, 2012 5:48 am

Re: Realtime PWM mode added.

Post by Joakim »

Art:
I understand PWM 2 is not OC and will drive the laser power pin (as pot meter). I forgot that PWM 2 is a "normal" PWM.

Running latest Auggie 1.47(b) I get RT PWM on axis 8 and nice PWM signal on Encoder pin 9 (PWM 2) when pressing the fire button.

I ran into another problem:

1) Reset system. OK.
2) Reference all axis. OK.
3) Trying to jog X and Y. OK.
4) Issuing G0 X50 Y50 in single line windows. Nothing happens and the system seems to lock up.
5) Only solution is to reset system.

Log file says:
52:41:97  Setting Fold: -1
52:47:743  OverSpeed: GLine:1, s0:0.0000 s1:0.0000 d:22.0049 t:1.#INF
52:47:743  Motion Disabled
52:47:774  Clearing Motion buffer of entries

I have been through the configuration but it seems to be fine.
Feedrate are non-zero (F400) override is 100%, limit switches are not engaged.
Where should I look for the error?

I will wait with further wiring until movements are working.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

Hi J:

Sounds liek we're getting close..

>>52:41:97  Setting Fold: -1
52:47:743  OverSpeed: GLine:1, s0:0.0000 s1:0.0000 d:22.0049 t:1.#INF

  This is a planner error, the t: is time, and it looks like its trying to move
22.0049 units at a speed which somehow is getting trashed by a division
by zero somewhere. ( The 1.#inf is a reaction to impossible math).

  Its something I should be checking , so Ill fix it when we figure this out.
Check your axis, X,Y,Z, (and A) if your using a 57, XYZ otherwise, and make sure they
all have a steps/unit and a max and min velocity set. It may be its trying to move
"A" axis, you have none, but the numbers are there and cause the failure. 
  If your not using an axis, give it numbers from the X axis.. if Im right and
its just an axis with no numbers, let me know and Ill add code so that
cannot happen anymore.

In specific: the line

OverSpeed: GLine:1, s0:0.0000 s1:0.0000 d:22.0049 t:1.#INF


is generated by the planner when it tries to move using current
setup accel , and steps/unit and it gets a move faster than 115Khz
in steps, or an impossible amount....  A move, any move,
even if in only one axis still requires computation of the other axis,
so check they all have numbers in them.

  Sorry for that, as we find such things now I will do a permanent
safety repair, its running very well here functionally, so Ill do my
best over the next while to cure whatever ails configurations unlike
my own..

  Dans reporting crashes on GCode load, so things like that will be
searched for as well..

Thx
Art


Joakim
Old Timer
Posts: 56
Joined: Mon Sep 17, 2012 5:48 am

Re: Realtime PWM mode added.

Post by Joakim »

Art:

Thank you, it worked  :D  - All axis (X, Y, Z, A and 5 - 8 ) now has valid entries and movement is now again possible on PoKeys57CNC.
I have disabled axis Z, A and 5-7 as they are not used at present.
Will low parameters for unused (enabled = false) axis slow down movement from the motion planner?

I will now proceed with wiring up laser fire and power control, one at a time...

Where is the software connection between RT PWM out on the free axis 8 and the output to OC1 output, is it in the script somewhere?

I made a new X and Y end stop design with simple 3D printable part and two micro switches (didn't like the old design), giving the standard bed a larger working area. I could put it up on the forum for others to use if you like.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

Hi Joakim:

  Only an axis to be included in a motion will affect the speed, so you should be OK, Ive added to my list
to put in appropriate values for unused axis. Thx for the note. ( As you can imagine, in a 1 year old
controller there are, as of yet, probably hundreds of such small items to fin and correct.. :)

  Watch the latest video I posted 2 night ago on configing the laser, it shows where to set the PWM channel
that the freeaxis will drive. Select a PWM channel there and the appropriate pin will then have the PWM
controlled by the freeaxis.. ( You dont actually use the freeaxis, its just a transfer mechanism to the
PWM controller... and a great indicator that its working..

In config/Planner config is where youll find all the settings..

IMPORTANT:

  After changing any config item related to pwm, press the LIB button, then Done on the librarians
dialog, this restarts the scripting engine so the script globals for the PWM variables are updated..

Thx
Art
GlennD
Old Timer
Posts: 80
Joined: Tue Oct 18, 2011 4:19 pm

Re: Realtime PWM mode added.

Post by GlennD »

Art
With the update you just posted (1.48), I can now cut the same as I was with the DSP.
600mm/m 85% and 2 passes in 5mm acrylic.

Code:

M3
G1x10
Y10
X0
Y0
M5

Working on the airblow now.

Thank you
Glenn
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

Glenn:

  Thx for the report, nice to  know.  Im having so much fun testing various images and such
I cant drag myself to the code enough..  lol


Glad to hear we can cut as well. There is some internal problem that can cause stuttering on short vector programs, or at least Ive seen it while debugging, but other than that Im pretty happy with
how its running.

Are you still getting crashes on GCode loads?

Art
GlennD
Old Timer
Posts: 80
Joined: Tue Oct 18, 2011 4:19 pm

Re: Realtime PWM mode added.

Post by GlennD »

Art
I think the crash was of my own making.
The combo of the M3 and the G110 using the same PWM pin.

So this was weird installed the new version cut great a I said went to rerun that photo I posted in the in the laser stories and the power slider did nothing had it on Zero and it was still cutting full on.

I deleted the Gearotic motion directory and started over. 
Everything is working great now.  Slider is fine and I am moving at 12000 mm/m no problem currently.

The jitter that would happen every once in a while is also gone.

This is so cool thank you again..
Glenn
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests