JernejL
Question 1:
 
I have a arduino pro micro that is 5v model, that i would like to use with the cirque TM040040 trackpad with curved overlay, however the trackpad maximum voltage is 3v. 
 
I assume, that i can use a 5v to 3.3v step-down converter and something like TXB0104 voltage translator on the SPI lines - will that be enough? 
 
Question 2: 
 
I assume that I2C would also need a voltage translator? The reason i picked SPI is, that your SPI example does not rely on teensy spi library ( i assume i'd have to replace it with another that would work on arduino pro micro ) and spi_curvedoverlay compiles and uploads to arduino pro micro out of the box. 
 
C:\Program Files (x86)\Arduino\libraries\i2c_t3/i2c_t3.h:29:2: error: #error "Sorry, i2c_t3 only works on Teensy LC and 3.x boards.  Use Wire for Teensy 2.0."
 #error "Sorry, i2c_t3 only works on Teensy LC and 3.x boards.  Use Wire for Teensy 2.0."

 
I can replace i2c_t3.h with Wire.h and rename 2 calls inside RAP_Write and get it to compile, but i assume that i2c lines also need a 5v -> 3.3v translator, if this would work at all on pro micro?
 
Quote
Scott
Hello, Thanks for the questions.

The Pinnacle device on the TM040040 trackpad is capable of running in a 5V system. It has internal regulators that reduce the 5V to 3.0V. In order for this to work, you would have to remove R8 and R7 and only supply the 5V to pin 47 of the device.  (See attached schematic)Pinnacle5V_RemoveR7-R8.jpg 
If you do this, the IO should work with the 5V with no level translation needed.
Quote
JernejL
This means i don't need a shifter for SPI and i2c pins too, or just that main power can be 5v? 
 
Sorry if question seems absurd or silly, but i am only now going back into electronics after a decade long hiatus, i only have 1 trackpad and don't want to ruin it, so i'm being paranoid - if i ruin it, it might take a month to get a new one from mouser. 
 
My project is building a trackpall/trackball hybrid, kinda like thumb trackball but using your touchpad instead of the ball.
I think this could be a quite interesting niche product, as a trackpad would be probably superior to a rotating ball - less pressure on fingers (i have medical issues with work related strain on my hand) 
 
If i can power it and interact with 5v arduino directly, this would be ideal - this way i can just get a ribbon cable to arduino and emulate usb mouse there, the rest is then cosmetics 🙂 
 
Quote
Scott
Hello Again;
As long as you remove the 2 resistors (R7 and R8) and power it up with 5V then everything should work fine. The I/Os should be fine working at the 5V level when the Pinnacle is powered with 5V.

If you decide to change over to I2C (remove R1), you will need to provide pull-ups on the SDA and SCL lines on your side. (pulled up to 5V).

Scott
Quote
JernejL
Thank you - i intend to use only SPI - so in that case, i just remove R7, R8 and that's all - no pull down/ups - this sems super simple, it should be documented 🙂  
 
Quote
JernejL
I went with safe mode, and decided to use a voltage translator anyway, i use a 5v arduino pro micro: [523a1765757b7f5c6e8b4567]
 
Since i had no ribbon cable i just soldered connector pins onto test leads, kinda crude, but it should be ok. 
I have wired pin 10 to DR pin, pin 15 to SCK test point, pin 14 to S0 and pin 16 to S1. 
 
Touchpad runs on separate power supply on 3.0v. 
 
I have adapted your SPI_CurvedOverlay with this configuration: 
 
// Hardware pin-number labels
#define SCK_PIN 15 // was 13 (sck)
#define DIN_PIN 14 // was 12 (miso)
#define DOUT_PIN 16 // was 11 (mosi)

#define CS_PIN 9 // led indicator for reading
#define DR_PIN 10 // checks this, to see if data-ready (DR) is high then it does things

#define LED_0 17 // was 21 (touch led)

However in com port all that i get is following: 
 
Pinnacle Initialized...
Setting ADC gain...


 
And it does not continue from there, i get nothing else outputted. 
 
Did i forget to wire anything, or missed something that needs to be done? 
 
I'm attaching pictures of the crude set-up that i made, i hope that you can point me into correct direction to getting it working. 
  
Quote
Scott
Hello Again;

It looks like the code is getting stuck during the setAdcAttenuation function.
I suspect it has to do with the actual SPI communications. The ERA_ReadBytes and ERA_WriteBytes functions are both called when trying to set the ADC gain. 

This could be related to the level shifting or maybe there is a difference in the SPI.h for your particular setup/arduino. 

If it is the level shifting, you could try setting up the Pinnacle for 5V mode (as mentioned earlier) and get rid of the level shifting. 

I will ask around to see if anyone here has use the ProMicro Arduino.
Quote
JernejL
Ok, i will do the modification, fire up the hot air station to remove the 2 resistors and connect without a shifter, then report what happens. 
 
Btw, are DR and SS pins neccesary if the touchpad is the only thing on spi or i2c bus? 
 
Quote
Scott
I think that the SS (CS) can be tied to ground if the pinnacle is the only thing on the SPI bus. The DR must be used as it is the way the pinnacle signals that there is new data ready. (for packet feed data)
Quote
JernejL
I have some delay because i ordered a ribbon cable and breakout board to work with this better, i don't want to screw it up. 
 
As for removing the resistors, how much temp should be good to remove it and not destroy the plastic cover glued onto it? 
 
Quote
Scott
Hello Again;
If you have 2 soldering irons with small tips, you can probably be fast enough to not have to worry about the adhesive and plastic. If you only have 1 iron, you will have to do the old trick of moving back and forth between the 2 pads until both sides are flowing. Doing this can eventually lead to the adhesive under the part flowing a little. This is a small enough area that it probably does not affect the performance much. 

Just be sure to not put the plastic face down on a hot plate. That would probably melt it. 

We do this a lot here and have not had much of a problem. Just use flux and be as quick as possible.
Quote