热度 23
2014-2-27 13:42
1672 次阅读|
0 个评论
Well, things are definitely going at a brisk pace here in the Pleasure Dome (my office). As you may recall from my previous blog on this topic, my chum Duane Benson and I decided to create our own prototyping shield for the Arduino. Originally, we dubbed this the Bodacious Bensonfruit Arduino Uno/Mega Proto Screwshield, but we now refer to it as the Universal Screw-Block Proto-Shield System for Arduino. Why the name change? There are a number of reasons. For example, we originally thought of our proto-shields only in terms of Arduino Unos and Megas, because these were the only types of Arduino we own. But then we realised that our system would also work with Arduino Dues and Leonardos, along with any chipKIT equiavlents, hence the universal part of our new moniker. The really exciting news is that we've decided to make this into a Kickstarter project. We started to research the use of the Arduino name on Kickstarter. It turns out that you aren't allowed to say things like "Arduino xxxxxx." Instead, you have to say "xxxxxx for Arduino," which explains this portion of our name change. I'll be talking about our Kickstarter project in the not so distant future, but first I wanted to bring you up to date on the state of play. The first boards are back from the manufacturer and shown below. We've since respun a couple of items (such as the silkscreens), but the fundamental design is unchanged. Top view of the Universal Screw-Block Proto-Shield PCBs. Bottom view of the Universal Screw-Block Proto-Shield PCBs. Of course, I immediately soldered all the headers, screw terminal blocks, and other components on to my Screw-Block Proto-Shields, and then I started to integrate them into my Inamorata Prognostication Engine project. My first task was to use the Screw-Block Proto-Shields to make it easier for me to connect my Adafruit RGB LCD Shield Kit to my Arduino Mega. Let me walk you through this step by step, so you can see just how cunning this is. Consider the following images, which show my Arduino Uno and my LCD Shield. First we see them laying side by side, and then we see the LCD shield plugged into the Arduino Uno. Arduino Uno with LCD Shield separate. Arduino Uno with LCD Shield mounted. Now consider the following image of my Arduino Mega with the same LCD shield. This is the Arduino I'm using to control my Inamorata Prognostication Engine. Arduino Mega with LCD Shield separate. Many shields designed for the Arduino Uno will work with Arduino Leonardos, Dues, and Megas—without any modification or messing around . Unfortunately, this is not the case with my LCD Shield, which is controlled via a two-wire I2C interface. One advantage of the interface is that we need only two pins to control the LCD display. Another advantage is that we can control a whole bunch of shields using the same two pins, because each entity on the I2C bus has a unique I2C address. What's the problem? Well, for reasons that probably made sense to the designers of the various flavours of Arduino, the I2C pins for the Due, Leonardo, and Mega are in different locations from the Uno's pins. Thus, until now, I've been obliged to connect my LCD shield to my Arduino Mega using flying wires. Arduino Mega with LCD Shield connected by flying wires. At least, this works, but implementing things this way looks a tad untidy, and it's a bit of a pain. Now consider the image below, which shows my Arduino Mega in the foreground, my universal screw-block proto-shield boards in the middle, and my LCD shield in the rear. Arduino Mega, proto-shields, and LCD Shield separate. In particular, observe the two yellow and green wires on the screw-block proto-shields. These link the I2C pins used by my Arduino Mega to the A4 and A5 pins used to implement the I2C interface on an Arduino Uno. Now I can simply stack all the boards together, and my Arduino Mega can drive my LCD shield directly, as illustrated below. Arduino Mega, proto-shields, and LCD Shield mounted. By default, all the pins on an Arduino power up as high-impedance inputs, which means that the A4 and A5 pins don't interfere with the I2C interface. The downside is that I can no longer use the A4 and A5 analogue inputs for anything else, but this really doesn't bother me. The Arduino Mega has 16 analogue inputs to play with, and my project requires only a subset of these. The great thing about the LCD display is that I can easily use it to display the values of different variables in my program. This facilitates debugging (and I'm doing a heck of a lot of debugging). That's where we are at the moment. Well, not quite. Since these images were taken, I've added an I2C-based real-time clock and an I2C-based motor control shield to my shield stack. Soon, I'll be adding a bunch of discrete components to my screw-block proto-shields to drive my analogue meters, but that's a tale for another day. In the meantime, what do you think about our proto-shields so far? And are you interested in hearing more about the adventures involved in launching our Kickstarter project?