In an attempt to get back into blogging about my Raspberry Pi and microcontroller projects I have been looking through my collection of parts and kits, to see what I can make, or at very least assemble. One of the kits I bought a few months ago was a "prototino". This is essentially an Arduino squashed on to the end of a bit of prototyping board (hence the name, I guess).
As you may have noticed if you follow the posting schedule here at Raspberry Alpha Omega, I have had a few months away from blogging. It has been a busy summer with holidays, travel, and family stuff, so I thought it best to take a break. This post is mainly to remind anyone still reading that I am still here, and that I have a lot of things queued up to write about!
Just a quick post today to report that I want along to the Cambridge Raspberry Jam today. Many thanks to Michael Horne for arranging it!
This was my first "jam", so I was not sure what to expect. It turned out to be a kind of one-day conference, with a sequence of presentations separated by a bit of time to explore some table displays and chat with their creators. The talks and the tables were all interesting and inspiring, with a recurring theme of using Raspberry Pi and Arduino together to gain the advantages of both.
You have probably heard of the big names in "cloud" file storage. Maybe you use something like Dropbox, Google Drive, or iCloud already. They are all easy to use - once you have installed a small service on your PC and told it what files and folders you wish to store, it takes care of it. You get access to the same files on all the machines you connect, just by placing them in a regular folder.
I have several Raspberry Pi boards, and several SD cards which I swap around depending on what I am doing at the time. I usually can't be bothered to find and connect up a HDMI display and separate keyboard, so I just connect using ssh from whatever development PC I happen to have to hand. This is very straightforward once you have a ssh client (my personal favourite is
MobaXterm - I like it so much that I have recently paid for
the professional version.)
After spending the last few days messing with a MCP3002 SPI ADC chip, I'm beginning to wonder if it is not really suitable for my needs after all. Both the SPI libraries I have tried have had problems with excess waiting around transfers, which becomes very significant when each new sample requires a whole new SPI "connection" as well as two bytes of data transfer. It occurs to me that perhaps the alternative plan holds more hope: Do the analogue input on a separate board (preferably one with a built-in high-performance ADC) and transfer partially-digested data in bulk to the Raspberry Pi for analysis and output.
Yesterday I used Gordon's WiringPi library to successfully read analogue voltage values from an MCP3002 chip over SPI. My plan for today was to try and read data as fast as possible, to begin building one version of an ultrasonic "bat detector". However, I got a bit distracted..
When I looked in detail at the logic signals on the SPI bus during the transfer, I could see that it was valid SPI data, but there was something a bit odd about it. The clock signals and the transferred data were mostly as expected, but the /CS signal was held low for much longer than the time needed to transfer the data. There was an unexplained gap of roughly 10us before the data transfer started, and several times that afterward. Adding this to the time needed to clock the two bytes of data for each sample, the time needed to read a single value came to something like 50us, giving an absolute maximum of 20,000 samples per second. This is far below the 200,000 samples per second claimed by the MCP3002 datasheet, and not even enough for decent audio, let alone ultrasonics!
I got a bit disappointed with my little bus pirate yesterday. I'll investigate how to update it to fix the odd SPI behaviour another time, but for now, its on to trying to read the MCP3002 SPI ADC chip directly using the Raspberry Pi. However, this one I'm going to do a bit differently. My desk is filling up with breadboards and floating wires, and working out each time which wire to connect to which header pin is becoming annoying. So I have decided to wire up a simple plugin board with the MCP3002 connected to the correct SPI pins on a 26-way header. That way I can just plug it in when I want to use it, and unplug it if I want to use the rspberry Pi for something else.
A few months ago I got somewhat stuck trying to understand how to join the dots between the Bus Pirate and a MCP3002 SPI analogue to digital converter (ADC) chip. Finally I abandoned the effort and moved on to other things. More recently, however, I have succeeded in sending data to a MAX7219 LED matrix over an SPI connection", so I now feel that I have a better idea of what it all means. It’s time to have another go at reading analogue values using the Bus Pirate. And if that works, I’ll try with the Raspberry Pi (which was actually my intention all along!).
Over a month ago, now, I had a brief play with my Beaglebone Black. It took me a while but I just about got to the point of flashing an LED. That was enough at the time, but now I want to do something more interesting. So I thought I'd start by doing some patterns with the flowing water light 8-LED array which I have happily used on both an Arduino and a Raspberry Pi.