Embedded, Linux, Raspberry Pi

Raspberry Pi with HDMI – VGA converter

I have an early 2012 version of Raspberry Pi (generous gift from the Fedora Project) which sometimes tends to give some problem when a lot of current is being sourced from the USB. In addition to current issues with USB as well as HDMI, I faced a basic display problem when I used my HDMI-VGA converter for display which is not powered externally.

First things first, the converter won’t work directly and its almost sure that you will have to make changes to the config.txt (which holds the boot time specifications and is the key file to tell the Pi during boot time about any configurations that it should take care of) Here is what my config.txt looks like

arm_freq=800
force_turbo=1
gpu_mem=128
disable_overscan=1
start_file=start_x.elf
fixup_file=fixup_x.dat
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=47
hdmi_drive=2

The values will obviously be different for you according to your Pi and display configuration. Have a look at http://elinux.org/RPiconfig for a very detailed explaination. Some things of interest to us here are hdmi_force_hotplug=1 just pretends that a HDMI device is always attached. The hdmi_group specifies the HDMI type whether its a DMT type output (mostly used in computer monitors) or if its CEA (which is used for TV monitors). The value 2 is for DMT.  The next is hdmi_mode which is very monitor specific. For example 47 corresponds to a monitor supporting a resolution of 1440X900 at 60Hz. You can check the wiki and find the mode for your monitor.  The hdmi_drive just chooses between HDMI and DVI output modes. You can save this as config.txt in your boot partition and ho! the converter works.

But hold on! As expected, it  the other devices connected also draw some amount of current from the USB ports which because of the infamous polyfuses between the USB supply line and ports limit the current to around 140mA. This is annoying as I don’t even know the specifications of my converter (its a cheap one from Amazon which did not come with absolutely any documentation.) The only way is to open it and measure the current draw myself. Being too lazy for that, I found a lot of solutions on the web to get my power supply of pi straightened out and amazingly the simplest one worked for me (/me says ‘he he he!’ with an evil grin) Here’s what you can try (in order) –

  • Try a better power supply – Use the ones which have ratings for 1A and above The usually are faithful. Some phone chargers will work and mostly the USB supply from laptops is not sufficient. I use my Samsung phone’s charger which has a rating of 5V, 850mA It works until I use more devices like Wi-Fi/Bluetooth dongle etc.
  • Buy the externally powered USB hub – If the simple thing above doesn’t work (usually when you are connecting more than two heavy devices – like a non-powered HDMI-VGA converter and a HDD) you need to find an externally powered USB hub. This is the safest bet (recommended) and usually not exciting if you are of the hacker kind. There is a list of good ones on http://elinux.org/RPi_VerifiedPeripherals#Powered_USB_Hubs
  • But this is pretty overkill for daily mundane tasks like a Wi-Fi dongle + some other USB peripheral. So the more interesting way is to short the polyfuses. I have heard that they no longer exist on the Model B rev 2.0 which seems good, but the main power still has polyfuses (shorting them is a bad idea I think) So for older models, you can get most of peripherals working when you short the polyfuses.
  • If you are more adventurous kind, you can get your Pi powered from an external ATX power supply which you can scavenge from some old PC (as I did) I am pretty much planning to power everything including the pi and a small fan from a Pentium 2 processor (slot package) from my ATX supply and I hope it will work.

I managed to get mpd running on my Pi and have setup my ownCloud on it so that I can use it as a small storage cloud. The mpd combined with my Droid MPD client on an Android phone has essentially made it my remote music station. I am waiting for my relay board to come so that I can maybe tweet-a-lightbulb at home sometime 🙂 I shall keep posting updated about small hacks and things I learned with the Pi.

Here’s an old post which I found interesting on polyfuses on Pi and from where I learnt some stuff about it – http://theiopage.blogspot.ca/2012/06/increasing-raspberry-pis-usb-host.html

Standard

11 thoughts on “Raspberry Pi with HDMI – VGA converter

  1. Paul Winwood says:

    Using a HDMI-VGA converter is not the same as using high current devices from the USB ports. As you say the USB ports on some versions of the Raspberry Pi are protected by polyfuses. The HDMI port is not designed to source anything more than a very small current on the HDMI port. This current flows through a protection diode that stops the Raspberry Pi from being powered from the HDMI port. This is rated at 200mA maximum. In my tests with a HDMI-VGA converter I found the converter was sinking 400mA which is flowing through the diode. It wont last long. The HDMI to VGA converter must be powered.

    • Oh! I think i made some mistake in my writeup and was not able to explain clearly. See the edits now. Thanks for telling me exactly about the converter currents. The thing is that when I use the converter with other USB devices together, there is a sudden shortage of current. Sometimes, the converter works and sometimes the wi-fi dongle does. I can’t get both to work at the same time. With my old supply (5V, 750mA) even the wi-fi dongle was freezing though it was being properly detected. I found the voltage drop to ~4.7V on the USB side. Anyways, thanks again for the heads-up on the diode ratings for the HDMI. I think I will stop using the converter for now. I tried tunneling X applications through ssh but its so damn slow 😦 I think I will get a small screen soon.

  2. Pingback: Links 8/7/2013: A Lot of Linux (Kernel) News | Techrights

  3. Abhishek says:

    Hey,
    Nice tips. I recently used HDMI-to-VGA converter & I didn’t changed config.txt & RPi booted with 1024×768 without any problem.
    But, My screen resolution is 1366×768 & I would like to get this maximum resolution, but couldn’t find config.txt in SD card (it’s preloaded with OpenElec & Raspbian with berryboot).
    Could you please guide me, how to get 1366×768 pixels ? Do i have to make another bootable SD ?

  4. TroubledPi says:

    Hi! i have a raspberry pi connected with the following layout. didn’t want to buy any other cable yet, so i was testing out with what i’m able to grab around me. however it does not work.. 😦
    Raspberry Port -> [ HDMI (male) -> DVI (male) ] -> [ DVI (female) -> DVI (female) ] -> [ DVI (male) -> VGA (female) ] -> VGA Cable to Monitor.
    i don’t really think it will work in the first place, just trying my luck wondering if theres anything in the config file where could go about it. need help please! Thanks!

  5. jacob says:

    thanks it worked…..i was getting problem while booting with kali linux…i put config file in boot section and put all these configuration mentioned above….coincidently mine is same as this….as i edit my config file before…but some booting problem was there…………

    thank you very much

Leave a comment