Control panel

More
3 months 2 weeks ago - 3 months 2 weeks ago #347736 by GeckoWorks
Replied by GeckoWorks on topic Control panel
Oh, can't believe I hadn't even searched for Syntec here.
I have literally spent the last week looking for used SK panels and trying to figure out what's what with them.I would be very, very interested in hearing more about your exact board and what's underneath your Arduino and next to it.  
Now, feel free to skip to the bottom as next I was asking questions that you have actually answered already - I just didn't know enough to realize:)

Skip From Here...
Newer SK panels have a small "matrix chip" surface mounted to the button side of the PCB (just inbetween button switches), older ones have a larger one on the backside (often a Holtek) and even older ones have a whole daughter board attached to the back side with a what Syntec calls a "decoder module". I always assumed the chip would spit out a proprietary serial link. I had no idea they were talking PS/2... Well, I thought perhaps the older ones were based on the Holtek model numbers.

But I have been trying to avoid newer boards because I wanted easy access to the matrix. I also had no idea the matrix is actually availble on the "HK Connector" - but that's how it looks from your picture. It looks like the Arduino is connecting to the HK. Or is the HK sending out PS/2 to your arduino? In which case your panel must indeed still have a "matrix chip somewhere" and your Arduino turns PS/2 into USB? 

Also, how do you control the button LEDs? 

If you could find time to share some more on how you made this work, I would be very grateful. I would mostly likely go this way as apart from ideally wanting more overide knobs, the SK4/6M panels have a really nice set of control buttons - plus the alphanumeric keys, too.

On a related note - as for turning the matrix into USB, when I asked AI about how to hack older SK panels it suggested this approach but to also make a combo USB protocol of HID plus a gamepad or joystick library. That way, supposedly, when doing the HAL connections you don't have to venture into weird combo USB presses to map the buttons that HID has no library for. So, you'd use HID for the regular stuff it already has and then gamepad library for everything "CNC" and it would just be passed through as button 1, button 2, etc. 

Also, I did talk to a Chinese vendor had to check back with the factory on the protocols and how open they actually are but between the language barrier and me only wanting to buy one, he kinda lost interest, haha. But I think he said they could deliver bare matrix, USB-HID and more.  

Skip To Here:)
[EDIT] I really should learn to read. You specifically explained the SK panel does both PS/2 and matrix. So, now I think the PS/2 signal may be coming into your arduino from that 5 pin connector in the corner of the board that says "to keyboard" and the matrix comes out of the HK Connector. Also, you even said the matrix is shared for both buttons and LEDs. So, there we have it:) What wonderful detective work you have done to make these panels work! 
So... would you be inclined to share the code and pin mapping to help others along:)? 


 
Last edit: 3 months 2 weeks ago by GeckoWorks.

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #347762 by Mr. Mass
Replied by Mr. Mass on topic Control panel
Ha, that's spot on—I really did feel like a detective sometimesimage missing /media/kunena/emoticons/smile.png
The top part is a standard PS/2 keyboard; I connected it to the computer using a PS/2-USB adapter. I remapped the keys, mainly to access lowercase characters (Remap the Shift + button, just like in the original system).
The lower part is connected via an Arduino and an ArduinoConnector ( forum.linuxcnc.org/show-your-stuff/48630-arduino-io-expansion ).
On this keyboard, the pinout is rotated 90 degrees relative to the visual orientation, and not all pins are used. I added a pinout; I hope this helps.
P.S. The SK6 keyboard has a visually different circuit board; I haven't checked it, so all of this applies only to the SK4.
The following user(s) said Thank You: GeckoWorks

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago - 3 months 2 weeks ago #347766 by GeckoWorks
Replied by GeckoWorks on topic Control panel
Mass - thanks so, so much!:)

This is sweet. I will dive deeper into it in the days to come and the project you linked to. But I am almost sure I will buy a (used) SK4/6 panel. I wouldn't be surprised if they all come with the PS/2 + matrix combo. (Some will possibly be USB+matrix but that would just be a win). I know, no guarentees - also in terms of pinout and such, but the main foundation is certainly there as you have shown. And most important, nothing locked behind a proprietary serial protocol either, it seems.

But any chance you could share the code, too?
Having looked at the github for the Arduino-LCNC project a bit, I now realize that the matrix never gets turned into USB-HID or gamepad protocol, at all. Interesting. Maybe a better more direct approach.

Not that I really know what I will be looking at but with the help of Gemini, I managed to make a nice custom version of the NanoELS FW (an open source electronic leadscrew project) for my little lathe. Had to get DRO scales implemented and add some other features - and I actually managed to do so on code level. So, hopefully the robots can help me on this project, too. 

Various Panels
As for SK4/6 I actually think they share the same layout 100%. I think I have even seen some SK6s with SK4 printed on the PCBs - but I could be wrong as I have looked at sooo many pics lately.
But there's also an SK5 which does have a slightly different layout. (Attaching pics of SK4/5/6).
Most often SK4 has membrane buttons whereas the SK6 often has tactile ones. I am leaning towards the latter.
But looking at SK PCBs get confusing very fast as there are so many different itirations of the SK4/5 plus a bunch of clones. 

Encoder Overrides?
BTW, it looks like you swapped out the clicky rotary switches for pots or encoders? So, no hardstops at each end but possibly better "sync" between screen and knob, is that it?
I think I will try to stay with the rotaries and see how they feel. 
Last edit: 3 months 2 weeks ago by GeckoWorks.

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #347804 by Mr. Mass
Replied by Mr. Mass on topic Control panel
I used the code from the link above; you just need to add your own pins in config section(yours may be different). If it helps clarify things, I've attached my version of the code.

As for the difference between the SK4 and SK6—I've held both versions in my hands; the button layout is the same, but the circuit boards are different. So if you have the SK6, things might be different there.

Yes, I replaced the original rotary switches with encoders. I find encoders much more convenient—I don’t have to check their position every time; I can just turn them in the right direction. And they have a button; I’ve mapped pressing it to set FRO and SRO to 100%. Plus, if you use the stock ones, you won’t be able to adjust the settings from the screen (to avoid confusion in the readings, you’ll have to disable the on-screen sliders and leave only the current value displayed). That’s why we’ll always use only these rotary switches. With encoders, there’s no such problem—you can adjust the FRO and SRO both from the screen and using the encoders.
The following user(s) said Thank You: GeckoWorks

Please Log in or Create an account to join the conversation.

More
3 months 1 day ago #348261 by GeckoWorks
Replied by GeckoWorks on topic Control panel
I was away for a bit but thanks so much Mass.

Thanks for elaborating on why you went with encoders. Syncing with display sliders and resetting to 100% on a press of the knob sounds like good ideas.

I think I read somewhere that the sliders can be made to move with the rotary switches and then if you go to make an adjustment on the slider, it overrides the physical knob. And then when you turn the knob again, that takes over and the slider follows along.
But I can imagine going back to the knob might make some abrupt speed changes. So, having full sync all the time and thus encoders sounds preferable unless one is OK with never/rarely using the sliders.

In the meantime, I picked up three used panels for a steal. They are not SKs but the arduino project and your info will still come in very handy when it's time for me to try to hook them up. If I give up on those, they were so cheap, I can grab an SK4 and make it happen faster thanks to this thread:)

Please Log in or Create an account to join the conversation.

Time to create page: 0.320 seconds
Powered by Kunena Forum