PIC32MX KBD

zool

02 Mar 2017, 13:28

I'm putting the finishing touches(almost) my first keyboard build, just happens to be split into to boards.

The motivation is a practical one, I'm rebuilding a 3 axis cnc mill and the main Fanuc controller is missing, and who wants to store your gcode on reel to reel tape anyway, well ok that might be neat, but not really practical for what I need. So I have replaced the cnc controller with a modern PC and a couple of FPGAs, but now I need to get a good way to interface with the system as the old HMI is dead. None of the panels I looked at really suited my purpose.
hmi-old.JPG
hmi-old.JPG (2.65 MiB) Viewed 4430 times
Any idea on those keycaps?
hmi-plan.JPG
hmi-plan.JPG (2.63 MiB) Viewed 4430 times
The plan, use the same space to fit in two keyboards and a touch screen.

Here are the two boards a 44key and a 59 key.
44key.JPG
44key.JPG (1.67 MiB) Viewed 4430 times
I really like this one. I got extras to make up a desktop version.
59key.JPG
59key.JPG (1.88 MiB) Viewed 4430 times
I've used a PIC32MX270F256D as the mcu as I'm kind of familiar with PICs, I don't see many PIC mcu in keyboards, I'm going to guess that is because of the boot loader and lack of friendly keyboard firmware. Anyone usings PICs?
cnc-kbcontroller.JPG
cnc-kbcontroller.JPG (2.49 MiB) Viewed 4430 times
The few LED's that there are come off a 16 bit i2c port expander (not really necessary) but the keyboard controller gets will get used in other places around the cnc machine and I wanted to have the extra io for that. The port expander I wish I had not put on the bottom of the board as it will not quite sit as flat as I would have liked and I have to space controller off keyboard by at least 5mm.

The plates are stainless steel and the whole assembly is very rigid. There is provision for a back plate to mounted that is the same size as the PCB +0.5mm. Main purpose for this is keep other cables inn the HMI box away from the keyboards.
switchplate.JPG
switchplate.JPG (1.6 MiB) Viewed 4430 times
I used plate mount Gateron greens.

Some oddites:
I use a 10kHz scan rate (over kill, but... it does a very nice snappy keyboard), usb on the OS still only reports at 500Hz(linux), donno why but I could not get 1000Hz working, either way I have already denounced, mapped, and timed ordered the key presses and releases by the time comes around to send the next key report. Gateron Greens don't seem to have much bounce, but I have not put them on the oscilloscope to see what they are really like.

The RJ45 connector is for RS422, which is runs a protocol which talks directly with the FPGA. Some key go over usb, some go over RS422. If I dont populate the RJ45 or the RS422 chip it is a normal uart, and I use that for debugging on my development board.
44back.JPG
44back.JPG (1.87 MiB) Viewed 4430 times
devboard.JPG
devboard.JPG (2.95 MiB) Viewed 4430 times
I had planned on putting an micro sd card on the back and using that as a USB mass storage device as well as a place to load new keymaps from, but a via appeared where it should not have been, anyway not for this version but maybe the next version if there is ever one. I'm liking the way ELF is going so I might just use that in the future.

Still todo. numpad mouse. but that might be a while before I get around to programing that.

User avatar
Ratfink

02 Mar 2017, 15:48

Wow, really nice work! Where did you get the keycaps with all those special CNC legends?

User avatar
Daniel Beardsmore

02 Mar 2017, 18:50

Hang on, wait, what?

If I am guessing correctly, there are no actual switches behind the keycaps in the original panel? Just the keycaps themselves?

I have no idea whose keycaps those are. FANUC was created by Fujitsu, but some equipment uses [wiki]Omron B2R series[/wiki] switches, in particular the [wiki]FANUC System P Model G[/wiki]. Other hardware uses [wiki]Fujitsu Leaf Spring[/wiki] I think, and there's possibly another switch type I couldn't identify.

The keycaps don't appear to be either Omron or Fujitsu, so they remain a mystery. Currently very little is known about FANUC equipment keyboards and keypads.

zool

02 Mar 2017, 21:18

Ratfink wrote: Wow, really nice work! Where did you get the keycaps with all those special CNC legends?

They are from WASD keyboards. I think they did a really nice job off them, and with a little tweaking they managed to fit both off the keyboards onto a single 104 key layout.

zool

02 Mar 2017, 21:51

Daniel Beardsmore wrote: Hang on, wait, what?

If I am guessing correctly, there are no actual switches behind the keycaps in the original panel? Just the keycaps themselves?

I have no idea whose keycaps those are. FANUC was created by Fujitsu, but some equipment uses [wiki]Omron B2R series[/wiki] switches, in particular the [wiki]FANUC System P Model G[/wiki]. Other hardware uses [wiki]Fujitsu Leaf Spring[/wiki] I think, and there's possibly another switch type I couldn't identify.

The keycaps don't appear to be either Omron or Fujitsu, so they remain a mystery. Currently very little is known about FANUC equipment keyboards and keypads.
Oh no the existing keypad is fine and probably could have been resurrected but I did need a keyboard for the computer system and there was not so much room, plus a few other problems, mainly that the HMI as a whole is all discrete IO with a plus a couple of BCD encoders. I couldn't quite spare that much IO without more $ and the mono CRT display and power switches were high voltage. And how to drive the display gave me a bit of a head ache.

The old key pad switches are indeed OMRON B2R and are batch "M1 06Z0R" they are tall linear switch with a heavy spring, a little squeaky and are sealed in a little rubber boot. The panel was manufactured in 1981. I'll take some pics.

User avatar
Daniel Beardsmore

02 Mar 2017, 22:35

"G1" type has what I consider hand-wiring tags, while "M" type has solder terminals. I'm not sure what "M1" means, but "M1" is sold here and it has that rubber cover:

http://china.makepolo.com/product-detail/8870669.html

The non-rubber-cover version doesn't show its sub-series code, but the page seems to suggest that it's "M". "M1" is on sale on eBay but they're marked "M" and it's the type I have, from the System P Model G (non-covered).

Hopefully one day we'll find some written documentation.

zool

03 Mar 2017, 09:42

Daniel Beardsmore wrote: "G1" type has what I consider hand-wiring tags, while "M" type has solder terminals. I'm not sure what "M1" means, but "M1" is sold here and it has that rubber cover:

http://china.makepolo.com/product-detail/8870669.html

The non-rubber-cover version doesn't show its sub-series code, but the page seems to suggest that it's "M". "M1" is on sale on eBay but they're marked "M" and it's the type I have, from the System P Model G (non-covered).

Hopefully one day we'll find some written documentation.
Thanks for the links.
here are some pics of the old keypad.
hmikeypoad.JPG
hmikeypoad.JPG (2.35 MiB) Viewed 4325 times
hmikeypoad2.JPG
hmikeypoad2.JPG (2.36 MiB) Viewed 4325 times
hmikeypoad3.JPG
hmikeypoad3.JPG (2.57 MiB) Viewed 4325 times
hmikeypoad4.JPG
hmikeypoad4.JPG (2.8 MiB) Viewed 4325 times

User avatar
Daniel Beardsmore

03 Mar 2017, 18:35

It's a pity that you don't have the LED version as I want to see what's inside one of those.

User avatar
Menuhin

03 Mar 2017, 19:29

Definitely the most handsome 40% staggered keyboard I have seen - I really like the layout and may want to build a similar board like this in the future.

The preonic I would say is the most 'useful' preonic ever, because almost all enthusiasts are building Preonic and Planck as their side toy projects and these boards are rarely main drivers. A control panel for a CNC milling machine? This gives real meaning for this handsome board.

Two thumbs up! 8-)

Parak

03 Mar 2017, 19:38

Reinventing the cnc controller from scratch, with FPGAs no less, is some seriously hardcore work!

PICs are mostly unheard of around these parts, but it's always nice to see people using something different from the typical AVR. Yeah, bootloader and lack of sample firmware are typically the biggest problem, along with various quirks with setting up compilers.

A couple of us are using Cortex M3/4 chips from NXP and Cypress and such for more substantial work (at a lower cost, too).

zool

04 Mar 2017, 04:48

Menuhin wrote: Definitely the most handsome 40% staggered keyboard I have seen - I really like the layout and may want to build a similar board like this in the future.

The preonic I would say is the most 'useful' preonic ever, because almost all enthusiasts are building Preonic and Planck as their side toy projects and these boards are rarely main drivers. A control panel for a CNC milling machine? This gives real meaning for this handsome board.

Two thumbs up! 8-)
Cheers, Once the 44 key firmware got to a certain stage I was using it to write the code for itself. :)
It took a little bit to get used to; esspecially the tab key palcement and "./" combo and pipe kept throwing me off.

Having the backspace so close is really nice, makes up for being only a 1u key, and enter is is well placed, the short space and thumb layer is pretty good, but I think I next time i might try and put the up shift and down shift side by side and shift the space bar to the right by 1u. but that is just my preference as I'm much more of right thumb spacer.

Things that I really liked and would carry over to other designs.
- Dedicated sysReq key.
- Shift / Shift Lock agrangment
- Shiftable or layer modifed backspace to Delete
- Shift lockable layers.

zool

04 Mar 2017, 04:58

Parak wrote: Reinventing the cnc controller from scratch, with FPGAs no less, is some seriously hardcore work!

PICs are mostly unheard of around these parts, but it's always nice to see people using something different from the typical AVR. Yeah, bootloader and lack of sample firmware are typically the biggest problem, along with various quirks with setting up compilers.

A couple of us are using Cortex M3/4 chips from NXP and Cypress and such for more substantial work (at a lower cost, too).
Now that atmel has been folded into microchip I think there is more even more reason for variety. The NXP chip in the ELF is something I'm looking forward to having a in depth play with.

It is a little out of the scope of keyboards but the CNC it is a whole heap of fun. Luckily the machine came with a almost complete set of circuits. (sorry Daniel, nothing on the keypad) But I do have a Fanuc reference manual for the system 6.)

The FPGA is not my own solution, all the really hard work has been done by Linux CNC and Mesa Electronics
https://store.mesanet.com/

Even with those it is still quite alot of work to get it to run, even more work to get it to run well.

I have already converted a much smaller stepper motor CNC to a closed loop AC servo system so it not all new. But the scale is a little more scary, the machine that the keyboard attaches to weighs in at a good 6 tonne, 7.5kW spindle and ~2kW DC servos. :evilgeek:

HuBandiT

08 Mar 2017, 20:49

FWIW, I do have a few PIC-based keyboards in various stages of planning/prototyping.

User avatar
rsbseb
-Horned Rabbit-

08 Mar 2017, 22:53

Simply amazing, I love seeing retrofit projects and you're killing it on this one. Industrial beauty at its best.

Post Reply

Return to “Workshop”