RPi2.IT – Updated Raspbian released for Raspberry Pi – my project continues

Isn’t it a pain when our internet is capped because we have exceeded our download limits for the month?  Anyway, this was our situation for the past week – our 200GB was used up.  Ok, this is about the Raspberry Pi 2.  Remember when I tried it out when it was first released?  The RPi.GPIO module wasn’t working and to get it to work, I had to download and use a non-release version.  Just a few days ago, the Raspbian linux distribution was updated.  As we got uncapped yesterday, I was able to finally download and install it onto a micro SD card.  Raspbian is based on Debian Wheezy and is for Raspberry’s hence the name.  The current kernel is 3.18.

Alright, first thing was to run Python3 and then enter the command  “import RPi.GPIO as GPIO” – success, this was accepted without any errors.  Fantastic, I am now able to “RPi2.IT“.  I went through my standard steps to verify that the hardware was accessible, by downloading wiringPi and pigpio and confirming that these add-ons will access the RPi2 hardware – yes, confirmed that GPIO access was possible.

I checked the i2c bus, and yes, I still need to modify the /etc/modules file to add i2c-dev before the /dev/i2c1 device will show up.  I install i2c-tools then use “sudo i2cdetect -y 1” which ran successfully – showed no i2c addresses visible, because I haven’t connected anything as yet.

Now, this morning, I checked my breadboard wiring.  I have four MCP23017 chips ready to install onto the breadboard.  I applied 12V power to the breadboard, and my led lights up showing that I have power.  Then I used my multimeter to measure the 3.3V power rails.  Why 3.3V, you might ask?  The Raspberry Pi general purpose input output pins are 3.3V pins, so I cannot use 5V without using voltage level converters.

SONY DSC

My previous plan was to use voltage level converters, but have since decided to make everything 3.3V to avoiding the hassle.  I found a nice 3.3V dc to dc converter made by Recom, that takes 6-28V input, and gives me 3.3V out – at efficiencies from 75-88% – not bad.  It has the same pinout as the standard linear voltage regulators like the 78M33 and doesn’t need the input and output capacitors.  In comparison, the efficiency of the 78M33 with 12V input and 3.3V output is something like 27.5% at rated load of 500mA.

Ok, time to bite the bullet – I inserted the four MCP23017 chips, then applied power.  No magic smoke was released – now let out a sigh of relief.  Checking the voltage on one of the interrupt output pins – I get 3.3V, ok – as I will be using these to connect to the Raspberry Pi 2.

SONY DSC

Now, to get on with my software after a long delay waiting for the Raspbian distribution to stabilize for this new model Pi.

RPi2.IT – This just in, the Raspberry Pi 2 is camera shy!

I was reading recently about a minor bug found with the Raspberry Pi 2, however this one seems to be sort of, unexpected, but expected in a way.  Apparently a bright flash such as from xenon camera flash could trigger the Raspberry Pi 2 to shutdown, or at least go a little haywire, hence I thought that I should check it out.

I used my Sony a300 camera in portrait mode and took a closeup photo.  I had the Raspberry Pi 2 connected to a monitor so I could see if something happened.  I took a couple of photos with flash and sure enough the display went out for a second or two then came back on.  After examining the photos, I noticed that the Raspberry writing was upside down, so repositioned the Raspberry Pi 2 so that the writing was right side up, then took another photo – this time, the display went out and didn’t come back.

SONY DSC

It appears from research that the problem is due to a CSP device that is sensitive to light. If you have a look at the word “HDMI”, then to the left of it about the same distance as the word, there is a black chip – a Chip Scale Package, actually.  A CSP does not have a plastic case around it and is essentially a silicon chip with solder balls on the bottom.

From this application note – http://www.silabs.com/Support%20Documents/TechnicalDocs/AN0878.pdf – we find that the fix would be to cover it with Glob-Top Epoxy.  Alternatively I could just put the Raspberry Pi 2 into an opaque case, but that takes all the fun out of playing around with it!

RPi2.IT – Trials and tribulations of Raspberry Pi 2, or the bleeding edge!

The news of the new model Raspberry Pi 2 came through in the early hours of Tuesday, 1AM to be exact. Since I had been doing some work on the Raspberry Pi, I thought it might be good to get a couple to play with. I checked stock at Element14 – no issue, over 2300 units in stock. As it was getting late, I went to bed and got up around 8 or so, and had another look at Element14. 1900 in stock, ok – maybe I should place the order, anyway – that is what I did, and quite quickly at about 12 noon, there was less than a thousand with all stock being depleted by sometime after 1PM. Later that day, I got an email that the order had been processed – great.

Anyway, on Wednesday I picked up the order, grateful to get my hands on these new Pi’s, but soon after I went out to look at a server problem.

Later that night, I checked the Raspberrypi.org website, it appears that I will need to download a new Raspbian image to run on the new RPi 2. This one is different to my old one, in that it has a Micro SD slot instead of a SD slot – no problem, as I was able to pick up my 8GB Micro SD’s that had been on order with ITestate – a good price at $6 each. Anyway, last night – same night, I put the image on the 8GB microSD and went to bed.

Today, when I got back from continuing the server job, I start up the Raspberry Pi 2, and go through the configuration and… some things are not working.

I test the I2C bus, and nothing is visible even though I have configured. Ok – go on to the next item. In python, I load the RPi.GPIO module and I get an error, that this module can only be run on a Raspberry Pi. Hey, what gives? Anyway, a check on the internet seems to show, that I am not the only one to have this problem – and that a new version of RPi.GPIO should be coming this weekend – fingers crossed. I use this module to access the General Purpose Input Output ports on the Raspberry Pi, so at the moment, this is a $42 paperweight – not heavy enough really to work as a paperweight.

Anyway, I start to look at the i2c problem and eventually work out that even though the i2c-bcm2708 kernel module is loaded, the problem is that the devices are not loading. To fix this, I edited the /etc/modules file and added i2c-dev and finally after rebooting, I have access to the i2c bus – great. Now just have to wait for the RPi.GPIO module to be fixed then I can “RPi2.IT“.

[NOTE] The old Raspberry Pi had a single core processor running at 700MHz. This new Raspberry Pi 2 has a quad core processor running at 900MHz. The /proc/cpuinfo file gives a version information that is probably the reason why the RPi.GPIO isn’t working, because it cannot work out if it is a Raspberry Pi and throws out that error message.

[NOTE2]  I need the I2C bus, because that is how I am going to access a real time clock module and some additional input/output chips that I am awaiting – 4 Microchip MCP23017’s each of which will give me 16 i/o ports, with a grand total of 64 i/o plus the ones already available on the RPi 2.  I also have some N channel MosFET’s on order, to do the voltage level conversion between 3.3V on the RPi and 5V on the MCP23017.  I could have bought the MCP23018 and did away with the voltage level conversion, but would have had to pay nearly four times the price of the MCP23017.  10 BS270 MosFETs cost less than 1 MCP23017 and I only need two of them to make the level converter – a win win situation.