Paleotech Projects!

Learning about electronics (and technology in general) is, for me at least, about building things. It’s nice to learn the theoretical background behind how a circuit works, but sometimes getting a good intuitive understanding means putting components together into a real, working circuit.

I’m currently working on developing several projects to be published here. The idea behind each one will be to allow anyone interested to build them, and learn about various concepts related to electronics in the process. The plans will be open-source and published under the Creative Commons “CC BY-NC-SA” license, meaning you’re free to copy the plans (with attribution) for noncommercial purposes, and modify them as long as you share your modifications. If you’d like to use one or more projects in a commercial venture, please contact me first. The idea is to help more people get interested in electronics and to teach basic electronics concepts; if you have an idea for a product that could help with that, I’d like to hear about it.

The projects are categorized according to a rough “level” scheme, to provide an idea of how complex or difficult a particular project is. Here is an overview of what is meant by each level:

  • Level 1: A quick project (maybe an hour or less) requiring basic tools and equipment. An example would be experiments connecting light bulbs in series and parallel.
  • Level 2: A short project (perhaps an evening) requiring basic to moderate-level tools and equipment. An example would be a 555-based LED blinker or perhaps a very straightforward Arduino project.
  • Level 3: A moderate-length project (maybe a weekend or two) requiring some specialized equipment (oscilloscopes, programmers, etc) depending on the project. Simple PIC projects would generally be Level 3.
  • Level 4: A significant project (perhaps a few weeks) requiring extensive electronics knowledge and/or specialized equipment. Examples would be the GPS puzzle box project and the DrACo/Z80.
  • Level 5: Extremely complex projects requiring weeks to years to complete. (Basically, anything too complex to qualify as Level 4.) An example would be GPS-enabled autonomous aircraft.

The projects have their own page, in addition to being featured as regular articles as they are created. Comments and questions are welcomed — post in the comments or send me an email (“eric” at this domain) if you’re not a spambot.

 

Posted in Digital Citizenship, Electronics, HOW-TO, Projects, Science | Leave a comment

I/O, I/O, It’s Out The Port We Go…

Android devices are great things. I’ve been enjoying my Epic 4G ever since I got it (on release day) last August. There are lots of apps for it — and even a modern dialect of BASIC. I’m continually finding out new things to do with it, from playing Augmented Reality games to enjoying interesting music-meets-the-visual-arts applications, to going for a quick virtual flight.

I’ve even recently started learning Android development. Even though Java is necessarily involved in this process, it’s been fun. One thing has been missing, though — the ability to connect with embedded devices. Embedded system design is a big part of what I do, and I missed the ability to tie applications to external microcontroller-powered devices.

The IOIO board for Android (available from SparkFun) fills this niche nicely. Once you’re set up for Android developing, the IOIO board and accompanying API allows Android devices to electronically interact with the outside world.

In Embedded-Geek-speak, it gives your Android devices GPIO ports.

The IOIO board -- GPIO ports for your Android!

The online documentation for the IOIO board is available here.

Here is a quick walkthrough of what it takes to get up and running with the IOIO board, starting from scratch. Much of this information was distilled from the excellent tutorial available on SparkFun’s site — if you’re already an experienced Android developer, you might want to start there instead, since they don’t bother to cover all of the necessary steps in gory detail. (They do link to everything you need, though.)

To make connecting to the board easier, you will probably want to solder some row connectors to it. I went with a DIP configuration: a 22-pin row down each side of the board. That will allow you to use it with a pair of 830-pin solderless breadboards. (You’ll want to either use a decent temperature-controlled soldering iron with a narrow tip to do this, or bribe a friend who’s good at soldering.) Solder the connectors so they connect to the bottom of the board and point downwards.

Software-wise, you will first need the Java JDK (about 70MB, for Windows).  This is not the same thing as the Java runtime environment (JRE), which I won’t link to here to avoid confusion. The JDK allows you to actually develop Java applications. Download and install it first. (Make sure you get the version you need for your system — although for some reason, I needed to install the 32-bit version even though I’m running 64-bit Windows 7. You may have to, as well. Go figure.)

Next, I strongly recommend downloading the (classic / Helios version of the) Eclipse IDE, available here. This will help organize development tasks and provide an integrated environment in which to work. There are other IDEs — possibly very good ones — but Eclipse is the one I’m most familiar with, and so I will base this walkthrough on it. (All of these tools are free, by the way.) Download and install Eclipse (again, get the version appropriate for your host OS.)

Unpack Eclipse into a directory where you want it to reside (maybe C:\eclipse for Windows systems, or perhaps on a folder on your desktop, if you plan on using it a lot. I left mine in a folder named eclipse on the desktop.) Eclipse is a portable app, which means that you don’t have to bother with actually installing it (and therefore, tying it to one particular system.) Once unpacked, you can run it directly.

Once you have Eclipse installed, download and unpack the Android SDK (or maybe run the installer exe, for Windows. This is what I did.) Again, put it somewhere safe — perhaps in its own directory off the drive root, perhaps somewhere else that makes sense to you. (You won’t need to access this yourself, although you will specify where the Android development plugin for Eclipse can find it, later.) Note: If you are running Windows 7 64-bit and you installed the 64-bit JDK, you might get a message saying the installer can’t find the JDK. The fix that I found for this was to install the 32-bit JDK, as well.

Once the Android SDK installer finishes, it will give you the option to run the SDK installation manager. Run this and download the whole set of tools (“accept all”). This may take a while, depending on how fast (or in my case, slow) your Internet connection is. (Verizon — where’s my FIOS, guys?)

The final step is to start up Eclipse and install the ADT Plugin. This is an automated installation done from inside Eclipse. Start Eclipse, click on Help, then Install New Software. Click the Add button, and provide this URL:   https://dl-ssl.google.com/android/eclipse/ (The installation guide recommends that you call it “ADT plugin.”)

Once the plugin finishes installing, you’re ready to start developing for Android. Now to set up for IOIO-specific development. Download the “HelloIOIO” example and import it into Eclipse. (Detailed instructions are available on the tutorial page, here.) Next, download the IOIOLib library file and unpack it into the same parent directory where you put the HelloIOIO directory. Click on Project –> Properties, select Android, then choose the appropriate API level for your target device (probably Android 2.x). Add Internet permissions (android.permission.INTERNET under Add -> Permissions), and you’re done.

Run make, and select your Android device as the target. The app won’t do anything interesting right away, since your Android is still tethered to the PC and not the IOIO board. Once the app is in place, disconnect the Android from the PC, power the IOIO board with 12V (they say 5-15V, but I’ve found at least 7V or so is needed), and connect the Android to the USB connector on the IOIO. It should start charging; if not, you may need to increase the charge current value using the potentiometer near the USB port on the IOIO board. Fully-clockwise seems to work reliably for me.

With the Android connected to the board, run the HelloIOIO app and press the button. If everything went well, you should be able to turn the LED on the board on and off. Congratulations — your Android smartphone now speaks TTL!

 

Posted in Android, Coding, Digital, HOW-TO, Java, Toys | Leave a comment

Buon giorno, Arduino!

I stopped by Micro Center today, and was pleasantly surprised to see that they stock some SparkFun kits and components. Their SparkFun inventory is very Arduino-centric; they carry inventor kits, Arduino Uno boards, and Arduino Pro Mini boards (some assembly required.)

Sparkfun gear at Micro Center!

I picked up an Arduino Uno (it looked like the typical Arduino board I’ve seen online), as well as an SD card “shield” accessory for it. I wanted to see what the difference was between developing for Arduino vs. developing for a stock microcontroller.

 

The Arduino Uno -- a basic dev board

It’s insanely easy! To give an idea of just how easy take the typical blink-a-single-LED-on-and-off-once-per-second test program (the embedded designer’s equivalent of “Hello, World.”) Here’s what’s involved (for those using Windows 7):

  • Buy an Arduino Uno board (or make one, if you want — the plans are open source!)
  • Find a USB A-to-B cable, since the board doesn’t come with one.
  • Download the Arduino software (Free, as in speech) here, and unpack it somewhere. (No need to install; it’s portable software!)
  • Connect the board to your PC (it gets its power through the USB cable.) The driver installation process will fail — wait for it to finish.
  • Install the driver manually (it’s in the drivers subfolder wherever you unpacked the Arduino software.) Note which COM port number it chooses (or move it as desired).
  • Run the Arduino software.
  • Click File->Examples->Basic->Blink. This will load the “Blink” example.
  • Click the “Upload” button to upload the “sketch” (program). The yellow LED on the board will start blinking. You’re up and running!

Opening, reading, and writing files stored on a MicroSD card is nearly as easy, if you have the MicroSD card “shield” (accessory board). This assembled in about ten minutes (a question of soldering on four rows of header pins), and plugged right in to the main Arduino Uno board, piggyback-style. After loading a provided SD card example, the board was able to read and write a “test.txt” file. Modifying this to write a list of Fibonacci numbers to a file called fibonacc.txt (apparently filenames have to conform to the old 8×3 format) was very straightforward, too. Suddenly, megabytes or gigabytes of storage are available for embedded projects!

 

A MicroSD card "shield" on the Arduino Uno

So, in conclusion, working with Arduino boards is pretty cool! About the only drawback I’ve found so far is an increased appetite. For whatever reason, I tend to associate the Italian language with good food: tortellini; calzone; pizza; formaggio parmigiana, mozzarella è provolone etc. Linguistically, for me, it’s a short hop from “Arduino duemilanove” (“Arduino 2009”) to imagining all kinds of culinary delights. The Italians certainly know how to cook. Apparently, they’re also pretty good at designing dev board systems!

 

Posted in Arduino, C, Coding, Digital, Electronics, HOW-TO, Toys | Leave a comment

Epic 4G driver fix (for Windows 7 64-bit)

Use a good USB cable. Apparently, it really *is* that simple!

The original cable, shipped with the phone, works great for charging but does NOT work for data transfer — at least on every computer running Windows 7 that I’ve tried. It causes the phone to not be recognized when plugged in to the computer as a USB device. I have had good luck with the following cables — and there are probably others out there that work well, too.

Here, step by step, is how I got the driver to recognize the phone. I have tried this on my work laptop (a Dell Latitude D630), my home desktop (a homebuilt Core i7 running a Gigabyte X58 chipset motherboard), and several other PCs.

  • Find a good USB cable. Here are the results from various cables that I’ve tried:
    • Stock USB cable shipped with the phone: NO GOOD
    • (nice) Belkin USB extension cable / adapter kit: NO GOOD
    • Belkin USB-to-micro adapter, plugged directly in: UNRELIABLE
    • Radio Shack micro USB cable:EXPENSIVE BUT RELIABLE!
      (I disagree with the reviews on the Radio Shack site; this cable looks to be very solid and reliable, and works well with the Epic — but is way more expensive than it needs to be. For $25, it had better work well!)
  • Turn the phone on, and unlock it if needed, so it is at the home screen.
  • Plug the phone in to the USB cable. This should bring up a dialog box.
  • Choose “Mass Storage” when prompted
  • Click on the “Connect” button
  • Click “OK”. (Google, WHY is Froyo so much more of a pain to connect? Do we really need to click through three confirmations for this??)
  • Wait for Windows to detect the phone and load the mass-storage driver. The phone should appear as removable storage under “Computer.”
  • Remember to unmount the phone (using the taskbar icon) when done.

If these steps don’t work, here are some things to try:

  • Try another USB cable. For some reason, Windows 7 is very picky about USB cabling when connecting to an Android device like the Epic 4G. This is what finally solved the issue for me — even though I was already using the OEM cable supplied in the box with the phone.
  • Download the mass-storage drivers for the phone from Samsung’s site here. (Click on software, then on the file folder icon at the right.) Unpack it, unplug your phone from the PC, and run the installer.
  • Go into Device Manager and remove the USB driver and try the above again.

Good luck. Please feel free to post any questions, comments, or suggestions here.

 

Posted in Android, Digital, HOW-TO, System Administration, Toys | 2 Comments