Thursday, August 9, 2012

Android APC Board has arrived

Yet another ARM based board has arrived. This is the APC board from VIA which features a 800MHz Wondermedia WM8750 SoC (System on Chip) with an ARM1176JZF embedded core. The board has both HDMI and VGA video interfaces, 10/100 Ethernet, four USB 2.0 ports, audio in/out jacks and a microSD socket.

RAM is 512MB DDR3 and there is 2GB of NAND FLASH memory so there is no need of an external memory card with the Operating System which by default is Android 2.3 that comes pre-installed.

First impression out of the box and first boot, so far so good, I did connect it to my Samsung monitor via the VGA interface, small mouse and keyboard, hooked up to my lab network, powered it (power supply is included) and it took Android less than 10 seconds to boot.

There are not that many applications pre-installed, you can't install them directly from Google's play, but there is plenty of 3rd party sites with Android Apps that seem to work fine, more about it soon.

Take in account that this is a platform that is still under development and that this is the very first batch of boards made.

Didn't do much with the Web browser App included in the pre-installed image, but did try the YouTube App playing a trailer of Skyfall and it was flawless with great audio quality using earphones.

Here is a video of Rich Brown's talk at TED about the $49 PC.

More about it coming out of the lab soon ...


Sunday, July 22, 2012

The Raspberry Pi - Finally

On February 29th 2012, I was awake and anxiously waiting for the clock to hit the 6:00AM GMT time mark. After a long wait the day to be able to place an order for the famous and over hyped Raspberry Pi was arriving, I had already created my account on the store and was happy to soon become the owner of one (or two) of the 10,000 boards that were being manufactured as the first production run for developers.

It is 6:00AM !! Big Surprise, instead of launching the sale directly, the folks from the Raspberry Pi Foundation (RPF) put together a deal with two major electronics distributors based in the UK, Farnell and RS Electronics. And that's not all, the boards are not available yet, they are still in production in China. But I was not a lonely geek trying to find how to place my order, there were a couple of thousand souls trying to do the same, so we DOSsed the distrubutor's websites that were not ready to take the orders, some of their affiliated sites overseas (like Newark) didn't have a part number for it, and there was a lot of confusion about price and shipping costs. This was just the start of a growing list of mishaps by RPF that I'll not cover here.

Finally after several hours trying and thanks to a fellow engineer that tweeted the right part number I was able to place an order for two units with Newark. Given that this was sort of a short run production there was a limitation of one unit, so I expected to have at least one in the next few days or weeks.

Time goes by, boards don't get shipped, alas !!!, the assembly house in China screwed up and populated the boards with the wrong RJ45 connector for the Ethernet interface !! more delays ... Ohhh, do the boards have CE and FCC certification and have been tested for hazardous materials asked the distributors ... huh?, more delays, and mixed with misinformation, confusing messages from RPF, frustrated people being kicked and banned from their Blog and forum (me included), and goes on. But after all the first board arrived by the end of May.

So what is the Raspberry Pi ?

The Raspberry Pi or Rpi, it is a small circuit board, about the size of a credit card with a Graphics Processor Unit with RAM memory on top (called PoP - Package on Package), an Ethernet controller with an integrated two port USB hub and various support components like voltage regulators, etc, to make the board work.

After many of us asking for them RPF made public the full schematics for it.

The GPU is a Broadcom BCM2835 System On Chip (SoC) that contains an ARM11 core running at 700MHz, and a Videocore 4 graphics processing unit,  and there is a 256MB SDRAM from Samsung or Hynix.

For mass storage there is a socket on the bottom side of the board that fits a SD Memory Card, composite and HDMI video outputs, a rudimentary PCM stero audio ouput, and for the model B two USB ports and one Ethernet port implemented with SMSC LAN9512 single-chip Ethernet controller and USB 2.0 hub.

The following diagram made by Paul Beech shows what is on the board.

Additional details about the hardware can be found on the eLinux Wiki Rpi Hardware page.

What about  software ?

From the get go the Rpi was intended to run a customized version of embedded Linux, or eLinux, there are several distros under work like Debian, Arch Linux ARM, Fedora Remix, QtonPI, and Raspbian the optimized version of Debian for the Rpi.

Disk images for the SD memory card (minimum recommended size is 4GB)  of some of these distros are available at the RPF download page.

Take in account that this is still a work in progress, so some of the distros like Raspbian are based on betas like "wheezy" for Debian.

Here is a screen picture of X-windows running on the Rpi with 1920x1080 resolution. One of the windows shows the Scratch programming interface that has been created by MIT as a programming and learning language for young kids.

Where it came from ?

The Rpi is the brain child of a group of scientists from the UK, that were interested to revive some of the spirit of the old personal microcomputers like the BBC Micro, Commodore 64, Sinclair ZX, and many others like that from the 70's & 80's, that provide a very economic and simple computing platform for kids to explore computer science and learn the basics of programming.

One of the alpha prototypes and proof of concept was developed by Broadcom and later modified by Norcott Technologies to reduce the size and number of components to minimize costs. Unfortunately in the process some design decisions were made without the open participation of the community, like using a micro USB connector to feed power from cellphone chargers, what was perceived a cheap solution but is being one of the major problems with the current version.

After RPF made the deal with the electronics distributors, they took over production of the boards that are being assembled at some unknown factory in  China at apparently at a rate of 4,000 a day.

How much it costs ? Is it worth to have ?

The RPF keeps promoting it with their site motto "An ARM GNU/Linux box for $25", but this statement is quite misleading. 

First is not a box, it does not run Linux but a reduced version of it for embedded systems, if you factor in that you will need a power supply, a SD card, a keyboard, a mouse, and eventually a monitor with the HDMI interface and cable, it is much more than just $25, which by the way is the price for the model A that is not available yet.

If you are geek enough, have time and money to spent on it, even with some of the technical issues that are surfacing, it is still a cool and cheap gadget to experiment with embedded Linux. My interest is to see if it could be used as eLinux based small controller for other systems like home automation, alarm systems, energy management, etc.

If you are looking for a video streamer or game box, like many of the early enthusiasts that showed up on the RPi forum, I'll recommend you better get something like a Roku 2 box that is based on the same GPU and will provide you instant satisfaction.

Also be aware that you may have to wait 5-6 weeks to get yours.

I'll be posting more articles with a more detailed technical reviews, and share some of the projects I'll be working on with the Rpi.

For more information you can visit

Happy Hacking

Sunday, July 8, 2012

What is what you do ?

Once in a while I find myself in the situation of having to answer the classic question: "What is what you do?".

Is not rocket science, but not really easy for me to answer with a few words given that they won't convey the deep complexity, knowledge and dedication for what I do.

The simple and short answer would be "Electronic Systems Design", or when people may know what I'm talking about "Embedded Systems Design", and expanded answer would be "Research and Development of Embedded Microcontroller Applications with Networking and Intelligent Graphical Human Interfaces.

WOW, that sounds pretty kewl and geeky, IT IS !!, well at least for me :-)

To give you a more mundane and simple example, there is a lot of people talking about "smart" things like the nest thermostat, well, I design the guts of that kind of stuff.

Let me share with you how the process is, and as the saying goes, one image is worth a thousand words, but I'll add a brief explanation of each step.

The images above are for one of the products I developed and sell through my website, it is a small board slightly smaller than a credit card and that has a network interface chip, a simple microcontroller as the main processor and some non volatile memory.

The microcontroller is programmed with the "firmware" that implements the TCP/IP protocols used to communicate over the Internet, and it has sort of a small web server, that once the board is connected to the Net and powered, will let you access it from anywhere around the world to turn things off/on, check sensor readings like temperature, etc.

Like many ideas, a product like this may start as some gibberish block diagram on a napkin, the back of a store receipt, etc., but it then a more formal process begins using the right tools for the job.

The first step is to identify what components will be used and research how they have to be interconnected and what stuff is needed to make them work.

Then using a specific CAD program (Computer Aided Design), in this case Eagle CAD, I capture a representation of the component (called a symbol) and its package layout for later use in the design of a circuit board, and the schematics (shown as 1 in the picture), that show all the components, its values and how they need to get connected.

Not always necessary but a second step would be to put a rough prototype of the design to test its functionality, in some cases this could be done with a simulator on a computer, but there is no better test than the real hardware. In this case (shown as 2) I put together a wire wrapped prototype (components are interconnected on the bottom by thin wires that get "wrapped" on the pins of the sockets or the leads of the components.)

If everything goes well with the prototype, the next step is to design the printed circuit board layout (shown as 3), again with the CAD program this consists in placing the components and drawing the traces in one, two or more layers of conductive material that will interconnect them.

The CAD program will generate a set of special files that will be used for Computer Aided Manufacturing (CAM), this includes the files to produce the circuit board, place and solder the components on it. Picture 4, shows another tool I frequently use to inspect the CAM files.

Again, not always but often, just a few printed circuit board prototypes get done for testing and verification, to save costs (shown as 5) this particular prototype has no solder mask (a green protective and non-conductive thin layer) or legends.

If everything goes well then, real production begins (6 and 7), and the boards get programmed and tested, put into antistatic bags and get ready for shipment around the world.

Being this simple board, or a more complex design like the nest thermostat, it may require lots of research to learn the specifics of each components, some of them like more advanced microcontrollers have hundreds or thousands of pages of documentation that I need to read and digest, and experimentation using development kits, others prototype boards, etc. 

The picture on top of this article shows a peek to my collection of development boards, evaluation kits and my own products and prototypes.

Besides what I do as an independent consultant and developing and selling my own stuff, I'm also Principal Engineer with Serious Integraged, Inc., in Chandler, AZ, where we are developing very cool graphic displays modules that let OEM equipment manufacturers add rich Graphic User Interfaces or Home Machine Interfaces to their products.

And soon we'll add a lot of connectivity features for the "Internet of Things."

So now that I was able to write this article, I'll get a URL shortener and print it on my business cards, so next time I get the question ... voilà


Saturday, October 22, 2011

Yet Another PIC32 Proto Board

Over the past few months I've been doing some developments and research based on Microchip's PIC32MX 32-bits Microcontroller product line. Time to time I have the need to do some hardware and firmware verification before I commit a final design on a pcb, I'm a prototype maniac.

Searching on eBay for TQFP-100 adapters I found this one from some folks in Thailand that is not just a plain adapter. It is tailored for dsPIC, PIC24 and PIC32 parts.

What is special about this one is that it is not just an adapter, as you will see on the other pictures below, on the bottom it includes the pads for several of the support components (decoupling capacitors, VCORE caps, etc.) and a header for the ICSP (In Circuit Serial Programming) interface to get a PIC32 up and running very easily.

You can get this adapter for less than U$S 2, and taking advantage of Microchip's excellent sample program you can get free samples of several of the PIC32MX family parts. I went ahead and dropped a PIC32MX795F512L-80I/PF on it.

Some folks may feel intimidated about soldering a 0.5mm pitch100-pin surface mount chip, don't be so, as you give it a try you will find that sometimes prototyping with surface mounted components is easier, quicker, cleaner and more reliable than with the old through-hole parts. 

So how do you solder this beast ? I'll show you.

First of all, you need the right tools, patience, a good solder iron with a thin tip (I have a Weller WESD51 station with the PES51 iron and a long canonical 1/64 tip (ETS), a good set of tweezers, a pair of magnified glasses or a microscope, and more patience.

First of all make sure the board is clean, use denatured or isopropyl alcohol to remove any grease, dust, etc. Put just a tiny bit of solder in one of the corner pads, I normally do it with the lower left corner. Position the PIC32 with the right orientation, double and triple check that you put it with pin 1 where it is supposed to be, don't get confused with the orientation of the PIC32 legend on the chip, you will see it rotated clockwise 90 degrees, that's the right orientation !!

Using the tweezers or your fingers to hold the part in place making all the pins aligned with the pads, melt the solder on the corner pin so the pin gets soldered to the pad. Then add a little bit of solder on the opposite side and corner (upper left in my case, as shown on the picture). That will put the PIC32 in almost a fixed position so with your magnifying glass and/or microscope you can double check that all the pins align correctly with the pads before we move to the next step.

Then we are going to use a technique that consists on flooding all the pins with solder, that we will later clean up using a desoldering braid or wick. Do one side of the PIC32 at a time making a pause before moving to the next side so you don't overheat the PIC32.

The desoldering braid I use is a Pro Wick 1815-10F from my Texan friends of Techspray available from Mouser.

When you are done let it cool down before you start to clean each side with the desoldering braid, put the braid in parallel to the PIC32 side with enough braid to cover all the pins on that side, when you are ready put the iron on the braid (not the pins) as the braid heats up it will start sucking up all the excess solder from the pins, when you see that most of the solder has been removed remove the braid, don't let it cool down and attached to the pads or traces on the pcb. You need to be careful about not to damage the traces coming out of the pads or trying to remove the braid if some solder got it attached to the pads or traces, reheat the braid to make sure it is free of any hard connection.

Another great product I use from Techspray is a general purpose defluxer to remove all the flux left on the board by the solder. It is also available at Mouser and the product number is 1631-16S.

Once you are done removing the solder and cleaning the area you will find that you just soldered a 100-pin PIC32 microcontroller and it looks very neat !!

Now it is time to take care of the support components in the bottom of the adapter, in case you wonder about the values and what each one is for I put together a quick schematic showing how pins on this adapter are connected. Take in account that this is not a "generic" TQFP adapter, given that the Vss and Vdd pins are connected according to the dsPIC33/PIC24/PIC32 pin outs, but be aware that the Analog Vdd (AVDD) pin and VBUS pin are not connected to Vdd. After adding the bottom components and headers I added a small piece of wire connecting AVDD to VDD, without that connection your PIC32 will not startup or be recognized by your ICD or REAL-ICE.

To solder the SMD parts I normally put a little bit a solder in one of the pads for each part, then with the tweezers position the part with one hand while with the iron heating the pad with the solder. TIme ago I put together a tutorial with some pictures showing how to deal with these parts. 
You may have noticed that on the schematic I have one LED connected to RG15, looking from the bottom on the upper right you can see one of the leads of the LED soldered to the GND/Vss plane and the other which I later connected via a 330Ω limiting resistor to RG15 (Pin 1).

While I included as optional the crystal and load capacitors for it as an external source for the PIC32 main clock oscillator, I was planning just to use the internal clock. These are the particular configuration bits (for the MPLAB C32 Compiler) I used for this project:

#pragma config FPLLODIV = DIV_1, FPLLMUL = MUL_20, FPLLIDIV = DIV_2
#pragma config FWDTEN = OFF, FCKSM = CSECME, FPBDIV = DIV_1
#pragma config CP = OFF, BWP = OFF, PWP = OFF

After finishing with the components on the bottom, adding the wire for AVDD and the status LED, I added the headers for each side and for the ICSP interface. Created a simple program to initialize the PIC32 and get the LED on RG15 blinking, applied power and voila the thing became alive !!

I've several other development boards and gadgets for development with the PIC32MX family, but I really like this simple one that has nothing besides the minimal support components and one LED connected to its pins.

Hope you find this article useful for your PIC32 projects, don't be afraid of soldering a TQFP-100, the worst that can happen is you get a wasted free sample and few bucks on parts.

Happy Prototyping !!


Sunday, June 5, 2011

chipKIT PIC32MX Competitive Analysis

Following up from my previous article about Digilent/Microchip's new chipKIT boards, despite the fact that they are footprint "Arduino compatible", they also are a new addition to the collection of PIC32MX development boards in the market, so I did some searching and put together a basic comparative analysis since the chipKIT boards are apparently priced with low margin to put some competitive pressure, the chipKIT Uno32 is even being promoted as being about $3.00 cheaper than the Arduino Uno.

While being "compatible" with Arduino, the PIC32MX has a fantastic feature set that could be crippled for some applications within the MPIDE environment. The good news is that if you don't care about Arduinio you can directly program the PIC32MX via the ICSP interface and you have sort of a generic PIC32MX development board at a very reasonable price.

What is out there ? Check the following table (click on it to download the pdf version with live links to each product page).

As you can see the chipKIT Uno32 is currently one of the cheapest options in the market, obviously there are a range of features to cover all boards, including the humongous dip switch flooded boards from MikroEletronika (I've the LV-32MX v6, like it for some work but it requires a modification to work properly with Microchip's REAL ICE).

The chipKIT Max32 falls more or less in the same price range of Microchip's Starter Kits, not that I think they are a bad product but if you want to go beyond the few LEDs and buttons on the starter kit, without the I/O expansion board (that at $72 I consider it a robbery from Microchip), they are practically useless, so the chipKIT boards may become a better solution for quick prototyping where you need to use some GPIO or analog pins.

In summary, I believe that the chipKIT boards are very well positioned not only to attract  Ardunio community enthusiasts looking for more juice and a more feature rich processor, but also current and future developers interested in the Microchip PIC32MX family.

Did I tell you that behind all the yada, yada, Microchip's marketing is running the show ?

Ohhh, just in case, chipKIT claims to be a registered trademark of Microchip Technology, Inc, other mentions to stuff that may/could/might/will/is/are registered marks of their respective holders or pure coincidence.


Friday, June 3, 2011

chipKIT PIC32MX based boards by Microchip and Digilent

Well, after some anxious waiting the new chipKIT™ development boards finally arrived this week. I'm obviously talking about the chipKIT™ Uno32™ and the chipKIT™ Max232™ boards produced by Digilent and co-developed with Microchip.
First of all notice that chipKIT™ is a registered Trademark by Microchip Technology, Inc. (they seem to be very cautious to include the ™ everywhere.)

These boards feature Microchip's PIC32MX 32-bit microcontroller family and claim to be somehow "the first 32-bit microcontroller-based platforms that are compatible with existing Arduino™ hardware and software" (more about the compatibility thing later).

The boards are produced by Digilent, Inc., and they share the same high quality and detail I've seen on other development boards produced by them. No need to say that the new chipKIT™ platform has behind it the marketing machinery of Microchip, and that the development of this new platform seems to have been originated within the Academic Exchange group to meet the demand for a 32-bit solution requested by the hobbyist, academia and embedded engineering communities.

(Hey look !! Microchip even produced and uploaded a video on YouTube.)
Update: For some reason the original video has been removed from YouTube.

As you may probably know "Arduino™ is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software", and until now all Arduino™ hardware has been based on Atmel 8-bit microcontrollers.

Hmmm "open-source", that's sort of new territory for Microchip, and obviously generated some buzz when the first rumors about these boards hit the development community, where Microchip licensing terms for most of the "License Free" stuff they make available for download and use are very well known for not allowing you to share or redistribute any changes or contributions to their stuff, kind of totally opposed to the spirit of the Arduino community.

Ian Lesnet from Dangerous Prototypes had a great initiative to collect questions from the community to be asked during a phone interview with the people involved in the chipKIT™ platform development. Ian was very kind to make the recording of the interview available on-line, you can find the recording and an interesting exchange of comments on this thread of Dangerous Prototype's forum.

OK, how compatible are the new boards with the existing Arduino™ stuff ?.

First of all notice that we are talking about a completely different Microcontroller, that means you need a different compiler and integrate it with the development environment. What Microchip did ? (something they not let you do with their stuff) took the open-source Arduino™ IDE and modified it to include support for the PIC32MX and redistributed it renamed as MPIDE (for Multi Platform IDE) with what seems to be an open-source license.

The key question is if the existing Arduino™ libraries will fully work on the new platform and if Microchip adds new libraries to support the new features introduced by using the PIC32MX will also be open-source and freely modifiable and distributable.

There are some folks already testing how well the existing libraries work and doing some performance testing as related on this article at Hack a Day, and some pin compatibility analysis by the Rugged Circuits folks.

About the hardware, the fine letter says "footprint compatible", and the intention here is to have the same form factor and approximate pinout so you may be able to use many of the already existing Arduino™ shields, but keep in mind the the chipKIT™ boards are 3.3V and there may be some shields that require 5V, remember always to check the schematics and documentation of each particular shield to avoid the unpleasant blue smoke.

Now taking a quick look at the new boards, this is a quick and preliminary first look at them, I'll post more articles as I power them and start doing some developments and tests.

The chipKIT™ Uno32™

Inspired and "footprint compatible" with the Arduino™ UNO. It features a 64-pin PIC32MX320F128H 32-bit Microchip microcontroller with 128KB of internal FLASH program memory and 16KB RAM, instead of a Type-B as the original Arduino™ UNO it has a mini-USB connector for the serial interface to the FTDI USB-Serial converter.

One thing that bugs me being one of the nice features of the PIC32MX family that you can have a nice chunk of program memory, why for one more dollar they didn't populate the Uno32™ with a PIC32MXF340F512H that has 512KB of FLASH and 32KB of RAM? It will probably be the first mod on my board.

The chipKIT™ Max32™

Inspired and "footprint compatible" with the Arduino™ Mega2560. It features a 100-pin PIC32MX795F512L 32-bit Microchip microcontroller with 512KB of internal FLASH program memory and 128KB RAM.

One nice feature of this member of the PIC32MX family is that it includes an 10/100 Ethernet MAC module, it requires and external PHY chip for a 10/100BaseTX but Digilent said to expect an shield that will take advantage of the Ethernet and USB interfaces by July.

Both boards include direct access to the PIC32MX ICSP interface in case you need to program the PIC32MX directly. The boards are preprogrammed with a bootloader and the classic flashing LED demo. In case you wonder why the ICSP header pins are not in line read this tutorial article from SparkFun.

One nice change on the layout of the new boards is the position of the RESET button, as you can see on the pictures if you have a shield installed on top of the Arduino™ boards unless you have a hole on the shield it is almost impossible to hit the RESET button, the new chipKIT™ boards have it in one of the corners where even with a shield on top it makes the button accessible from the side.

I'll start playing with the boards and post additional articles. As Microchip, I took care to include the stinking TM mark on all references which they make explicitly clear that are trademarks of Microchip and just saying that other trademarks are from their respective holders blah blah blah without mentioning that Arduino™ is a registered trademark of the Arduino team.

Hope this incursion of Microchip in this arena brings a change of attitude and helps they learn from this experience and embrace some of the practices of the open-source community.

BTW, even when it is a registered trademark the boards and associated software are not "official" Microchip products so don't expect direct support from Microchip, if you need help visit the chipKIT Forum (how original !! they also registered the domain, well it goes in companion with the originality of the packaging too).

Some links to keep handy:
You can currently purchase the boars via Digilent or Microchip Direct, I'm sure there will be other distributors in the near future.

Looking forward to see the first batch of clones :-), hey it is open-source after all !!


Saturday, April 16, 2011

Short Circuit a Virtual Paper about Electronics 'n Stuff

I've been trying to find a easy way to aggregate the vast amount of information and news that every day gets dumped on my Twitter timeline. Thanks to the folks of SmallRivers and their service I put together a list of news sources about the electronics industry and related stuff.

Feel free to subscribe and follow, and if you are interested to be included in the list just send me a tweet at @jamodio.

Read Short Circuit here