You are viewing jeff_duntemann

July 2014

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  
Powered by LiveJournal.com

The Raspberry Pi Keyboard Stutter Problem

When I first cabled up and ran my Raspberry Pi board, it worked like a charm, first time. I was powering it with the Motorola Droid X2 charger that I had stolen from the kitchen desk upstairs. To keep peace in the valley, I went out and bought a cheap Micro-USB phone charger at Best Buy. It booted normally, but then, when I tried to log in, the keyboard began repeating characters. I'd type in "pi" and see a parade of extraneous i's march in stately fashion across the display:

piiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

Needless to say, I couldn't log in. Now, this didn't happen every time, but probably half of all logins I attempted failed, with the same keyboard jitter. I tried two other USB keyboards I had on the shelf plus the known-good one attached to my GX620 USFF, and saw exactly the same behavior. It clearly wasn't the keyboard itself. I'm using a Dell SK-8135 keyboard, which has a 2-port USB hub to which a Dell USB optical mouse is connected. This leaves one USB port on the RPi free, with any luck to use for thumb drive add-in storage. More on that once I figure it out.

Anyway. Some googling suggested a power supply shortfall. I got out my DVM and put the probes on test points 1 and 2. These are minuscule "doughnut" pads on the RPi circuit board. One is labeled TP1, the other TP2. Hunt around on the board for them; it's not like there are a lot of square inches to search. TP1 is located next to the 220 uF filter cap at the Micro USB jack. TP2 is right next to the yellow RCA jack.

The RPi is designed to work at 5V. Anything much below that and things may start getting flaky. My reading across the test points was 4.72V. Aha! We now have a new phone charger for the kitchen desk--a cool one with a retractable cord--and I decided to dedicate the old one to the RPi. With the original Motorola Droid X2 charger in the wall, I measured 5.03V across the test points. Shazam! No more keyboard stutter.

I'm not sure it's a question of the RPi drawing more current than the charger can provide. The Droid X2 charger that works is rated 850 ma. The no-name charger that provided only 4.72 volts is rated 2.1 A. Current sourcing ability is important, especially since different USB keyboards and mice draw different amounts of power--but accurate voltage is just as important. I'm guessing it's sloppy voltage regulation in the cheap charger. If you're getting keyboard weirdness, put your DVM on the test points and see what your charger is feeding the RPi.

What? You don't have a DVM? No Pi for you!

Tags: ,

Comments

I've also had trouble with USB/cellphone chargers. Some of the 5V ones are noisy in addition to poor voltage regulation.

Most recently, we created a 4x4x4 blinkie circuit. The proto worked great, and then suddenly it didn't. What happened? We had been using the HP bench supply, then a Mot charger, and then a no-name charger. The no-name charger was the problem. The solution was to add filter circuitry on the board.

All good now, but it highlights the gulf of quality between makers of 5V wall warts.