Wednesday, March 13, 2013

Free Touchscreen in cheap car back-up monitor for Raspberry Pi

I have a great find to share with everyone, I found a resistive touchscreen sensor embeded in a cheap car back-up monitor that i was using for the Raspberry Pi.
Cheap car back-up monitor for Raspberry Pi without the stand
As you can see, I have removed the stand/leg thing because it was standing in my way. I bought this from BestBuy because I wanted it then and didn't want to wait for a week for one to ship from eBay (I overpaid by double I think).

The story goes like this. I received my Raspberry Pi almost a year ago and I wanted it to be stand-alone so I gathered a keyboard a mouse a power adapter and a screen for it. I wanted everything to be cheap so I went for this small screen thinking it will suffice for what I was doing.
I haven't done much with the setup but recently I came across this portable Pi and noticed the same screen as mine and all looked nice. The thing I wanted to do is to modify my screen as well to work off of 5V. I followed that guide and the hack was done.

Cheap car back-up monitor modified to work on 5V
As you can see all you need is a red wire to the small cap and a black wire (it is the one crossing over the red one) soldered to the plug's original black wire. I didn't want to cut the original power source or use the cable since I might accidentally put 12V instead of 5V.
I wanted to test it before putting it back together to make sure everything works. Results were good and was ready to put it together.

Now the interesting part
I don't know why I looked, but I unscrewed the PCB and looked at the screen and saw 2 things standing out:
1.This is pretty normal, a set of thicker wires connected to the ribbon cable to provide power to the back-lite of the screen (on the back of the ribbon cable facing the display)

The back-light connector for the display
2. Another set of thick wires that at first appear to do the same thing (I attached wires to this later one to test my hunch).
Another back-light connector for the display?
I might not seam like much, but having 2 thick connectors on a display usually says it has a touchscreen film on it. To be sure I separated the display from the cases. It is not hard but the front protective transparent plastic has glue on the black parts of it that keeps it together to the cases and the screen in place.
If you look closely in my first image you will see that I cut off the whole transparent part of the outer layer to be able to reach the touch sensor.

Touchscreen connector for the film attached to the display
As you can see, the previously mentioned connector goes on the outside of the display, now it is clear, this is a resistive touchscreen film because there is no way the back-light would be over the display, it needs to be under the polarized films and all of that.
Touchscreen film over the cheap car back-up monitor
Here you can see better that there are some patterns on the edges of the screen.
Now this makes perfect sense for anyone that has looked at this screen when turned on. The text is not quite clear and a bit hard to read, I suspect that the minuscule traces that are needed on this touchscreen film are the cause of some of the blurry details.
Anyway this is a great find and I wanted to see if it works, so I researched what I needed to do and started build it. As you can see I soldered 4 wires to the connector (removing it from the ribbon connector all together) and then found a way to close everything up beautifully. Still I had to first cut the front casing to allow me to reach the display. This is what came out:

Front casing cut off from the cheap car back-up monitor
Support leg removed from cheap car back-up monitor


Cheap car back-up monitor put back together
 Removing the stand was easy, just peel way the tape and unscrew the 2 screws and pull on the leg. After that everything was put back and that is the final result.
Now, to be able to use the touchscreen I needed a way to read the numbers. I found this great little stuff called the ExtraCore, just what I wanted small and powerful Arduino. I also needed a FTDI cable to be able to talk to it.
FTDI cable for ExtraCore side
FTDI cable for ExtraCore front

I soldered up the headers to the ExtraCore and had everything ready to go. On the left is the FTDI connector (as it is clearly marked on the minuscule board).
My ExtraCore ready for work

My ExtraCore back side
My ExtraCore profile view

 I didn't search a lot for code to make the touchscreen work but it is fairly confusing. All I can say that I used my favorite method of trying each combination until I got something that looked like it was usable. Seeing as all that the wires are connected to are just resistors, it won't hurt trying combination as there is nothing to burn or anything like that. I uploaded my code to SourceForge to use it if you find it easier. I just modified it to work with my setup. Also to mention that those added wires to not simply connect to analog pins on the ExtraCore, they are also connected by resistors to GND. Doing this will ensure that you get a 0,0 when there is nothing touching the screen and a non-zero value when you are touching it.
Connected touchscreen sensor to ExtraCore and sending data with the FTDI cable to PC

Having all this sorted out, now all that is needed is to make the RaspberryPi interpret these numbers as clicks and drags and everything else. This will be a fun thing to do, but I do hope there something out there that already does this.

I know this is not such a huge find as finding a diamond or something, the resistive film would cost somewhere about $5 or so, but the advantage I see with this is the fact that it is pretty well integrated with the display and no added fussing around with films that are larger ore not the same aspect ratio, it is just there waiting to be used.

I hope other people will find this useful and please leave a comment so I can see what this was used for and maybe someone will do the rest of the work? :)


 Enjoy!

29 comments:

  1. What is the brand/model of the backup monitor?

    ReplyDelete
    Replies
    1. He posted a link to where he got the thing http://www.bestbuy.com/site/AGPtek+-+3.5%22+Active+Matrix+TFT+LCD+Car+Display/4921514.p?id=1218577554381&skuId=4921514

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Is this the same model on Amazon? If so, it's a little bit cheaper.
    http://www.amazon.com/gp/product/B0045IIZKU/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B0045IIZKU&tag=sbec-20&linkCode=as2

    I think this might be a similar display to the Chumby One/Insignia Infocast 3.5" models.

    ReplyDelete
    Replies
    1. Mine is a no name no brand no markings. It could be the same, I also saw even cheaper ones on eBay, I think they are all the same, but it would be nice if someone can confirm that monitor sourced from other parts have them as well

      Delete
  4. Nearly every LCD/TFT Monitor I've taken apart has had the same 4 connections on them. If you look they are often labeld Y+, Y-, X+, X-.

    ReplyDelete
    Replies
    1. This one has no such markings (apart from what it is seen in the photos. That would be awesome if there a lot more displays that have the touch film incorporated

      Delete
  5. I hope they do, I've wondered about it myself.
    So far I have bought 4 of these car reversing monitors. Every one has had those 4 solder pads on them.
    Also notice they are often there on phone lcd's too.
    I always assumed they were just there in case you wanted to install a touchscreen, not that they were the output from the film.

    ReplyDelete
  6. You should be able to tap with your fingernail on any display that uses a resistive touchscreen and immediately know that it has one. A solid thump and you know you're hitting the glass or protective plastic, a cushioned clicking noise will happen as the pressurized overlay flattens in that area.

    Capacitive touchscreens are nearly impossible to identify by touch but most of the time if you hold it in the right light you can see its sensing dot pattern or some of the small traces embedded within.

    ReplyDelete
    Replies
    1. You are right but there is a transparent protective sheet of plastic that covers the whole thing. You have to get to the display to perform this test.

      Delete
  7. I just pulled one that I had bought probably 4 years ago out of my car to check this... It had the leads!

    ReplyDelete
  8. Nice work!
    I went ahead and ordered one on ebay (11,70£) after reading your post. =)
    Please share with us if u have any luck with the touch screen on the pi and how it's configured!
    (Interesting answer on simular problem: http://electronics.stackexchange.com/questions/56608/how-do-i-control-a-resistive-touchscreen )
    /Kalle

    ReplyDelete
  9. To simulate mouse functions, this might work:
    http://manpages.ubuntu.com/manpages/intrepid/man1/xte.1.html

    ReplyDelete
  10. Even better, someone have done it for us allready: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=41&t=17819 =)

    ReplyDelete
    Replies
    1. Nice find, thank you for the link. I ordered a free sample from TI and if I get it I will do a follow up. I wanted to use the Arduino to also control a pan tilt webcam so that will still be present in the build.

      Delete
    2. Sweet, I didn't see u could get free samples!
      I went ahead and ordered one like this: http://www.ebay.co.uk/itm/160924264004?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

      as it also seems to work under linux! We'll see which one shows up first =)

      Delete
    3. I'm not even sure I will get a free sample (they turned me down before), you will probably get it first. Be sure to take picture and keep us updated

      Delete
    4. I found a little more boring solution... There is a usb to 4-wire touch screen module (£6,28)on ebay: http://www.ebay.co.uk/sch/i.html?_nkw=resistive+touch+screen+usb&_sacat=0&_odkw=4+wire+touch+screen+usb&LH_BIN=1&_sop=15&_jgr=1&_fcid=192&gbr=1&_osacat=0&LH_PrefLoc=2&_sc=1

      and it seems to work on pi: http://www.youtube.com/watch?v=hV2XsoWkWg8

      My plan is still to build my own though =)

      Delete
  11. Dammit, i got my ebay-screen today and guess what... it did not have a touch screen on it even though it looks exactly the same as yours! to rub it in a bit more, i received the chips today as well ;(
    I went back to ebay and order an extra resistive touch-film (£2,9) so now it's waiting time again!

    ReplyDelete
    Replies
    1. Sorry to hear that :(
      I hope this is not the general case where most of them don't have the film and people can use this find.
      I am still waiting for my free samples, no word on them yet. Post a link of the build, I am interested to see what you make.

      Delete
  12. This comment has been removed by a blog administrator.

    ReplyDelete
  13. Sweet, I just checked mine and it has the 4 contacts! Now to decide whether to take the easy route and get the usb 4wire controller or go the i2C route like the other guy.

    Did you by any chance check the current draw for the display running off 5V?

    ReplyDelete
    Replies
    1. Nice, post your results so that we can follow along.
      I just got a free sample from TI the TSC2007 and will try it out soon. I didn't measure the current... I don't even have the necessary tools. I just hacked it together with what ever I had on hand.

      Delete
    2. Just FYI, on my LCD I was unable to run it off of 5V, something must be needing a certain ref voltage because my screen goes white. I hooked up the regular 12V in to a variable supply and found if I get below 6.3V this happens also. Its too bad because I was really hoping to run everything off of 5V. I have some buck converters around though so whatever project I fit this into I guess I'll use 12V and then use the buck to drive the Pi. Off topic you should check out my Pi project blog http://pi-fidelity.blogspot.ca

      Cheers

      Delete
    3. I've see some other people using a 7.2 hobby r/c battery packs (commonly available and easy to charge) to power screen with your same problem and then a step-down converter for 5V for the Pi itself.

      Delete
  14. Does anyone know what the dimensions of the inside cicuit are for this thing because I want to use just the guts for a portable pi?

    ReplyDelete
  15. Very rapidly this web page will be famous amid all blogging and site-building viewers, due to it's fastidious articles

    ReplyDelete
  16. Hi there friends, its impressive piece of writing regarding educationand entirely explained, keep it up all the time.

    ReplyDelete