Author Topic: Tipro 128 PS/2 Hack (Cherry RC 128 Branded)  (Read 6381 times)

0 Members and 1 Guest are viewing this topic.

Offline webchimex

  • Thread Starter
  • Posts: 5
Tipro 128 PS/2 Hack (Cherry RC 128 Branded)
« on: Wed, 18 May 2016, 09:35:15 »
(Correction Version 1.2)

Hello, everyone...

Before i start,   2 things....
1- I dont speak very good english, so please be kind and patient.
2- This post is about a work in progress, and i  present this info with no compromise.

About a month ago, i bought three NEW Tipro 128 (Cherry rc series branded) PS/2 keyboards in México. I bought them because the price was absolutely ridiculous (19.02 US Dollar). I did not know at the time how hard would it be to program them, as most of you know this series can only be programmed on 32 bit systems and adapter or Virtual boxes won't help at all. I opened them up and started checking what could be done.

There is an unfinished connector on the board  right next to the PS/2 / DIM  connectors  (CHECK PICTURE WITH RED CIRCLES AND ANNOTATIONS)  using a logic analyzer i  found out this port was an i2C protocol port. The data  consists of this bytes: 2, 4, 4, 1, #, #,  255. Those numbers are:
The number 2 is the slave address (check i2C protocol specs),  the two 4s i still don't know,  the number 1 is how many keys are you pressing at the same time, and the two last numbers are the key ids and the 255 marks the end of the packet, this way you can parse it easier. You get a row of numbers for pressing a key and a different one  when lifting the key. If you press several keys, it would send you a row like this: 2, 4, 4, 6, 131, 233, 122, 143, 111, 97, 255 (where the 6 is the number of keys pressed and the rest are the ids of the keys.

With an Arduino UNO i made a sketch to act as a i2c slave, On the sketch you need to select i2C address to (1)  because the Tipro uses 8 bit address while Arduino (standard) uses 7 bit, so you only slide the bits one click (Clock click). (SKETCH FOUND AT END OF POST)
When you capture the data with your Arduino you can do whatever you like with it,  parse it, send it over serial, or if you have an Arduino Leonardo you can make it pass as a regular USB keyboard.

Thanks and ask me questions if you need.

#include <Wire.h>
void setup() {
  Wire.begin(1);                //  i2c bus with address #1
  Wire.onReceive(receiveEvent);
  Serial.begin(9600);         
}

void loop() {
  delay(100);
}

void receiveEvent(int howMany) {

  if(Wire.available()){
  for(int i=0; i <= howMany;i++){
    byte c = Wire.read();
    Serial.println(c);
  }
  }
}



« Last Edit: Wed, 18 May 2016, 14:54:52 by webchimex »

Offline webchimex

  • Thread Starter
  • Posts: 5
Re: Tipro 128 PS/2 Hack (Cherry RC 128 Branded)
« Reply #1 on: Wed, 18 May 2016, 09:39:41 »
One more pic of the probes

Offline pixelheresy

  • Posts: 5
Re: Tipro 128 PS/2 Hack (Cherry RC 128 Branded)
« Reply #2 on: Mon, 13 February 2017, 14:56:32 »
What is the status of this experiment?

I am wondering, since USB controllers for the Tipro MID series in particular are increasingly rarer and rarer, and the PS2 ones stuffer from needing an actual PS2 port and 32-bit Windows to run the Changeme tool. Figuring out how to use an Ardunio/Teensy/etc. as an alternate controller for the Tipro would really open up these keyboards to greater hobbyist usage (and since the mainboards are fairly simple, study, and house Cherry switches that can be fixed/desoldered and replaced, these can be lifetime keyboards if we are able to get the controller worked out).

Anyway, planning on doing some similar tests in the future, so wondered if you found out anything more.

Offline webchimex

  • Thread Starter
  • Posts: 5
Re: Tipro 128 PS/2 Hack (Cherry RC 128 Branded)
« Reply #3 on: Mon, 13 February 2017, 15:47:36 »
Hello,

Well, more than an experiment was a way to make this hardware work for me, and it did. Still is doing it. I use my keyboards often with this hack i posted, i use them for robotics and computer use. Reading your post and thinking what to answer it came to me this: DONT be afraid of programming, that is all to it. Once you really need to use this set of keys you wont stop to find the right combination of code to take the most out of them.

The instructions i wrote are all you need to get you going with the keyboards. I stll recommend to my friends to try to use the original software and 32 bit solutions for easy access, but dont be afraid to spend a few dolares on a arduino leanardo and make this an authentic keyboard for your systems.

If you are stuck trying to connect or program an arduino i am willing to help you step by step.

I am glad someone found this post helpfull and i am willing to take it all the way to make you and your keyboard friends. ;)

Regards

Offline assertivist

  • Posts: 3
  • Location: Denver, CO
Re: Tipro 128 PS/2 Hack (Cherry RC 128 Branded)
« Reply #4 on: Tue, 28 March 2017, 16:27:10 »
Just picked up one of these on eBay, similar miraculous pricing ($38 incl shipping).

Can I ask a little more about your setup? I'm planning on running this using a Teensy. My original idea was simply to read the PS/2 output (using the tmk ps/2 to USB converter), but it seems like the I2C route would be a better option.

Did you find anymore info on the I2C protocol for this? For instance, did you ever find out if you can prod the indicator LEDs or the piezo on the board via I2C?

Any comments on the board in use? Does it feel good? Is the circuit NKRO?

THANK YOU for this post :), it is amazing and I cannot wait to play around with this board... it will be so super cool if I manage to get Preonic-alike functionality from a second hand POS keyboard.
Unicomp Ultra Classic USB 103-key
Matias Quiet Pro

Offline webchimex

  • Thread Starter
  • Posts: 5
Re: Tipro 128 PS/2 Hack (Cherry RC 128 Branded)
« Reply #5 on: Thu, 06 April 2017, 09:18:51 »
Hello assertivist,

Sorry for the late reply, i am glad you made to get one of these, they are great. I had to look for the term "NKRO", yes if you press multiple keys all get recorded, in their particular order, when closing and opening.
THe ps/2 - USB route is almost imposible if you have never programmed the keyboard before becouse it does not provide data until you program it thats why i went and scanned the circuit for raw data.

I have not made it to use the leds or the piezo yet.

I love the keyboard, it feels great and is sturdy and well built, defenetly not $35.

The upcomming weeks i will be working a  little bit more on the circuit, will post an update if i find something new.

Regards

Offline assertivist

  • Posts: 3
  • Location: Denver, CO
Re: Tipro 128 PS/2 Hack (Cherry RC 128 Branded)
« Reply #6 on: Sat, 09 September 2017, 00:23:06 »
It's been quite a while since you posted this, but I'm hoping to once again call you back, hopefully you can post the code you're using to use this as a keyboard. I have the I2C set up with a Teensy 2.0, and I'm very confused by the numbers that are coming back from the Wire library.

There doesn't seem to be any relation to the numbers that come out when i press buttons and their location on the keyboard.

Just wondering if you had some kind of map already.

Thanks!
Unicomp Ultra Classic USB 103-key
Matias Quiet Pro

Offline assertivist

  • Posts: 3
  • Location: Denver, CO
Re: Tipro 128 PS/2 Hack (Cherry RC 128 Branded)
« Reply #7 on: Sat, 09 September 2017, 12:01:21 »
OK, so, after playing around with trying to get my own map set up, I've realized that this circuit is pretty much unusable for me to type on. Holding down about four buttons in the right spots causes the circuit to beep wildly and send "no keys are held down" over and over. I assume this is because the circuit was just not designed for touch typing, but rather a hunt and peck type of entry by retail employees. In any case, I'll be pulling the PCB off of these switches to attempt another hand-wire, wish me luck!
Unicomp Ultra Classic USB 103-key
Matias Quiet Pro

Offline ErgoMacros

  • Posts: 279
  • Location: SF Bay Area
Re: Tipro 128 PS/2 Hack (Cherry RC 128 Branded)
« Reply #8 on: Sat, 16 September 2017, 18:03:09 »
Hi,

If you must hand-wire you have my sympathy.  ;)

Have you seen this? "another single switch circuit board" More complicated than what you need, but follow along.
  https://deskthority.net/workshop-f7/another-single-switch-circuit-board-t11420.html

But instead of 1-switch per PCB merge them to make up to a 4x4 matrix (Small PCB, less than 10x10cm), get 10 of them printed (use 8 ) for $25 at Dirtypcbs, or similar. Tie them all together with just a few wires. Install switches and diodes.


If you do go the hand-wiring route, I hope you've seem this:
  https://geekhack.org/index.php?topic=87689.0;topicseen

Cheers!
Today's quote: '...“but then the customer successfully broke that.”