Modifying a 3.5" car display for USB power.


182 posts   Page 1 of 8   1, 2, 3, 4, 5 ... 8
by AndyA » Mon Sep 17, 2012 7:52 pm
A number of people have already posted about using this 3.5 inch display for their Pi's due to the low cost (£20.02 in the UK, I found if for under $18 from Amazon in the USA).

The big downside is the need for 12V to power the display so here are instruction on how to modify it so that you can power it from USB.

Tools/parts used: Small phillips screwdriver, soldering iron, wire cutters/strippers, USB cable, RCA male plug.


1) Open the display by removing the 4 screws on the back.
Image

2) The insides should look like this:
Image
If not back to the drawing board.
Unplug the video/power cable. Unplug the ribbon cable to the display by sliding the black clip away from the body of the connector. It only moves a few mm, at which point the cable should slide out.
DO NOT remove the black clip from the body of the connector.

3) Remove the two screws holding the board to the front housing.

4) At this point prepare the rear housing:
Take an old USB cable and cut it to the length you want for your power cable.
Drill a hole in the display rear housing between the Menu and - buttons and slightly closer to the display edge. The hold needs to be just wide enough for the cable you have used.
Feed the cable through the hold.
Image

5) Remove the foam pad from the back of the PCB and put it to one side. the Locate and remove the 12V to 5V regulator chip (number 1 in the image below). If you have a soldering heat gun then that is the simplest method, if not then use a soldering iron and small knife or tweezers to lift each pin in turn. Don't worry about damaging the part, we're throwing it away.
Image

6) Sanity check: Make sure your USB cable is threaded through the rear housing before this step or you'll have to re-do it.
Locate the unused 4 pin header on the board close to the power/video in header (number 2 in the image above). Solder the red cable from your USB cord to the hole furthest from the edge (the bottom one in the image). Solder the black cable to the next hole along. (2nd from the bottom in the image.)
It should now look like this
Image

For added strength you can optionally solder the ground from the USB cable to either the same location as the black cable or I found it easier to use one of the ground pins on the switches as shown here:
Image

Trim back the white and green cables and leave them unconnected. Make sure they aren't somewhere that could short to the 5V line.

7) Take the power/video cable that came with the display and cut it just before the junction where it splits.
Image
(hint for people sensible enough to read all the instructions before starting, it's easiest to do this cut earlier, that way you can remove the cable from the housing and keep it from getting in the way).
Sanity check: Make sure the cable is threaded onto the display rear housing and if applicable that the the body of the RCA connector is on the cable before proceeding.
Strip back the cable and solder your male RCA plug on to the end. The yellow wire goes to the middle pin, the black to the outside. The white and red you can just trim back out of the way.
This does result in a fairly short display cable but for a portable system that is normally what you want.

8) Put the foam back on the rear of the pcb and re-attach it to the front housing. Plug in the display input cable. Check that the clip on the LCD ribbon cable socket is still in the open position (shown in the picture below). Slide the cable in to the socket as far as you can, take extra care that it's in square. Push the clamp down towards the body of the connector to lock the cable in place.
It should now look like this (but with the display cable clamped in)
Image

9) Put the rear housing back on, this is a little tricky due to the extra cables. I found that routing the USB cable between the screw post and the edge of the housing worked well for both keeping it in place and offering some strain relief.

10) Power the display and Pi from a USB power source.
Image


My display looked to take 300mA when running from 5V so if possible budget up to 500mA just to allow for variations. Having said that I plan to run both the display and Raspberry Pi from a single source that can supply up to 1A and don't expect to see any problems.

Any questions feel free to email me.
Posts: 31
Joined: Mon Sep 17, 2012 6:02 pm
by matt@shagshaw.com » Thu Sep 20, 2012 11:50 am
Hi AndyA

I have been waiting for an excellent guide like this, since I saw someone else reference using
5v on the small displays. I have one, the only trouble is I am scared of doing this myself, and
am not very good with a soldering iron. I will be using this in my car, and will simplify the power
supply requirements....

Would it be possible for me to send you my screen and a usb cable for you to do it for me ???

I would obviously be willing to pay for your help.....

Please contact off list to discuss
Thanks in advance
Matt Shaw
matt@shagshaw.com
Posts: 21
Joined: Thu May 31, 2012 8:04 pm
by Krebsy » Thu Sep 20, 2012 3:07 pm
thanks for the details on this. Wh I didn't see this article before ordering more kit....

I had a feeling the screen (I have the same one) would run off 5v if only I could get the wiring sorted out.. :).
I ended up going to Element14 and ordered a 5v to 12v Dc-DC converter (rated to 0.5A output) and a few bits of wire, strip board and switches etc to get the screen fired up from a 5v 1A mobile phone charger pack. that's all sat in a box ready for me to splice together with soldering skills not used in 10 years :).

I've had the screen fired up with 8xAA's and the Pi running off the charger pack so I'll give this a go instead and save the other bits for another project (when I can think of one... :) ).

K.
Franken-pi-1.jpg
One power supply for the Pi, one for the screen...
Franken-pi-1.jpg (59.22 KiB) Viewed 41274 times
Posts: 10
Joined: Thu Sep 20, 2012 2:55 pm
by Krebsy » Thu Sep 20, 2012 3:30 pm
Are the red and white cables within the main pre-existing loom the +ve and -ve 12v feeds respectively? It seems to say that in step 7.

If so, I guess I could slice those off at the white plug end, solder them into the holes on the PCB and replace the DC jack past the fuse with a USB conector....

K.
Posts: 10
Joined: Thu Sep 20, 2012 2:55 pm
by AndyA » Thu Sep 20, 2012 6:53 pm
Red is 12v power in. Black is ground for all the connections. White is the second video in.

So if you move the red to the 5v in and remove the regulator then you can use the existing cable.
Posts: 31
Joined: Mon Sep 17, 2012 6:02 pm
by Krebsy » Thu Sep 20, 2012 9:19 pm
Following a bit of probing around with a volt meter I managed to find a +5v pin on the board (off the back of one of the capacitors) so spliced the red wire in with a blob of solder.

Fired up the screen and it immediately cut out :( , but it turns out it was just the power jack plug not being together properly. :).

So, seems ok, just need to trim back the cabling...
K.
Posts: 10
Joined: Thu Sep 20, 2012 2:55 pm
by AndyA » Fri Sep 21, 2012 11:46 pm
Just for clarification, if all you want to do is use a 5v input with the existing cable then all you need to do is cut the red wire coming in and solder it to the hole indicated for the red USB wire.

The reason for removing the chip is so that the voltage regulator doesn't have power on it's output with nothing connected to it's input. This is a precautionary move, it may not be necessary but is good practice.

The rest is purely to give shorter and neater cables and to prevent someone connecting 12V power by accident.
Posts: 31
Joined: Mon Sep 17, 2012 6:02 pm
by Wully » Mon Sep 24, 2012 4:18 pm
AndyA wrote:Just for clarification, if all you want to do is use a 5v input with the existing cable then all you need to do is cut the red wire coming in and solder it to the hole indicated for the red USB wire.

The reason for removing the chip is so that the voltage regulator doesn't have power on it's output with nothing connected to it's input. This is a precautionary move, it may not be necessary but is good practice.


Hello, I'm having some issues doing this.
I cut the red wire on the power/video connector on the board and soldered the red wire to the 5v input in your image. and then plugged the power/video connector back in. I left the ground wire as is, is that correct?
Image
And on the dc power jack that comes with the display, I wired a USB connector to the end of it.
When I try to power it up the screen flashes on then off again. This is using a 5v 1A USB wall charger.
Any suggestions?
Posts: 6
Joined: Mon Sep 24, 2012 4:11 pm
by AndyA » Mon Sep 24, 2012 5:56 pm
Wully wrote:Hello, I'm having some issues doing this.
I cut the red wire on the power/video connector on the board and soldered the red wire to the 5v input in your image. and then plugged the power/video connector back in. I left the ground wire as is, is that correct?


Correct.
(Side note: Moving the black ground wire may make it a little easier to solder the red wire since it would allow the cable to move a little more but electrically doesn't make any difference at all, the two points are connected to each other.)

Wully wrote:And on the dc power jack that comes with the display, I wired a USB connector to the end of it.
When I try to power it up the screen flashes on then off again. This is using a 5v 1A USB wall charger.
Any suggestions?


I just tried the exact modification you had made on a new display and it worked fine for me.

Did you have anything connected to the video in connection and switched on?
What you describe is exactly what you would see if there was no video input signal.

Try both video inputs, failing that look for anywhere you could have damaged the circuit by accident (e.g. a stray bit of wire/solder between the video in pin and ground so that it can't see the signal.)



Just for information, this display took ~120mA when powered from 5V with no video input and 400mA when active. Removing the no longer needed power regulator dropped that by 20-30mA.

So for the two displays I've measured the power was 300mA and 380mA when running on 5V, a reasonably large unit to unit variation.
Posts: 31
Joined: Mon Sep 17, 2012 6:02 pm
by Wully » Mon Sep 24, 2012 7:33 pm
Thanks for your input Andy.

I desoldered the red input wire on the 5V header and connected it back to the power/video input connection just to check it was working with 12V. It worked fine!

I didn't realise it needed something connected to the video input to work. I thought it may have kept the screen backlit but blank if it was working. Silly mistakes I guess.

I'll have a go connecting it back to the 5V header and actually connect a video input this time!

Could I also confirm, when the display is powered on, initially it flickers on then off again. Then after 3-4 seconds it detects the video input (From input 1 or 2) and switches on. Is this 3-4 second delay consistent with your models?
Posts: 6
Joined: Mon Sep 24, 2012 4:11 pm
by AndyA » Mon Sep 24, 2012 8:37 pm
Wully wrote:Could I also confirm, when the display is powered on, initially it flickers on then off again. Then after 3-4 seconds it detects the video input (From input 1 or 2) and switches on. Is this 3-4 second delay consistent with your models?


Yes, an initial flicker then blank for ~4 seconds before it wakes up.
Posts: 31
Joined: Mon Sep 17, 2012 6:02 pm
by bonelifer » Mon Sep 24, 2012 9:19 pm
Thanks for such a detailed post. I just bought it from amazon.com[after reading this] for $18.99 + $4.99 S&H(total $23.98), not bad. When all this is done I'll have a nice diversion during long car rides, all for a lot less than most of the systems out there. Now to find an inverter with two USB ports.
User avatar
Posts: 122
Joined: Thu Jan 12, 2012 4:01 am
Location: http://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=147848
by Foggy » Mon Sep 24, 2012 9:23 pm
Hi,
I'm using the same display and will be making the same mod (5 V). I would like to be able to switch the display off using GPIO. Can any one suggest a circuit for doing this. Do I need to use a relay or some kind of solid state switch. Any suggestions would be welcome, even if it only allows me to investige further.

Best wishes.

James.
Posts: 18
Joined: Mon Aug 20, 2012 12:26 pm
Location: Reading UK
by Wully » Mon Sep 24, 2012 10:30 pm
I redone it and wired the red wire to the 5V header. Connected a video input and a USB to DC cable and it worked perfectly!
Image
Thanks for the great guide and the extra help!
Image
Posts: 6
Joined: Mon Sep 24, 2012 4:11 pm
by AndyA » Mon Sep 24, 2012 11:19 pm
Foggy wrote:I would like to be able to switch the display off using GPIO. Can any one suggest a circuit for doing this.


The simple way is a total of 4 parts.

Take an N channel MOSFET.
Connect the gate to the GPIO pin, connect the source to ground and put a 1k resistor between the two.

Now take a P channel MOSFET .

Connect the gate pin the the drain on the N channel MOSFET. Connect the Source pin to the 5V supply. Put a 1k resistor between the source and gate pins.

Connect the drain pin to the display power input.


Key parameters for the parts (all fairly standard for logic type parts):
On the N channel part Vgs should be around 2V or less (we want the 3V from the Pi to count as a very definite on).
On the P channel part Vgs should be around -3V or less.
On the P channel part Rds (on) should be as low as possible (0.2 ohms or less should be OK)
On the P channel part Is should be at least 1A.


How this works:
The N channel part is held in the off state by the pull down until the GPIO pin raises the voltage above the switch on threshold. Once this threshold is passed the N channel part turns on and connects the gate of the P channel part to ground.
When the n channel is off the p channel is helf in the off state by it's resistor. When the gate of the P channel part is pulled enough below the source pin voltage that part turns on and connects power to the display.

Since the GPIO pin is only connected to ground (via a resistor) and the FET gate pin (which is in theory completely isolated) it's well protected from the 5V line that could damage it.
The resistor values are fairly flexible, I said 1k but anything from 1k to 100k should work fine.


There is the assumption in this that the ground for the Pi and the ground for the display power are fairly well tied together, since they are connected by the video cable this should be the case, I'm just mentioning it here since it is a fundamental assumption. If the grounds aren't common then you would need to use a relay or some other system that didn't rely on a common ground.
Posts: 31
Joined: Mon Sep 17, 2012 6:02 pm
by Foggy » Wed Sep 26, 2012 6:37 pm
Thank you. I think I need to do some more reading.

Best wishes.

James.
Posts: 18
Joined: Mon Aug 20, 2012 12:26 pm
Location: Reading UK
by marcialr » Wed Sep 26, 2012 8:28 pm
Hi! I bought this screen and once opened found that it has a slightly different board.
Image
Image
On one corner I recognized a similar circuit as the one is explained in this thread to be unsoldered and read XL1509
Image


so i looked for the datasheet
Image

so i could identify pin2 as the converted current output (5V desired) and soldered directly the red cable comming from the usb. Note the bad work done both pin 1 and 2 are soldered together bypassing the circuit. Also soldered the black cable to the other side pins, whithout taking care as they all are ground

Image

Everything is working fine! the resolution is not good to do much text coding as i think it will tire your eyes very quickly but for some quíck and dirty things should be fine. Haven't tried video!

P.S. the 12V input cable should not be used now (the red jack on the first photo)
Posts: 4
Joined: Mon Jul 02, 2012 7:51 am
by AndyA » Wed Sep 26, 2012 8:54 pm
James,

Here's the schematic.
Image

The nice thing about FETs is that the current into the gate pins is 0* making them nice and easy to use.

Q1 is a N channel with Vgs threshold of ~2V
This means that until the voltage at the gate of Q1 is at least 2V over the voltage at the Q1 source pin Q1 is effectively off and there is no connection between the source and the drain.**
Since the Q1 source pin is connected to ground (0V) this means it is off until the GPIO input to the circuit goes over 2V.
R2 is a small enough value that it will hold the gate at 0V if there is no clear input but large enough that it doesn't make it difficult for something to intentionally drive the input high.

Point A is connected to the drain of Q1 which when Q1 is off is effectively not connected to anything.
It is also connected to the gate of Q2 into which no current can flow.
So while Q1 is off the only electrical connection to point A is through R1 which means point A is pulled up to 5V.


Q2 is a P channel with a Vgs threshold of -2V.
This means that the gate pin must be 2 volts below the source pin for Q2 to switch on.
When switched off the drain pin of Q2 is effectively disconnected from it's source pin and so the power output from the circuit is disconnected from the battery.
Since the source pin is tied to +5V this means that the gate must go below 3V to switch Q2 on.
As previously noted, the Q2 gate is connected to point A and when the input signal is low point A is at 5V.
So a low input means that the output power is off.


When the GPIO input goes high Q1 gate goes to 3.3V. The voltage between the gate and the source is now 3.3V, well over the Vgs threshold voltage of 2V and so Q1 switches on.
When Q1 switches on the Q1 Drain and Q1 Source pins are connected together by a fraction of an ohm resistance.
Point A is now the midpoint of a resistor voltage divider. 5V is connected through R1 to Point A which is connected to 0V through Q1. Q1's on resistance (Ron) will typically be in the 0.1 ohm region. Assuming R1 is in the 1k ohm region this means that point A is now close enough to 0V to make no difference.

Q2's gate is connected to Point A. It is now at 0V while Q2s source pin is still at 5V, this is far more of a difference than the -2V switch on threshold of Q2 and so Q2 switches on connecting it's drain pin to it's source pin and so connecting +5V to the power out connection.

Since all the current needed by the device being controlled is passing through Q2 the on resistance for Q2 needs to be low and we want to make sure we drive it well past the threshold voltage (A 5V gate to source voltage difference Vs the 2V threshold) so that we are sure it is fully on rather than in some in between state.
The currents in Q1 are far far lower and so this part is less critical.


Hopefully that helps a little.

*OK, not technically true when changing state but a good enough assumption for this sort of thing.
** Again not technically true, there is a small leakage current but it's low enough to ignore in this situation unless R1 was several Mohms.
Posts: 31
Joined: Mon Sep 17, 2012 6:02 pm
by AndyA » Wed Sep 26, 2012 9:03 pm
marcialr wrote:Everything is working fine! the resolution is not good to do much text coding as i think it will tire your eyes very quickly but for some quíck and dirty things should be fine. Haven't tried video!


One thing I discovered was that changing the screen resolution to something closer to the displays native settings made text far more readable. Obviously making the text larger helps a lot but it also seemed to reduce the flickering nature of the image I was seeing.

I ended up with the following changes to /boot/config.txt

framebuffer_width=350
framebuffer_height=248

disable_overscan=0
overscan_left=-30
overscan_right=-30
overscan_top=-30
overscan_bottom=-25


I came up with these settings via trial and error and what seemed to look better to me rather than any scientific objective method so your mileage may differ but it's certainly worth having a play.
Posts: 31
Joined: Mon Sep 17, 2012 6:02 pm
by Foggy » Wed Sep 26, 2012 9:33 pm
Thank you for taking the time to try and explain.
Would some thing similar to this work and adding the resistors as you have shown.
I accept that Vgs does not have exactly what you suggested, but if I am on the right track then I will keep looking.

http://www.irf.com/product-info/datashe ... rf7507.pdf


Best wishes

James.
Posts: 18
Joined: Mon Aug 20, 2012 12:26 pm
Location: Reading UK
by AndyA » Wed Sep 26, 2012 10:01 pm
Foggy wrote:Would some thing similar to this work and adding the resistors as you have shown.
I accept that Vgs does not have exactly what you suggested, but if I am on the right track then I will keep looking.
http://www.irf.com/product-info/datashe ... rf7507.pdf


The Vgs is fine, a lower threshold (meaning closer to 0 since for the p channel part it's negative) isn't normally a problem.

I would make sure R2 isn't too large, I think the Pi has internal pullups on the GPIO pins, these are normally in the 100kohm region (I've not looked at the ones on the Pi specifically). You want to ensure that any voltage divider formed by the internal pullup and R2 gives a voltage that is below the threshold so that Q1 is always in a known state if the circuits input is not being actively driven. In other words you will probably want to keep it under 10k.

The only potential issue is the Rds on for the P channel part is a little higher than I'd like (max of 0.27 ohms for a Gate-Source voltage you'd end up with). That means that with the display taking 0.4A you could be dropping up to 0.1V in the transistor, not enough to matter but more than ideal.
This is mainly me being excessively fussy, that part should work fine.
Posts: 31
Joined: Mon Sep 17, 2012 6:02 pm
by Wully » Sun Sep 30, 2012 11:50 pm
AndyA wrote:framebuffer_width=350
framebuffer_height=248

disable_overscan=0
overscan_left=-30
overscan_right=-30
overscan_top=-30
overscan_bottom=-25


I came up with these settings via trial and error and what seemed to look better to me rather than any scientific objective method so your mileage may differ but it's certainly worth having a play.


Nice job Andy, I was coming on to ask if anyone had a solution for the small text.

The only issue I've got with these settings is due to the resolution a lot of text in the terminal is cut off. I'll have a mess around to find what I need.

Has anyone found any good uses for the screen so far?
Posts: 6
Joined: Mon Sep 24, 2012 4:11 pm
by recantha » Mon Oct 01, 2012 5:32 am
Hey Andy.
Thanks for the guide - going to try a mod for mine today!
My Raspberry Pi blog with all my latest projects and links to articles
http://raspberrypipod.blogspot.com. +++ Current project: PiPodTricorder - lots of sensors, lots of mini-displays, breadboarding, bit of programming.
Posts: 209
Joined: Mon Jun 25, 2012 10:41 am
by Wully » Mon Oct 01, 2012 11:58 pm
After tweaking with the settings I have the optimum configuration for using the whole of the screen while maintaining good readability.

/boot/config.txt
Code: Select all
#16:9 aspect ratio
sdtv_aspect=3

#The devices resolution is 640x480, half of that provides good readability
framebuffer_width=320
framebuffer_height=240

disable_overscan=0

overscan_left=-30
overscan_right=-30
overscan_top=-30
overscan_bottom=-30
Posts: 6
Joined: Mon Sep 24, 2012 4:11 pm
by DFog » Mon Oct 15, 2012 11:19 pm
I am also hooking up a screen similar to this to my pi but want to power it from the usb headers on the pi if possible. However my control board is unlike yours, any idea which is the 5v resistor. Also the wires in the cord are not of the same color as in your tutorial and would appreciate if anyone could tell me which are for the video feed.http://imgur.com/a/cqh1q#Uz6HC

On another note, does anyone know how to wire a 4 port usb hub directly to the pi, so I dont have to have it taking up space on the usb ports
Posts: 2
Joined: Fri Aug 24, 2012 12:12 am