Machsupport Forum

Third party software and hardware support forums. => PoKeys => Topic started by: madeintheshed on July 11, 2014, 12:42:19 AM

Title: Pokeys on board power supply
Post by: madeintheshed on July 11, 2014, 12:42:19 AM
Hi,
Is it OK to use the 5v and 3.3v terminals on the Pokeys 56U to power analog inputs and rotary encoders or should I use a separate power source for these?
Title: Re: Pokeys on board power supply
Post by: NeoTO on July 11, 2014, 04:18:25 AM
Please take a look at the 6.4.  Electrical specification – static characteristic table in the PoKeys manual. The 5 V pin can be used to source up to 400 mA, while 3.3 V pin can source up to 120 mA.
Title: Re: Pokeys on board power supply
Post by: madeintheshed on July 11, 2014, 08:19:01 AM
Thanks for your reply. I do have a separate source which I will probably use on the final panel build but whilst experimenting its nice to keep it a bit more simple and use the on-board supply.
I had my first play with the Pokey 56U tonight and found it very nice to use. Set up  a pushbutton switch, an encoder, a potentiometer, a toggle switch, some rotary switches and mapped them to Mach 3. Had a fair bit of success getting them to do what I wanted to do, but have a couple of issues you may be able to help with.

I've mapped the rotary switch to the step increments and they are changing fine on the Mach3 MPG screen, but when I turn the encoder 1 detent, it doesn't matter what step value is set, the axis only moves .0635mm This is OK as when I turn the encoder as fast as I can, its about at maximum speed for my steppers, I would just like it to be multiples of 10.

I want to use the toggle switch to turn block delete on/off. I assume I would need 2 inputs to Pokeys from this switch - 1 for on and 1 for off and map them to block delete on and block delete off. As this is controlled by a single toggle button in Mach 3, I guess I would need to create a separate on and off button in Mach 3 to get this to work?

Pokeys is seeing the potentiometer and I can see the voltage varying from 0-3.3v but I cant work out what DRO to map it to to get the feed rate override changing.

I'm sure I would eventually work these out, I guess I am just excited and want to get it all up and running.

Title: Re: Pokeys on board power supply
Post by: NeoTO on July 12, 2014, 06:03:30 AM
Mach3 MPG - are you using PoKeys56U for generating pulses for the motors? There are some issues in how Mach3 handles the MPG jogging by itself (and not using LPT port for MPG).
Block delete: if you are using a button (not switch), then use the mapping to button 176, which toggles the block delete mode. If you are using a switch, map its signal to OEM LED 66.
Regarding potentiometers - to minimize the noise, it is advisable to wire the potentiometers to PoKeys's 3.3V pin.
Use OEM DRO 821 to override the feedrate DRO. Enter proper offset and gain values in the analog input dialog options (see the Pulse engine and Mach3 plugin manual on this).
Title: Re: Pokeys on board power supply
Post by: madeintheshed on July 12, 2014, 10:01:37 PM
No, I am not using Pokeys for generating pulses for the motors, only for "switch" inputs and maybe some LED indicators. When you say issues with MPG do you mean when using Pokeys or using the MPG in General? Yesterday I got it working nice, but now its doing some real strange things - not moving when I move the encoder, but then after a few seconds taking off and not stopping! I may have changed something whilst experimenting but I've checked all my wiring and assignments and I cant see anything wrong.
I got the pot working for feed override- as soon as I entered values for gain and override, it works. I have changed to a rotary encoder (which has a pushbutton built in for reset) as I think this will be more practical to use and this is working as expected..
Still working on the switch tho, mapping the assignment to an OEM LED does nothing.
Maybe a nice coffee and some lunch to refresh the mind will help.......
Title: Re: Pokeys on board power supply
Post by: madeintheshed on July 13, 2014, 05:24:44 AM
Well I have everything working now except for the toggle switches. Just cant seem to get my head around it! Even got some LEDs being controlled by the Pokey too.
I couldn't find an issue with the encoder for the MPG, so I reset all the inputs and re did the wiring so the switches were mounted on a board rather than just being connected by a jumble of wires. Working fine now, just need more thoughts about the toggle switches.
Title: Re: Pokeys on board power supply
Post by: madeintheshed on July 18, 2014, 09:20:36 PM
Well, I still cant get this to work. I've even tried wiring both side of the switch to the same input but I still have to do a double movement on the switch. This might be because its not an instant switch over state and there seems to be a small amount of NC to either side during transition.
I just read about using a capacitor in series with the switch may work so I'm going to try that, but surely someone has had this problem and found a work around before.
Title: Re: Pokeys on board power supply
Post by: NeoTO on July 19, 2014, 03:18:51 AM
Some Mach3 functions behave like a toggle switch and require one actuation for turning the feature on, and another one for turning it off. A workaround on some functions can be done by mapping a switch input to OEM LED (these are not only used for outputs).
Title: Re: Pokeys on board power supply
Post by: madeintheshed on July 19, 2014, 04:08:00 AM
Can you elaborate on mapping the switch to an LED please, no matter what I do, cant get it to work.
I assume I connect my switch to pin 12 and then in the Mach 3 plugin, I set it as an input and map the LED to 66? If that's what I do, it doesn't work. Ive also tried other LED numbers and no result either.
Title: Re: Pokeys on board power supply
Post by: NeoTO on July 20, 2014, 03:28:53 AM
It appears that Mach3 does not allow the block delete function to be controlled from a switch and requires a button instead. I would suggest replacing the switch with a pushbutton with LED.
Title: Re: Pokeys on board power supply
Post by: madeintheshed on July 20, 2014, 06:12:11 PM
Thanks for that advice, I was starting to think that was the case. I did try and Map to some other OEM LEDs to check my process was correct and was unable to get any of them I tried to work with the method I described above. Is that the correct process?
Title: Re: Pokeys on board power supply
Post by: NeoTO on July 21, 2014, 12:02:10 AM
Yes, your approach is correct. Unfortunately, it is unknown to me which OEM LEDs allow you to do this and which ones don't.
Title: Re: Pokeys on board power supply
Post by: cncalex on July 25, 2014, 12:53:14 PM
Just tried with a momentary switch and it is working fine here.
Alex
Title: Re: Pokeys on board power supply
Post by: madeintheshed on July 25, 2014, 06:54:27 PM
Hi Alex, Yes Momentary switches work fine, and I am using them for lots of other functions.
What I wanted to do was to use a toggle switch to control these functions so that pos "off" forced block delete off and position "on" forced it on. I have been able to design a little circuit that emulates a momentary switch , sends a low pulse on each change of state of the switch (on - off or off - on) and this works great, just like a momentary, except it doesn't force the state (off position on the switch can be in fact on)
I'm now looking at creating separate on/off buttons for these in mach3 and mapping 2 inputs from the pokeys to them. That's todays project, so I will report back on that one.
Title: Re: Pokeys on board power supply
Post by: cncalex on July 25, 2014, 11:27:57 PM
I understand now  what you are trying, but as far as I know this will not work because the Block Delete function is a toggeling function within Mach3.
Or in other words it can't be forced to stay on or off.
Alex
Title: Re: Pokeys on board power supply
Post by: madeintheshed on July 25, 2014, 11:52:37 PM
Correct, the current button in the standard set has a toggling effect.
I have created 2 new buttons in Mach3 using Screen4 with some VB script and one turns it on, one turns it off. This works well. Now I just need to map a pokeys input to these new buttons, and that is where I am struggling at the moment.
I can get it to work with assigning hot keys, but there is another issue in that these are ignored if Mach3 does not have the focus on windows.
I am starting to think illuminated press buttons will have to be the answer, but finding some with enough colour range at the right price is a challenge in itself.