Show by Label

Thursday, December 17, 2015

Rotary Encoders & Raspberry Pi

After having found a simple and reliable solution for a rotary encoder using a PicAXE (see demistifying rotary encoders), I figured that I could easily port that solution to my Pi's.

Well, no! The Pi is so much faster that the solution did not port or translate, see this post for Details on how I developed one for the Pi. https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=126753&p=848012#p848012

Enjoy!

Demistifying Rotary Encoders

For a new project, I needed a way to reduce parts and complexity, so it was time to finally bite the bullit and start working on a microcontroller. My experience with embedded controllers dates back at least 35 years, which is why I had been putting the decision off for a long time. Things changed in that period, and I was not keen to dive in yet. After investigating the available solutions, I decided on the PicAXE family due to the very complete design environment, and the availability of a programming language other than C or C++.

The new project needed a large selection method for frequencies and voltages, and traditional rotary switches became expensive and complex. So I decided to use a rotary encoder together with an embedded controller. It also solved the problem of a complicated frontpanel, because I now could use a display driven by the controller.

While researching rotary encoders, I learned a lot about decoding them, and eventually decided on a method that is adequate for my application.

I wrote two posts on the PicAXE forum to explain this in more details, and here is the link: http://www.picaxeforum.co.uk/showthread.php?28222-Demystifying-Rotary-Encoders-(one-more-time)-Part-1-2

Enjoy!

Monday, December 14, 2015

Using a single push-button to start/stop/powerdown the Raspberry Pi

A while back I did some work by another forum member to incorporate an interesting chip with Raspberry Pi's. It really lacks a "PC" like start/stop button, but this was left out most likely for cost reasons. There have been many designs made to solve this challenge.

Linear came up with a couple of chips that helps to solve this problem, and with the help of the Raspberry Pi foundation, an overlay was created to get a GPIO port that can signal the end of the Halt status.

Based on that work, I created a design that is well documented and rather easy to build. While I was at it, I came up with a couple more designs that uses this chip, the LTC2951-1, although there are several in this family. Unfortunately, these chips are hard to get, not in-expensive at about $5 each, and come in a tiny, very tiny SMD package. On top of that, MOSFET's are used to switch the power, and the right ones (with a low RDS-on) are also only available in SMD packages.

Eventually, I was able to come-up with yet another design that is even more simple, and only uses 4 resistors and 1 capacitor, in addition to a push-button.

Here is the link to the posts on the Raspberry Pi forum:
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=128019

Enjoy!