test1
September 24, 2017, 11:17:39 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can attach photos hosted by the forum rather than using an external image hosting site, this means they will stay forever and not disappear after a year or two.
 
   Home   Help Search Login Register  
Pages: [1] 2 3 4
  Print  
Author Topic: Converting Wacom KT-0405-R from Serial to USB  (Read 31459 times)
Manni
New Poster
*
Posts: 19


View Profile
« on: January 06, 2012, 11:31:44 AM »

I want to use my old ArtPad II with Windows 7 x64. It's an old serial tablet which is connected to a serial port + a PS/2 port for power. I would like to keep the old connectors but they should be connected to USB (for power) and the Teensy. I think I take a PS/2 => USB adapter plus a serial connector and put it with a teensy in a small case.



At first I disconnected it from the usual COM1 port and connected it to COM3. With Realterm I sent different commands to the tablet but nothing happend. However, when I used the stylus I saw some data. It turned out that the tablet was still running at a higher baud rate, it was probably switched to a higher baud rate by the driver. I disconnected it, reconnected it, and there was response data at 9600 baud:

7E230D0A  7E234B542D303430352D5230302056312E332D330D
7E430D0A  7E4330363430302C30343830300D
7E520D0A  7E5245324331384330302C3030332C30332C313030302C313030300D


I then switched it to 19200 baud with this command: ~*F203C810,000,00,2540,2540. At 19200 baud I was able to receive the same data bytes as with 9600 for the command 7E520D0A.


When I then used the stylus I received the following data:

E0045C00041740E0045900041840E0044C00041C40E0043700042040E0042700042140E004240004
2140E0042800042040E0042F00041E40E0043300041D40E0043700041D40E0043F00041C40E00452
00041740E0046800041140E0047700040B40E0047F00040740E0050600040440E0050F00040140E0
051B00040140E0052700040240E0053100040440E0053800040640E0053D00040740E00543000409
40E0054800040B40E0054E00040D40E0055000041040E0055000041340E0054C00041840E0054700
041B40E0054300041E40E0054000042040E0053D00042140E0053900042140E0053600042240E005
3200042140E0052F00041E40E0052E00041B40E0052E00041840E0052F00041540E0053100041240
E0053200040F40E0053400040C40E0053700040940E0053C00040640E0054000040440E005430004
0440E0054600040640E0054900040840E0054E00040A40E0055100040E40E0055300041140E00554
00041440E0055700041840E0055A00041C40E0055C00042040E0055D00042640E0055D00042A40E0
055C00042E40E0055B00043140E0055900043440E0055800043740E0055500043940E0055100043D
40E0054900044240E0054000044540E0053800044540E0053400044340E0053100043E40E0052E00
043840E0052C00043140E0052A00042B40E0052A00042640E0052B00042140E0052E00041D40E005
3300041740E0053900041240E0054100041040E0054600041040E0054B00041040E0054F00041240
E0055100041540E0055200041840E0055300041B40E0055300041E40E0055400042140E005550004
2440E0055300042740E0055000042840E0054D00042640E0054A00042440E8054A08042456E80548
08042167E805450804210AE8054508041E09E8054608041B08E8054808041808E8054E0C041307E8
05570C040D06E805650C040506E8057608037F07E806030C037F07E8060B0C040408E8060F0C040A
08E8060F08041109E8060E08041809E8060C0C041E09E806050C042309E8057C0C042709E805750C
04290AE805690804290AE805600804270AE8055B08042309E8055908042009E805590C041B08E805
5A08041208E8056108040508E8056A0C037B06E805760C037406E806020C036F06E8060D0C036F06
E8061608037107E8061C0C037707E806200C037F08E8062108040709E806210C040F09E8061D0804
160AE806150C041D09E806070804240AE8057A0C042809E8056F0C04280AE805680C042509E80562
0C042009E8055E08041709E8055D08040D08E8055D0C040107E805620C037407E8056D08036906E8
057B0C035F06E806090C035A06E806130C035A06E8061C0C035E06E806230C036706E8062A080372
07E8062E0C037E08E8062E08040A09E8062D08041509E806260C041E09E8061A0C042809E8060A0C
042F09E8057A0C043009E8056F0C042F08E8056908042909E8056608042307E8056608041B08E805
680C041106E8056C0C040605E805700C037F04E805730C037C02E8057108037F72E0057100037F53
E0056F00040440E0056C00040540E0056B00040240E0056700037F40E0055F00037C40E005560003
7840E0054B00037640E0054100037240E0053A00036E40E0053600036940E0053200036340E0052C
00035D40E0052600035840E0052000035540E0051900035040A0051900035000E0216700154B40E0
216A00155140E0217800157E40E0220A00165940E0221000174640E0220F00182540E02218001873
40E0223000193140E0224200195340E0226000197C40E0227A001A1C40E02301001A2540E0231700
1A3B40E02345001A5340E02374001A5A40E0242D001A6140E02460001A6940E0247B001A7040E025
12001A7940E0252F001B0740E02548001B1540E0254C001B1E40E0254B001B2440E0253E001B3240
E02520001B4640E02508001B4F40E02476001B5340E02469001B5540E02461001B5740E0245C001B
5740E02457001B5A40E02451001B5C40E0244F001B5F40E0244F001B6340E02451001B6940E02454
001B7040E02456001B7B40E02457001C0B40E02456001C1C40E02455001C2C40E02453001C3E40E0
2451001C4E40E0244D001C5740E02448001C5B40E02444001C5A40E02441001C5540E0243F001C4E
40E0243E001C4440E0243E001C3C40E02440001C3740E02443001C3540E02446001C3540E0244904
1C3542E8244D081C3557E8244F0C1C3963E824510C1C3D6AE824510C1C406EE8244F081C4376E824
4C0C1C4477E82449081C4377E82449081C4076E8244A0C1C3973E8244D081C3271E82454081C2D71
E8245C0C1C2B71E82463081C2B73E82465081C2E75E824650C1C3276E824610C1C3677E8245C081C
3978E824540C1C3A78E8244F081C3979E82449081C3279E82446081C2678E82446081C1876E8244F
081C0473E8245C081B7973E8246A0C1B7673E824730C1B7675E824760C1B7E77E82477081C0C79E8
24770C1C1A7BE824720C1C237DE8246C081C237FE824650C1C1E7FE82464081C157FE82465081C08
7EE8246C081B7E7DE824760C1B797CE8247B081B797DE8247B0C1B7E7DE824790C1C037DE8247208
1C0A76E0246D001C0A40A0246D001C0A00




If anyone is interested to see how this device looks from the inside, here are some photos:


* ArtPad1.jpg (258.58 KB. 866x784 - viewed 1114 times.)


Some details:


* ArtPad2.jpg (172.59 KB. 1286x854 - viewed 1017 times.)


* ArtPad3.jpg (173.33 KB. 1286x854 - viewed 850 times.)


I did not take any photo of it but like in the GD-0405 (http://forum.bongofish.co.uk/index.php?topic=2083.0) there is also a ADM202 on the PCB.



But I don't actually think I will have to open it again. With all the cable mess under my desk, one more USB device simply does not matter. Smiley


Maybe one of the experts can now tell me if it should be really possible to convert the ArtPad II to a USB device. I guess so but I'm no expert then.

if it will work I would buy a Teensy ASAP.

Oh, right, I just looked it up, I could buy one on Ebay Germany.  Smiley For 52 USD. Sad On the other hand, when I order it at PJRC it would cost me only 26 USD  Smiley but it could take one to three weeks.  Sad

« Last Edit: January 06, 2012, 11:34:01 AM by Manni » Logged
Dragon
Full Member
***
Posts: 121



View Profile WWW
« Reply #1 on: January 06, 2012, 06:03:34 PM »

Looking good so far but I couldn't see an ADM202 chip in those pictures you sent.  If your board has one, and has a TR1R, try using a volt meter in "continuity" mode to see if the various points in Bernard's table are connected.  My GD-1218-R conversion log describes how to do that.
Logged
bernard
Administrator
Hero Member
*****
Posts: 2584


pato mania


View Profile
« Reply #2 on: January 06, 2012, 06:17:23 PM »

Dragon: The ADM202 appears to be on the left side near the bottom.

So the focus would be on the ADM202 and the SPLY (SupPLY) 5V power.  Take a closeup picture of the ADM202 area.

To be sure we are not making electrical mistakes, it would be better to test a few things with a multi-meter. That bring me to my first question:

#1- do you have a multimeter?

About "keeping your cables":

You want to keep your Serial+PS/2 cables and not make any electrical modification to the board?  If you want to go that route, then it will be more complex (to find the required parts) and more expensive.   The issue is the serial port.  The teensy's serial port uses "TTL" voltages (0V..5V), your serial port is a RS-232 device and uses different voltages. The ADM202's job is to convert between TTL and RS-232 voltage levels.

USB --- [Teensy] --- TTL

[serial connector]-- RS-232 --- [ ADM 202 ] --- TTL --- [WACOM chips]

What we do normally with this hack is:

USB --- [Teensy] --- TTL --- [WACOM chips]

...we "bypass" the RS-232 and ADM202 altogether and connect the teensy to the TTL lines.

So in order to "keep" the "cables" and not modify the internals of the tablet we need to find a way to convert the TTL lines of the Teensy to RS-232 (the same as the ADM202 chip) and get a "matting connector" (a male DB9) to connect to your serial cable. So you get the following picture:


USB --- [Teensy] --- TTL --- [ TTL-to-RS-232 ] --- RS-232 ---[matting connector]:[serial connector]-- RS-232 --- [ ADM 202 ] --- TTL --- [WACOM chips]

The end result is a non-modified tablet but with lots of external (custom) hardware.  For the power, I suspect it will be easy to hook the 5V to the PS/2 connector, just need a spare connector and hook the 5V on the good pin.

I never saw a "TTL to RS-232" device or (breakout) board. Typically these are MAX232 / ADM202 standalone chips that you have to put on a board with the accompanying electronics (capacitors, resistors). I never done one myself (since I do not see the point, I can use my solder, and the end result is much cleaner).
Logged
bernard
Administrator
Hero Member
*****
Posts: 2584


pato mania


View Profile
« Reply #3 on: January 06, 2012, 06:24:14 PM »

Check out this post, EU sources that sells the Teensy: (if they still do?)

http://forum.bongofish.co.uk/index.php?topic=1927.msg15021#msg15021

Watch out that there are quite a few Teensy clones out there. Unless you want the trouble, try to stick with the real thing.
Logged
bernard
Administrator
Hero Member
*****
Posts: 2584


pato mania


View Profile
« Reply #4 on: January 06, 2012, 06:26:32 PM »

Note: when using RealTerm, you can switch the display to Ascii when entering the commands -- so you can type ~# (instead of the ascii codes) and you can see the response in readable text.  It is a bit tedious to have to convert this.
Logged
Dragon
Full Member
***
Posts: 121



View Profile WWW
« Reply #5 on: January 06, 2012, 07:42:21 PM »

Dragon: The ADM202 appears to be on the left side near the bottom.

I don't see any chips on the left side at all...  Do you mean the chip labeled IC01 on the right?  That looks the right size and shape to be ADM202 but I can't read what's written on the chip.
Logged
Manni
New Poster
*
Posts: 19


View Profile
« Reply #6 on: January 06, 2012, 07:43:31 PM »

Thank you all for your replies!

The ADM202 is on the right side of the PCB, labeled IC01. But: I think I will stick with the plan to use the old cables with a MAX232, MC1488, MC1489 or something similar. I might even have one of those somewhere at home from an older project, and if not I will try to find one at work or buy one.

I want to do it this way because I use the tablet every day and I don't want to use a mouse if possible. RSI, you know... So, as long as I build the small box with the electronics inside, I can still use my computer with the tablet.

I did not realize that you wanted the data in ASCII. Sorry, my fault. Embarrassed

Well, with the help of an online converter (http://home.paulschou.net/tools/xlate/) I decoded it for you:

~#
~#KT-0405-R00 V1.3-3
~C
~C06400,04800
~R
~RE2C18C00,003,03,1000,1000



Nobody cried out loud "no, wait, stop, this will never work", so I think I will buy the real thing now.
Logged
Dragon
Full Member
***
Posts: 121



View Profile WWW
« Reply #7 on: January 06, 2012, 07:58:01 PM »

If you can find a reasonably simple way to do this with an external box that plugs into an unmodified tablet, I think that will make WaxBee more appealing to a wider range of users who are afraid to damage their tablets by soldering on them.  Of course, the Teensy plus components for the external box will probably cost about as much as the vtablet driver... but the official Wacom drivers seem more reliable and have more features than vtablet, plus WaxBee has the possibility of doing cool things in the future like mapping parts of the tablet to act like the buttons available on newer Wacoms.
Logged
bernard
Administrator
Hero Member
*****
Posts: 2584


pato mania


View Profile
« Reply #8 on: January 06, 2012, 08:26:40 PM »

@Dragon:  maybe we should start selling a kit ! Smiley  A board with the AVR, a USB connector, the RS-232 line driver, a DB9 connector with power options (PS/2 connector for the penpartner/artpads or that dreaded power connector with a "voltage pump" to convert the USB 5V to 9V, or none and let the user use the provided power supply).
---

Hey Manni! To date you did not told us, but it sounds like you do have a multimeter, a soldering iron, knowledge about RS-232 line drivers and can build electronic projects -- pfeww!  You should have told us before?!

With your (apparent) experience, this most certainly will work. I have no doubts.  Cool

You want to keep the tablet intact to quickly switch this to a mouse while doing this mod? Or to reduce the risks of breaking the tablet? (Because you will be able to use it as a mouse once it works of course)

Ok, since you (appear to) understand what I am talking about, let's switch to higher-gear:

You have a couple of choices to go about this.  The Teensy really only needs 2 lines (TX/RX) -- BUT the tablet requires 5 RS-232 lines. Most RS line drivers only have 4. (2 drivers and 2 receivers). These are for handshaking. Some of these we can ignore, but others we must make sure to "emulate" that we are "ready to send" and "Data Terminal is Ready" Wink  So on the TTL side, we had to ground them else the tablet won't talk to us. On the RS-232 side, you have to find the proper level that will work (+RS voltage, potentially +5V will work). There is a remote chance that leaving it unconnected will do the trick: It depends if there are pull-ups/pull-downs in the ADM202 receivers -- some of these RS line drivers chips have such functionality already, but we have to check if it is the "good" polarity).

Now here's the current active signals for your tablet DB9:


 Direction | PC DB9  |
-----------+---------+
 <--tablet | 2 (RXD) |
 -->tablet | 3 (TXD) |
 -->tablet | 4 (DTR) |
           | 5 (GND) |
 <--tablet | 6 (DSR) |
 -->tablet | 7 (RTS) |


While waiting for a teensy, you can already do something: Find the 5V.  Is this a standard pin on the PS/2? In anyway, connect your tablet PS/2 cable and find the 5V & ground lines. Then get a 5V source (if you have none, you can try to use the GND/5V out of a USB cable). Try to power up  your tablet using that alternative power source and see if the 5V appears to be properly propagating inside the tablet.  Most probably the SPLY connector pin is the 5V.

BTW, what is the rated voltage and mAmps for this tablet? (I assumed 5V, but I do not possess that one, so I am not 100% sure).
Logged
Manni
New Poster
*
Posts: 19


View Profile
« Reply #9 on: January 06, 2012, 08:48:03 PM »

Hi Bernard,

yes, not only do I own a soldering iron, no, I also know where its evil side is located and I also own a multimeter. What I don't own is a battery that makes it work. Sad There should also be a logic tester here at home that I built while studying computer science but I can't find it right now. Oh, btw, the tablet is rated as 5V / 100mA. So there's no problem powering it from one USB port.

Thank you for reminding me of RTS/DTR. I will keep them in mind when selecting the right driver.

Oh, and I have just found two MC1488 and two unused MAX232N. I guess that should do the trick.


I was actually thinking of another business idea: Why do all of this hardware stuff? The problem is not in the hardware, it's in the (Wacom) software. Isn't it possible to write a Windows application / driver that, when started, activates a virtual USB device with a configurable Wacom USB-ID? This driver would translate the data coming from a serial port to the desired destination format and feed this into the original Wacom driver. It would be some kind of "software Teensy". Ok, I know, ADB tablets would not work this way, but at least all the other tablets would work without the need to hack the hardware. Only one simple and cheap USB to serial converter would be needed. And if you want to copy protect the software, make it work with only one kind of USB2serial converter: the one you sell. Smiley
« Last Edit: January 06, 2012, 09:04:44 PM by Manni » Logged
bernard
Administrator
Hero Member
*****
Posts: 2584


pato mania


View Profile
« Reply #10 on: January 06, 2012, 09:40:47 PM »

Yeah, I thought of that very seriously in the past. It is indeed very easy to connect to a serial Wacom tablet, but feeding the Wacom USB driver is not simple.  It might be possible to write some sort of "virtual" USB "hub" or something "core" like that. I tried to find ways but did not find any. Going the hardware route was *way* easier for me.

If you find how to "emulate" a USB device with software, I will be interested to know.  BTW, this info would be nice also in the various popular OSes:   Windows 32 bits, Windows 64 bits, Mac OSX and Linux.

RTS/DTR -- you probably won't need to drive those from a line driver. Probably hard-wiring it to VCC/GND or another signal will be enough. The Teensy never needs to "hold the tablet from transmitting", it is always ready to receive bytes.

Side note: I have done a standard serial-USB converter with the Teensy (one of the .hex you can upload to the board available on the waxbee site). So you can do some testing using RealTerm talking directly to the tablet. But going through the Teensy's serial port instead of using your device. This can be used to test the serial port setup if the Teensy software fails to work correctly with your tablet. For windows, you need to follow those instructions http://www.pjrc.com/teensy/usb_serial.html and install a .inf file to enable a COM port.
« Last Edit: January 06, 2012, 09:52:56 PM by bernard » Logged
bernard
Administrator
Hero Member
*****
Posts: 2584


pato mania


View Profile
« Reply #11 on: January 06, 2012, 10:04:31 PM »

~C06400,04800

This is good info and confirms what I saw elsewhere (1270 DPI): This is the max X and max Y "counts".  We need to encode this in the WaxBee template.  Maximum X is 6400 and Maximum Y is 4800.  I think this board is 1270 DPI (instead of 2540 DPI) which is 0.02mm (instead of the 0.01mm like found in Ultrapads).   so 6400 / 1270 DPI = ~5.04 inches and 4800 / 1270 DPI = ~3.78 inches.  Does that fit your tablet active area (5 x 3.78 inches)?  (measure the white rectangle line seen on the PCB, this is the "active area").

In Ultrapads, you can modify the DPI.  We should try that here to see if 2540 is supported. This is one of the commands I told you to try before -- you can see two "1270" or "2540" numbers at the end of the command.  If it can be augmented, I believe the ~C command will return something different as well as the ~R command.

EDIT:  I just saw 1000,1000  int the same post that I saw ~C06400,04800 -- so that would mean 1000 DPI I think?   which would mean:  6400/1000 = 6.4 inches by 4.8 inches active area (?), sounds a little big for a 4x5 board.
« Last Edit: January 07, 2012, 04:04:59 AM by bernard » Logged
Dragon
Full Member
***
Posts: 121



View Profile WWW
« Reply #12 on: January 06, 2012, 11:05:02 PM »

If you find how to "emulate" a USB device with software, I will be interested to know.  BTW, this info would be nice also in the various popular OSes:   Windows 32 bits, Windows 64 bits, Mac OSX and Linux.

It would be cool to do it like that for people who don't want to modify/buy hardware, but from a hobbyist developer perspective, I don't think it's going to happen.  You would have to figure out how to write that emulator for three different OSes and it would probably work differently between XP/Vista, 32/64 bit, different unixes, and probably between certain versions of OS X.  Then it would need to be updated for future OSes and if the developer didn't update it, users would be stuck with a broken tablet again.  The hardware USB mod ensures the tablet will work as long as Wacom chooses to support the USB Intuos2, and even if they drop support for that, Teensy can be updated to emulate Intuos3 or 4 or some future tablet later on.

Oh, and the hardware solution may also save some power what with running on lower voltage from the computer power supply that's already supplying 5V vs running off another wall AC/DC converter at 9 or 12V.
« Last Edit: January 06, 2012, 11:39:51 PM by Dragon » Logged
Manni
New Poster
*
Posts: 19


View Profile
« Reply #13 on: January 08, 2012, 06:55:29 PM »

I actually don't know what test you exaxctly want me to perform.

Do you want me to send some of the commands you told me in one of the others posts? I just tried a few... So, here's what I did:

Reset the tablet by pulling all plugs.
Set Realterm to 9600 baud.

~R
~RE2C18C00,003,03,1000,1000

~#
~#KT-0405-R00 V1.3-3

~C
~C06400,04800

~R
~RE2C18C00,003,03,1000,1000

~#
~#KT-0405-R00 V1.3-3

~C
~C06400,04800

~*F203C810,000,00,2540,2540


Set Realterm to 19200 baud.

~R
~RF203C810,000,00,2540,2540

~#
~#KT-0405-R00 V1.3-3

~C
~C06400,04800

~*F203C810,000,00,1270,1270

~R
~RF203C810,000,00,1270,1270

~#
~#KT-0405-R00 V1.3-3

~C
~C06400,04800


Now that I know what to do I pulled all plugs again and then sent ~*F203C810,000,00,2540,2540. Afterwards I reconnected the tablet to COM1 where the Wacom driver is still listening. It works as before without the need to restart the whole computer. Smiley The resolution did not change, so I guess that the original driver does the same.



The size of the active area is 128mm x 96mm = 5.03 x 3.78 inch.
Logged
bernard
Administrator
Hero Member
*****
Posts: 2584


pato mania


View Profile
« Reply #14 on: January 08, 2012, 11:02:02 PM »

it sounds like your tablet can support full 0.01mm! Which is an indication that it will be easier to make it work!

EDIT: hum, like you said the ~C command still send the same values even if the resolution was augmented to 2540 (0.01mm) either that setting has no effect or that ~C command is not updating its values.

« Last Edit: January 09, 2012, 06:18:31 AM by bernard » Logged
Pages: [1] 2 3 4
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!