Creating Your Own Keyboard From Scratch – Power Part 2

Summary Page

There is one post missing I announced a while ago: how I got a whole work-day out of the batteries. The Atmel chip (ATMega328) of the Arduino has quite decent power saving possibilities, sadly the Arduino Unos voltage regulator, as well as the onboard LEDs limit the amount you can save. I guess that is the reason I could quench only hours (instead of the initially hoped weeks) out of the created powering solution (two times in parallel three AAA NiMH in series for both halves of the keyboard). I don’t own anything to measure the actual power consumption, the only way was testing in the field. That made the task a lot harder and I was satisfied with a somewhat practical solution. wpid-dsc05517-e1351805801692-2012-11-1-23-28.jpgwpid-dsc05539-e1351806910496-2012-11-1-23-28.jpgThe basic mechanism was clear right at the beginning: when there is no state change (e.g. pressed keys, moved mouse) for a while power the Arduino down as far as possible, connect some sensor to an interrupting pin and when it senses something (ideally a key press or a hand approaching) wake it back up. At first I thought about somehow sensing the keyboard matrix without actually polling it. But how should that work? Some kind of proximity sensor was my next idea: a PIR (passive infrared), a capacitive sensor (like a touchpad) or a FSR (force sensing). After thinking about it a little bit and checking available solutions I decided to go with a FSR. I chose to order this one and put it under one foot of the right side. I later realized I made a little mistake. I should have orderd two FSRs and put one on each side. When you take a break and then start working again with using the left side (most freqently: move the mouse) the keyboard stays frozen.wpid-dsc05541-e1351806678839-2012-11-1-23-28.jpgwpid-dsc05542-e1351806409232-2012-11-1-23-28.jpg At first I tried to follow the Adafruits tutorial. But that didn’t work for me. After creating a working solution on a different path I can’t imagine how that tutorial could really work. Maybe their FSRs are working differently. I basically followed this guide choosing the FSR threshold switch configuration (on page 21). After finding this solution I had to somewhere “steal” a LM358 OpAmp. My old burglar alarm system came in handy and had some LM358 not that difficult to desolder. It was somewhat fiddly to connect wires to the pins. My electronics starter kit contained a potentiometer which I also needed for the circuit. You need the poti to adjust the sensitivity. Basically you can configure the strength of the force that is needed to trigger. The whole thing looks quite ugly (see the pictures) but it works. I used this LowPower library to simplify the use of the power saving capabilities of the Arduino. The following gist shows the corresponding code: [gist 3997042/] Besides letting the Arduino sleep, there are clearly power saving possibilities in the BlueSmirf. Generally there are more things I could optimize. I think this optimization potentials and further ideas regarding self made keyboards will be the content of the last post in this series.

Summary Page


One thought on “Creating Your Own Keyboard From Scratch – Power Part 2

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s