MyRaspberryAndMe

Tinkering with Raspberry (and other things)

header


Elevator Information Display using two ILI9341 TFTs

It has been a long time since my last post, well, I have been busy and had significantly less time for tinkering.

But back again. Take an old elevator panel, two displays and a Raspberry Pi and transform it into a home information system.

Ingredients and Original Idea

  • A really old but massive elevator panel with all the original wiring, the buttons and even the led-matrix displays.
  • A Raspberry Pi (of course)
  • Two ILI9341 2.2″ TFT panels
  • Adafruit’s python library for ILI9341

My original idea was to reuse the LED-matrix from the old panels to display some information. This unfortunately was not possible as these are not ‘normal’ matrix displays but do have some sort of logic built in. Applying a voltage on the terminals (in the middle of the picture) does display the preprogrammed floor numbers in the display. Well, this is not a big issue, TFT displays are much cooler.
Here is an image of the unaltered elevator panel:original elevator panel

Continue reading

head_touch


Making an eGalax/Pollin touchscreen work with tslib

Some months ago I found a cheap 7″ LCD screen with a resistive touch-panel. Searching the internet gave me some hope that the screen would work perfectly with my RaspberryPi. And alas, it did. Under XWindows, which I wasn’t going to use on the project I had in mind when buying the touch-display. So the search began and lastet. There’s lots of information out there about eGalax-touchscreens, most of it stating that one needs to compile a custom kernel, hack into some outdated driver software and so on.

After some investigation it became clear that the information available is mostly outdated, as the newer Raspbian images do recognize the touchscreen without compiling a custom kernel. So I started on my own and tried to get the screen working not with XWindows, but directly with the framebuffer. Continue reading


7 Comments

Windows Phone 8.1 on Nokia Lumia – A rant (Updated 2014-07-14)

I know I have been quiet for a while now. And now I start a rant? Yes, I need to share my thoughts because otherwise I will definitely crush a phone.

For those interested why I have been so quiet: I got myself a new job, switched from freelance work to a permanent position. So no more tinkering around when I am in fact in my home office…

Now on to the rant:

At the moment of writing this blog post I am literally seconds away from just throwing my girlfriend’s new Nokia Lumia 635, which I have the honour of setting up (at least I am the nerd here), out of the window or, to avoid being sued by passers-by, with full force against a wall. And I think I could happily live with the best girlfriend ever not talking to me for a very long time. (No, not really).

So what has happened?
She needed a new phone and didn’t want an iPhone (quote: “Every idiot I have to talk to on business has one of these”) and she didn’t like the Android GUI and usability. So we looked at phones for some months and finally she decided on a Windows Phone. Mostly because she almost instantly knew how to use it. Well done on this, Microsoft.

I started searching the net to make sure the phone would integrate with our “infrastructure” we have set up at home and for remote access. That is, being able to connect to our Owncloud server via SSL, the handling of self-hosted IMAP accounts and, of course, how to prevent the phone from synchronizing private data (addresses, calendar entries) to Microsoft servers.
It took me some days but finally I came to the conclusion that all of this would be possible. In short:

  • create Microsoft account only for Store and phone setup
  • use only Microsoft Store vouchers and no credit card
  • Email address used for Microsoft account is not traceable to real-life name
  • Use iCloud account type to connect to Owncloud
  • IMAP push is working (just create an IMAP account, select 15 minutes as the sync interval and save it. Let the phone connect once to the account then go back to the account’s settings. If your imap account supports IMAP-Idle you should be able to select “As it arrives” as sync interval. At least on my Host Europe accounts it does work like this)

Why the rant?

Well, we’ll get there shortly. The phone was ordered and arrived 2 days later. Initial installation went smoothly, more or less (but that was mostly my fault). All of the above mentioned points are working with the phone. Yai!

Until now the phone is in its testing stage, connected to WLAN with no SIM inserted. This is just to test Owncloud syncing over a longer period of time to prevent the best girlfriend ever from getting angry if contacts/appointments would get lost…
During this time I stumbled upon some things I didn’t even think about checking first because I had the opinion they were state of the art and well established since years. Oh, how wrong was I…

Here’s the list of annoying things:

  • If connected to WLAN only and the date/time set to update automatically, the time and date are wrong every time the phone restarts or gets switched off/on again. This is because Microsoft, in its own mysterious ways, decided that WindowsPhone can’t synchronize the time over NTP. Windows Phones rely solely on NITZ, that is the date/time/timezone info needs to be transmitted over the air by your cell phone network. And of course not every provider supports NITZ…
  • The volume of the alarm clock can’t be controlled. No, not at all. It is at a fixed volume, the user has no control whatsoever. This follows the trend of most modern devices that the user is not allowed to decide what and how he/she wants things to behave, you have to live with what the manufacturer decided to be “the best experience for our valued customers”.
    So the only way to modify the alarm sound volume would be to take a custom sound file, put it through Audacity to reduce the volume and then copy that onto the phone.
  • You can not change the “Snooze/Sleep” time of the alarm. It is predefined at 9 minutes and you have to live with it.
  • You can’t set the phone to “Be silent and don’t vibrate” by using the volume buttons. The established “decrease volume – vibrate only – mute” that most phones have is not working. You can mute the sound but the phone is then set to “vibrate”. To switch that off you need to go into the settings menu.
  • Copying custom sounds to the phone is as far from straightforward and user friendly as “Star Trek – The final frontier” is from a good movie. I thought that, as the phone and its SD-card show up in the Windows Explorer, it would be sufficient to copy an MP3 to the “Ringtones” folder. Nope, that did not work. Setting the genre to “Ringtone”, as is suggested on the net, did not work. I finally had to download the WindowsPhone App, copy my sound files to the “Music” folder on the Windows machine (otherwise they won’t show up in the WindowsPhone App) and then, using the aforementioned App, mark the files to be used as ringtones and synchronize them with the phone.
  • You can’t even use ringtones/notification sounds stored on the SD-card. What a bummer is that?!

The updated part:

  • IMAP folders you create using ie Thunderbird do not show up in mail app. Only the folders that were present when you set up the imap account on the phone are shown. If you add/change/remove folders you need to remove the account from the phone and set it up again.
  • Sending full resolution photos via the mail app does not work. Photos always get resized. They suppose you should use OneDrive and share photos that way. This leads to
  • In order to sync full resolution photos with OneDrive you need WiFi. It does not work over 3G or 4G (“By design”):

Bildschirmfoto 2014-07-14 um 18.27.58

  • If you get mails with attached files and save them to the phone they may not show on the phone because:

Bildschirmfoto 2014-07-14 um 18.27.28

What the heck?

The possibility to adjust volumes for ringtones, notifications and alarms separately have been present on all my Nokia phones since the E51 or E90. All other phones I have been using lately do have this feature and I never thought that a new phone OS would omit that.
No time synchronization over NTP? Who decided on that? If it would have been a decision made by some politicians I would have thought “OK, they just did not know. It is ‘Neuland’ to them”. But a company such as Microsoft? I wouldn’t have been surprised if they had decided that time could only be synchronized by a service owned by Microsoft (using a proprietary protocol). But no time synchronization via internet connection? Fail.

Of course this is all for our best. Modern software is more and more designed to let me do what the software thinks I want to do or what is best for me. I could go with that if there was a button labeled “Let me do it on my own”. Have a software suppose the things that I most likely do need to configure or that are most likely needed at a certain point is a great thing. This should be to help and to support us. Not to restrict us from doing the things our way.

It is me who spent money and it is me who wants to have the final decision over what I want to do now. As a result I am responsible for my actions.
But wait, that is changing. Therefore phones may figure out by sensor readings when I am driving a car and during that time stop delivering SMS and phone calls.
STOP. I do not want a phone that is going to decide when it delivers an SMS or notifies me of a call. What would be next? Combine Facebook’s “what to display in the timeline” algorithm with the phone’s “when to notify user” behaviour? So that the phone decides which calls are important and which are not?

No, THANK YOU.

I and only I am still responsible for my actions. And can be held accountable for them, that is. So no electronic gadget tells me what to do, when to do it and how to do it. At least let me choose if I want it the “assisted way” or my own way.

 

Thanks for reading this. Details on how I managed to sync Owncloud (and get Owncloud up and running again), got instant mail notifications etc. will be in a next blog post. For now I need to put the Windows phone away or it will suffer…


Quicktip: Selfmade LED lamp with T5.5 socket (Telephone Lamp)

For my newest project, the “intelligent desk clock” (I shortly mentioned it at the end of the last post) I need to have big momentary switches that could be illuminated. The idea is to let the switch blink if there is user interaction needed.

I found some switches that need old-style bulbs with “telephone lamp” socket, technically a “T5.5” or “T5.5k” socket. These are usually bulbs running at 12V or higher. I want to realize the project with an Arduino or a Raspberry Pi, so 5V is the voltage I have available. LED lamps with T5.5 socket are rather expensive, luckily I was able to order 10 pieces for 7 EUR from ebay. They do have red LEDs but I thought I could desolder them and solder some white ones to the socket.

Today I found some cool switches at my electronics shop, immediately purchased a bunch and at home, was able to completely disassemble the switch. So I now am able to put some label behind the orange button! Of course the shop had the fitting bulbs in stock, with real lamps rated at 12V, but for 0.5EUR a piece. So I took some, too.

Here are pictures of the switch and the disassembled parts:

P1010441

Make your own T5.5 LED lamp

Take a look at the T5.5 lamp from the shop. It’s just a metal socket an the bulb soldered to it. The metal parts are glued to the bulb with tiny spots of some hot glue. With the help of a scalpel and some brave cutting and bending (watch your fingers if the glass breaks) the bulb can be detached from the metal socket. With a firm pull the whole bulb can be teared off. Now take a soldering iron and clean the soldering spots and, using the scalpel, clean the glue residue from the socket.

Shorten the wires on the LED (remember which side is Anode and Cathode, respectively) and the resistor (I used 220 Ohms, the usual value when using 5V and an LED). Solder the resistor to one wire on the LED and bend the wires slightly outward so they will make contact with the metal socket when fitted in. (One square of the paper is 5mm x 5mm)

P1010437

Now fit the LED into the socket so that the socket is just around the bottom of the LED. You will need some sort of fixation tool like alligator clamps to make your life easier. Now cautiously solder the wires to the socket and you’re done. You should end up with something like this:

P1010440

You will definitely need all your patience making this LED thingy. Taken into account that an LED lamp with T5.5 socket will cost around 5EUR (6 USD) each, it’s worth the effort.


1 Comment

GPRS/GSM via Serial (again)

I recently stumbled over a cheap GPRS/GSM shield made for the Arduino platform, of course on ebay, of course from China. As it was priced at a very reasonable 20 EUR (25 USD), I thought I’d go with the risk and order from China. Several weeks later it finally arrived and, I couldn’t believe that at first, worked out of the box.

This is how it looks. If you get interested in one of these gadgets, just search for “GSM Arduino” on ebay, that should do the trick.

P1010427

It’s a SIM900 based design and has a real time clock (plus buffer battery) on the back. A full description of all the possible AT-commands can be found here. It is basically the same shield that can be bought from Seedstudio, but much cheaper. A description with some sample sourcecode (that is working!) can be found at the Geeetech-Wiki pages. Continue reading


2 Comments

132 LED-matrix with AS1130 and Python

The AMS AG (austriamicrosystems) does have a neat little (literally) chip called AS1130 on the market. This chip is able to drive 132 LEDs, arranged in a 12×11 cross-plexed matrix. It can store up to 36 individual frames (pictures) and up to 6 patterns for blinking and PWM control of every single LED in every single frame. The frames can be displayed as still images or as a movie, the chip even scrolls the frames without the need for doing any calculations on the controlling computer side.
I could not find any Python code for that chip so I dived into the datasheet and wrote my own driver. As always, the sources are available via GitHub. Here is a short video demonstrating the capabilities of that chip. I had to use some paper to shield the ultra-bright LEDs or the camera would have recorded just a bright white spot…

Continue reading


Pi-Hicle final – motor-control and autonomous driving

So this is going to be the final part of the “Pi-Hicle” series (here are Part 1, Part 2, Part 3, Part 4). There is some good news and some bad news… But first a video of the vehicle moving:

The good news is that the BigTrak is in fact runnning on its own, avoiding obstacles with its three IR sensors. The bad news is that I have discarded the Raspberry Pi for this project. The vehicle is controlled by an Arduino mini now and there won’t be a Raspberry Pi in it in the near future. Now why this?

  1. I fell in love with the BigTrak and I simply can’t make any more holes in it, let alone ripping the keyboard off
  2. My plan to decrease the speed gradually as obstacles are detected does not work. There is not enough torque to move the wheels when the speed goes below 60% (and that is still too fast indoors, at least at my home)
  3. With the vehicle moving that fast a video camera is obsolete, one wouldn’t get a clear picture of anything (and I don’t have pets to annoy…)

So I am going to share the last steps in making this project. This involves mounting the sensors and putting everything together and the simple, yet working, code for making the BigTrak drive. Continue reading

pihi3_header


4 Comments

Pi-Hicle part 4 – Sensor Phalanx

I finally had the time to do some more work on my Raspberry Pi controlled Big Trak. So this is all about sensing the environment, well, avoiding obstacles, that is.

My idea is to have the vehicle measure the distance to any obstacles in front and to both sides. If it can’t move any further in forward direction, it will be turned in the direction (left or right) where there is the biggest distance to any obstacles. Very simple but that should be very effective. And it gives the impression of “real autonomy”, because the vehicle will turn in different directions to avoid a collision.

To get this done I ordered three Sharp GP2Y0A02YK0F distance sensors. They are well documented and used by many people out there, so I thought they should do for me, too. The sensors translate the distance into a voltage, so there is an analog value to be mapped to the distance. There is a data sheet with a nice graph showing the expected output voltage oder distance. According to the specifications the sensor has a range of 20 to 150 cm. That quickly proved to be a little too optimistic… Continue reading

pihi3_header


2 Comments

Pi-Hicle part 3 – Big Trak autopsy and findings

This part is about the internals of the 2010 model “Big Trak”. I intend to use this toy as a base for my raspberry Pi powered vehicle. In part 1 of this series I covered the basic idea of my “Pi-Hicle” and recreated the Big Trak logic in Python. Part 2 was about displaying the programmed path on a display. Now I am lucky, because the “best girlfriend ever” gave me a real 2010 Big Trak for christmas. She even made a label, reading “Present for disassembly”. So I am doing nothing wrong here…

There are numerous resources out there about disassembling the Big Trak models, so I won’t cover this. Locate the screws and pay attention for those hidden under the grey rear bumper, then lift the top carefully and continue. David Cook from “The Robotroom” (www.robotroom.com) has extensive material about the original 198x Big Trak. For the new series of Big Traks you can find modding instructions with lots of pictures at srimech’s blog and some analysis of the circuits at the “Singleton Miller Wiki“. I am going to concentrate on my additional findings in this blog post. Nevertheless, here’s a quick overview where the screws are located. Blue arrows are “visible” screws, the red arrows point to where the additional screws are hidden under the bumper thingie:

chassis_bot

Continue reading

robot_header


3 Comments

Pi-Hicle part 2 – Programming Movement And Display Path On Screen

In part one everything was about getting that legacy touch screen to work. Now it’s time to re-live my childhood. I am going to include the logic that will move my Pi-Hicle around.

In case you didn’t read the first part, here’s a short video demonstrating the GUI and screen output. The path can be programmed and will be displayed on screen with triangles showing the Pi-Hicle’s heading.

orientationThe original Big Trak was able to hold 16 instructions in its memory. Sixteen! With the Raspberry Pi as a brain this number is significantly higher, although not really needed. The programming was done with a touch pad where one could select the direction (forward, back, left, right), wait and fire. Every command was followed by one or two digits, telling the vehicle how many units of its own length to move. The numbers after the “left” and “right” instructions were used to program a turn if xx degrees. To make things easy for us children, the angle to move was scaled according to an analogue clock. 15 meant 90 degrees, 30 was 180 etc.

From the image it is clear that “Right-45” would have exactly the same effect as “Left-15”, although the vehicle would be rotating in the opposite direction. Continue reading