Bongofish
November 17, 2019, 05:25:52 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You may have to login twice the first time,  but we don't know why - Erm I mean it's a security thing yeah that's it - security.
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 5
  Print  
Author Topic: Interfacing a TabletPC digitizer  (Read 16339 times)
Pesho
Hero Member
*****
Posts: 275



View Profile
« on: March 17, 2015, 11:44:33 PM »

Hello there, i have a couple of digitizers with the most common 14-pin serial interface (SU-12W07E and SU-025-C02) I've tested both on a tabletPC and they work fine using the same cable. Now i'm looking at my options for interfacing them with a PC - Teensy would be the obvious choice, but they are way too expensive. I was wondering if instead i can use an Arduino Pro Micro that has the same Atmel ATMEGA32U4 microcontroller and 3.3V output which is much cheaper. Also, what about just using a standard USB-to-Serial board with an FTDI chip? I don't care much about emulating USB tablets since the ISD serial tablet drivers work fine on both Windows and Linux.
Logged
Aerendraca
Administrator
Hero Member
*****
Posts: 1069


View Profile
« Reply #1 on: March 18, 2015, 07:35:47 AM »

In principle you should be able to use the Arduino pro micro as it is possible to flash the same bootloader to it - albeit through a bit of a convoluted route. As far as I'm aware the hardware is the same as you say.

As for the FTDI idea I'm not sure if this would work. I imagine that the raw serial output of these digitizers requires a small amount of translation prior to being sent to the PC - I suppose that this could be done in software but I wouldn't think that the ISD drivers are setup to do this.

I speculate entirely though so my advice would be give it a go and start a thread about it, that way I have some actual research to base my waffle on. Smiley
« Last Edit: March 22, 2015, 10:21:59 AM by Aerendraca » Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #2 on: March 18, 2015, 02:47:20 PM »

What about boards with an Atmega 328 like the arduino nano? The main difference is that they lack built-in USB support so you need an extra chip to handle it.
« Last Edit: March 18, 2015, 02:54:24 PM by Pesho » Logged
XDjackieXD
Sr. Member
****
Posts: 137


*me trying to draw*


View Profile WWW
« Reply #3 on: March 18, 2015, 06:52:31 PM »

Linux drivers can directly interface the tablet digitizers (inputattach).
I used my tablet like this before I got my Cintiq Companion Hybrid.
Just connect the serial lines (all! not just rx/tx) to the FTDI chip and run inputattach with baud rate, protocol and device as parameters (without baud rate it doesn't work) (you need root for inputattach).
For waxbee you need a USB-capable ATMega. Maybe when I have too much spare time I will start implementing something using vUSB (USB for most non-USB ATMegas).

-Jakob
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #4 on: March 18, 2015, 07:25:00 PM »

Linux drivers can directly interface the tablet digitizers (inputattach).
I used my tablet like this before I got my Cintiq Companion Hybrid.
Just connect the serial lines (all! not just rx/tx) to the FTDI chip and run inputattach with baud rate, protocol and device as parameters (without baud rate it doesn't work) (you need root for inputattach).
For waxbee you need a USB-capable ATMega. Maybe when I have too much spare time I will start implementing something using vUSB (USB for most non-USB ATMegas).

-Jakob

Nice! So it should appear in /dev/input? What baudrate/protocol/device did you set for your case? On my tabletPC i didn't have to set any drivers at all, it only needed some tweaks to xinput and the button settings. Why doesn't this work on Windows by the way? It should be able to handle USB to serial converters, and the rest is up to the ISD tablet driver...

Aside from that, can anyone tell me what frequency the Teensy2.0 operates at? After reading about the Atmega32U4 it looks like it can only run at 8Mhz when set to 3.3V.
Logged
XDjackieXD
Sr. Member
****
Posts: 137


*me trying to draw*


View Profile WWW
« Reply #5 on: March 18, 2015, 09:12:39 PM »

It appears as any other wacom tablet.
I attached mine using "sudo inputattach --baud 9600 --w8001 /dev/ttyUSB0".
The baud value *could* vary (no idea... if it doesn't work try a few common rates).
On Windows it should work by installing a tablet PC digitizer driver (I would try the one that was on the tablet).
The normal Wacom drivers dropped serial tablet support a few versions ago.

The Frequency/Voltage charts from Atmel are just recommendations.
All ATMegas I tried also worked with 16MHz at 3.3V.
And the teensy uses an Atmega32U4 so it should not be a problem...

-Jakob
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #6 on: March 18, 2015, 09:41:22 PM »

9600 seems a bit low, but apparently it's the most recommended rate for wacom tablets on linux... Which pins did you connect? +3.3V, GND, RX and TX or DTR and RTS also? Did you connect anything pin 11 and 12?

I wasn't able to find an arduino board that's 16Mhz and 3.3V whether they use the ATMega32u4 or the ATMega328... Only the Arduino Micro has both, but that one has 5V aswell.
Logged
XDjackieXD
Sr. Member
****
Posts: 137


*me trying to draw*


View Profile WWW
« Reply #7 on: March 19, 2015, 07:13:57 AM »

I connectet RX, TX, RTS, DTS and all power Pins.
When you buy a 5V Version you can cut the USB power Trave and put the regulator between (just a few cables and a piece oft protoboard).
Logged
Aerendraca
Administrator
Hero Member
*****
Posts: 1069


View Profile
« Reply #8 on: March 19, 2015, 08:35:53 AM »

What about the Arduino Nano, you can feed that 5v and get 3.3v out, also uses the Atmega 328.
« Last Edit: March 19, 2015, 08:37:52 AM by Aerendraca » Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #9 on: March 19, 2015, 10:58:04 AM »

I connectet RX, TX, RTS, DTS and all power Pins.
When you buy a 5V Version you can cut the USB power Trave and put the regulator between (just a few cables and a piece oft protoboard).

So the actual input power going to the AVR doesn't matter, as long as the output is regulated to 3.3V? And you didn't connect pin 11 and 12?

What about the Arduino Nano, you can feed that 5v and get 3.3v out, also uses the Atmega 328.

That's the one i'm most curious about, since they are very common and dirt cheap. If Waxbee compiles with the Atmega328, it should make USB conversions a lot easier.
Logged
XDjackieXD
Sr. Member
****
Posts: 137


*me trying to draw*


View Profile WWW
« Reply #10 on: March 19, 2015, 11:33:25 AM »

I would cut the 5V USB trace and put the regulator in between.
The other method is a UART 5V<->3.3V Levelshifter (not very complicated).
I have to look at my setup when I come home to tell you about my pin 11 & 12.
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #11 on: March 19, 2015, 11:56:21 AM »

Yeah i've seen these little boards on ebay that are just a bunch of regulators that go inbetween:

http://www.ebay.com/itm/New-IIC-I2C-Logic-Level-Converter-Bi-Directional-Module-5V-to-3-3V-For-Arduino-/310965629892

I think what i'm going to do is get a USB-serial interface and a Nano. The serial converter should be enough to get the digitizer going, but that nano will be worth experimenting with to see if i can get Waxbee running on an Atmega328.
« Last Edit: March 19, 2015, 11:58:42 AM by Pesho » Logged
Aerendraca
Administrator
Hero Member
*****
Posts: 1069


View Profile
« Reply #12 on: March 19, 2015, 04:53:07 PM »

I for one am extremely curious to see if you can get waxbee to run on the nano, how great would that be.
« Last Edit: March 19, 2015, 08:23:33 PM by Aerendraca » Logged
XDjackieXD
Sr. Member
****
Posts: 137


*me trying to draw*


View Profile WWW
« Reply #13 on: March 19, 2015, 07:49:35 PM »

It would take a complete rewrite (maybe with a few reusable bits) because vUSB takes quite a bit of space on the Mega and waxbee fills it pretty much to the top... (If I try to do it I will completely rewrite it in C and just use waxbee as reference for the protocols).
Maybe I try to start a rewrite on the weekend or when I have spare time in school Tongue

-Jakob
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #14 on: March 20, 2015, 12:31:54 AM »

All the Arduino Nanos come with an FT232 chip onboard, you don't really need vUSB do you? Even the cheap chinese clones use a CH340 chip which is pratically the same deal.
« Last Edit: March 20, 2015, 12:35:10 AM by Pesho » Logged
Pages: [1] 2 3 ... 5
  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!