Monday, September 3, 2018

Microchip Workshops at Capital Factory Austin


Last month I had the opportunity to participate at two workshops organized by Microchip Technology in Austin.

First one was an introduction on the state of the art of Microchip’s development tools for Effortless Design. It not only covered the original Microchip MPLAB X IDE and associated tools but also the latest advancements on Atmel’s (now owned by Microchip) Studio 7.0.

Both tools are now based on advanced integrated development environments which make them more efficient, modular and extensible. Microchip’s MPLAB X IDE is based on NetBeans and Atmel Studio on Visual Studio.

Given that the customer base on both the Microchip and Atmel sides is highly invested on these tools in terms of code, there are no plans on the near term to merge them 100% but there are some gradual features for example added to MPLAB X to support Atmel AVR, even programming those parts.

This first workshop was not hands-on but we learned step by step how to put together a basic project using MPLAB X IDE and the MPLAB Code Configurator (MCC) and its equivalent on Atmel Studio called START.

I will be posting some projects on the Blog showing how to use these tools and how easy and quick you can get the code structure done with the most basic functions.
While these tools are not suited for a more complex development project, they provide the basic framework and needed code to get peripheral functions and various features running. You are free to cut and paste the source code but you must respect the license and use it only with Microchip products.

The second event was a combination of hands-on workshops and presentations, it was full day so plenty of time to learn a couple of tricks and get to meet and network with people in the industry.

Again, we put together some projects using MPLAB X IDE and MCC, and I learned how to put together the whole architecture to use Mozilla’s Open Source IoT gateway, including how to create “things” using Microchip’s Atmel SAMW25 Eval Board.

I’ll soon post a project how to setup the IoT Gateway and get few “things” on it.

In the afternoon we had great presentations from various companies, they were really focused to help get you “launched” if you have an idea for a product or design and want to explore opportunities to get your idea to market.

We also learned about Microchip’s efforts to support the Maker community, one of the major fears when Microchip acquired Atmel was what is going to happen with Arduino given that from day one it has been based on Atmel MCUs.

Well, Arduino is here to stay for long time, Bob Martin Microchip’s Wizard of Make mentioned that he will be meeting with the Arduino folks in Italy to keep the platform evolving.

BTW now you can do development and debugging with better IDE tools than the native Arduino IDE which to be honest I don’t like at all 😊

Another interesting presentation was from DigiKey which keeps expanding and have also now a dedicated team to support the Maker community, where many of the well-known vendors like Adafruit, SparkFun, etc, now have their products also distributed by DigiKey.



Jonathan Hallsten from Hallsten Innovations was great to share their approach how to go from a napking design, dev boards and hot glue to a real product and a finished solution for the end customer.



And Dan Skiba from Got Interface was absolutely amazing and got us energized with his presentation about the critical steps on the journey to get an Idea to Revenue, it was really a BS free talk 😊



Time well spent, met a lot of new great people and learned many new things.

Thank You Nadine, Yuchung and the rest of the Microchip Team for putting this together and for the invite. If you are around town again I’ll do my best to be there!

Cheers
Jorge

Thursday, August 30, 2018

MikroElektronika mikroBUS™ and Click Boards™


If you have been involved for a while in embedded electronics designs, you probably faced the same challenges about how to validate a design using a particular part or parts. Is the wiring correct? Is this piece of code/firmware driver correct?

It will turn as a costly mistake to commit a design to a prototype production run to later find that you missed or made a wrong connection or that the software does not work at all for that part.

Then as part as the development process you should perform some validation. In some cases simulation helps but it may turn to be very complex and time consuming, and after all is just that a simulation, not the real thing.

For ages we have been “air wiring,” using adapters, or other means to extend the features of a particular development or evaluation board, it became very common on FPGA based designs and later with the advent of many low cost boards such as Arduino, Raspberry Pi, BeagleBone, Tinsy, and many more, it became more easy, but still we had to figure how to add some extra support components required for each part, power, etc.

One of the vendors that started putting together an easy way to deal with this on FPGA designs was Digilent, also when using their development boards for education, the came out with the PMOD™ or Peripheral Module that was basically a set of plug-in boards following a proprietary standard specification.
Image Courtesy of Digilent, Inc.

Each of the different PMODs have a specific function and included all the necessary components to implement that function as an extension of an existing development board. There are some guidelines on the “standard” about size but the most important part is the pinouts for three different type of boards using 1x4, 1x6, 2x6 standard .1” headers.

You can check the details of the PMOD™ standard here.

Other vendors came with similar solution, Microchip Technology at first created the PICTail and later the PICTail+ boards, Seeedstudio with their Grove, and among them MikroElektronika with their mikroBUS™ and Click Boards™.

The mikroBUS™ was introduced by MikroElektronika as a way to create standard add-on boards to their own development boards, initial add-on boards were very simple like a set of slide switches, a pot, couple of LEDs, they made the standard public and later in 2015 refined and republished as v2.0 covering all aspects for implementing the mikroBUS™ “socket” & interface on development boards, and creating the add-on boards that for their products baptized as the “Click Board.”

Image Courtesy of MikroElektronika.

Both mikroBUS™ and Click Board™ are Trademarks of MikroElektronika. 

Pi3 Click Shield by MikroElektronika

Now take in account the add-on mikroBUS™ compatible or Click Boards™ are not intended to be something like and Arduino Shield, Raspberry Hat, BeagleBone cape, etc., these are very simple boards with a very specific function.

But don’t worry, do you want to use Click Boards™ with a Raspberry Pi without having to use wires and a prototype board? There are already several Pi Hats with mikroBUS™ sockets, including one from MikroElektronika.

So then, what is covered by the “standard”?


First, the mikroBUS™ pinout, where the hardware interface is via a pair of 1 row 8 position common .1” pitch female headers. Signals on the headers are assigned always to the same pin and are defined in three groups of communication interfaces (SPI, UART and I2C,) six extra I/O pins some of them with the option to have a specific function, (PWM, Interrupt capable, Analog Input, Reset and Chip Select) and two power groups for +5V, +3.3V and GND.


While it may feel that the number of pins and functions are limited, most of the common devices you will find on add-on boards are covered by them. There are over to 500Click Boards™ and every day “compatible” boards are starting to pop-up in the market.
Several other vendors started to adopt the standard, such as Microchip Technologies, you will find that many of the new evaluation and development boards, even the simpler ones, include now one or more mikroBUS™ sockets.

Second, if you want to produce your add-on board, be aware that the Click board™ is a trademark of mikroElektronika so you are not allowed to call your board “Click” but to claim compatibility there are some guidelines you must follow regarding board size, silk-screen markings, etc. Many of these guidelines are not strictly mandatory but highly recommended to preserve the overall design, and obviously you must give credit to MikroElektronika and must place the mikroBUS™ logo on the board silkscreen.



The full mikroBUS™ specification is available here.

Third, placement recommendations of the mikroBUS™ socket on the main development board. While the standard does not dictate how pcb layout of the main board has to be done, there are some recommendations that will help your board use the vast collection of Click Boards™ and mikroBUS™ compatible boards available in the market today.
  
You can order Click Boards™ directly from MikroElektronika or from various electronics distributors like Arrow Electronics.

An added benefit using MikroElektronika Click Boards™ is that MikroElektronika also provides sample code and companies like Microchip Technology included support code on their development tools like MPLAB Code Configuration (MCC) or Atmel Studio Start.

I’ll be publishing soon some projects showing how to build basic demo programs for Click Boards™ using Microchip’s MCC.

Meanwhile, Happy Hacking !

Cheers
Jorge

Monday, July 30, 2018

What's on the Bench? Microchip Explorer 8 Development Board


Over the past several years I’ve been stuck designing new embedded applications using a single MCU vendor, previously I did a lot of work with Microchip and other products and I was very active at the Microchip forum.

Now that my situation changed have the opportunity to go back and catch up and start developing again with Microchip products, then to get up to speed I’ve got one of the new Explorer 8 Development Board.

The Explorer 8 has more or less the same form factor as previous boards like the PICDEM 2 Plus Demo board, including a monochrome 2x16 character LCD and as before various sizes of IC sockets to accommodate 4, 8, 14, 20, 28 and 40 PDIP parts but now with the addition of the Microchip 80-Pin PIM headers.

At first it may look confusing but this new board has many more connectivity options, now including two 2x8 Digilent PMOD connectors, and a pair of MikroElektronika mikroBUS headers, plus a pcb edge connector for an expansion boards, two female headers for Microchip PICtail boards, and various headers here and there to access some key signals like I2C, GPIOs, power supplies, etc.


Image Courtesy of Microchip - Explorer 8 QSG
In addition, the board has a microUSB connector tied to a MCP2221 acting as a USB to UART/I2C bridge. The microUSB connector can also be used as a source for 5V power.
My board arrived with an 8-bit PIC16F1719-I/P MCU installed on the 40-pin IC socket and pre-programmed with the Microchip demo.

Pay attention when you power up the board for the first time, out of the box at least for the one I received the J2 jumper was in the position to get power from the microUSB connector. Since I was using the barrel jack with power coming form a 9V power supply I had to move that connector to the right position.

You will find various jumpers to configure some features depending on the application/MCU, clocks, power, etc, which makes the board together with the connectivity options more versatile than previous development boards.

The usage of the jumpers is well described on the User’s Guide. Always double check that you have the jumpers in the correct position for your application.

The Demo code is the classic Microchip voltmeter using the ADC to read the voltage from a pot, flashing some LEDs, but now instead of having the RS-232 interface, using the MCP2221 USB-UART bridge and a terminal emulator like TeraTerm you can get a message via the serial interface.


Another interesting addition to the board is that now not only you have the classic RJ11 jack ICSP connector for programming/debugging with ICD3 or other tools, the board has a right angle 6-pin ICSP header that can be used with for example a PICKit 3. This is great many times I’ve been stuck trying to find in my tool chest the magic adapter.

I did play a little bit with the pre-programmed demo, nothing super exciting about it but it is a good enough demo to get started, only issue is that I’m still trying to find the source code for it. 

I visited the product web page but Microchip only lists various example “Labs” pre-cooked for different MCUs, problem is that all these labs seem to have been generated using MCC (MPLAB CodeConfigurator) and currently MCC does not support the full spectrum of MCUs. I was thinking about building one of the Labs using a PIC18F4620 I’ve in my inventory, but MCC does not support that particular part. I guess I could generate the code for a PIC18F46K20 and then tweak it, but what a hassle 😊

I ordered few samples for the new K40 parts, when they arrive I’ll give it another try and post and article on my Project Blog showing how to do it.

While 8-bit MCUs may “feel” outdated they are still quite good and cheap for many applications, so I’ll explore some ideas in the near future and share them here.

Happy Hacking

Cheers
Jorge

Thursday, June 21, 2018

What's on the Bench? The PocketBeagle




The PocketBeagle is the latest member of the BeagleBoardfamily. Like the other members of the family it follows the Open Source Computing approach, driven by the BeagleBoard.org Foundation with the primary goal to “provide education in and collaboration around the design and use of open-source software and hardware in embedded computing.

The PocketBeagle packs on a small board about the size of small tin can of Altoids mints (55mm x 35mm) a lot of processing power and a rich set of features and interfaces, and it only costs $25 !!





Here is a quick list of the PocketBeagle technical specs and features
  • ·      1GHz TI Sitara ARM Cortex-A8 AM3358 processor
  • ·       SGX530 Graphics accelerator
  • ·       512MB DDR3 RAM
  • ·       Dual Core 200MHz 32-bits PRUs (Programmable Real Time microcontrollers)
  • ·       ARM Cortex-M3 for power and security management
  • ·       4KB I2C EEPROM
  • ·       microSD socket
  • ·       44 GPIOs and multiple interfaces, UART, USB, U2C, SPI, CAN, PWM, etc

      To make the PocketBeagle small and low cost, the board is built around a very novel hardware concept called SiP or System in Package developed by Octavo Systems.

Octavo Systems based in Austin, TX was founded couple of years ago by three senior semiconductor technology leaders that have been previously with Texas Instruments. The name comes from the Latin meaning of “one-eight,” which derives from printing 16 double side book pages on a single sheet of paper, then the resulting page size of the book is 1/8 of the original paper sheet.

Octavo instead of taking the SoC (System on Chip) approach all the way to custom silicon, developed their technology on the proven process known as Sytem-in-Package, which integrates multiple chips and other components in a single package. In this case for the PocketBeagle, the result is a small footprint BGA like package that includes most of the components to get a system up and running.



This is a great way to expedite development and time to market since all the details about DDR3 interconnection, Power distribution and management, CPU decoupling, etc, are all taken care of inside the System-in-Package part.



As you will see on the board and its schematics there are not that many parts besides the Octavo OSD3358-512M-BSM SiP, just few LEDs, some resistors to set the configuration of the Octavo SiP, a crystal as the clock source, a push-button, a USB power switch, few passives, the microSD card socket and microUSB connector, that’s it !

The BeagleBone Black Wireless and the BeagleBone Blue have been also built around the Octavo Systems SiP technology.

How hard is it to get it running? Piece of cake !!

Only extra things you need are a microSD card of at least 4GB (Class 10 recommended), a micro USB cable and a host PC with Windows or Linux, or a Mac.

Here is a quick start but you can find also the same information on the PocketBeaglesite.


Getting the PocketBeagle up and running

  1. Download the latest firmware image from Beagleboard.org
  2. To write the image on the microSD card you will need a utility like Etcher
  3. Follow the instructions on Etcher to write the firmware image on the microSD card
  4. After you have your microSD card ready insert it on the PocketBeagle and plug-in the microUSB cable
  5. After applying power via the microUSB connector you will see the power LED going on and after few seconds you will see the USER0, USER1 and USER2 LEDs start flashing as the Linux kernel boot process starts


    USER0 – Linux Kernel heartbeat indicator
    USER1 – microSD card R/W
    USER2 – Activity indicator
    USER3 – Idle
  6. After the PocketBeagle finishes to boot the Linux kernel and switches to multiuser mode you will notice that on your PC the board will present a USB drive with the content shown below

  7. The PocketBeagle will also create a virtual Ethernet interface between itself and your PC via USB, the IPv4 address for the PC side is 192.168.7.1/30 and the PocketBeagle will be 192.168.7.2/30, and a virtual serial console port via USB.

Sunday, June 3, 2018

Microchip devouring another semiconductor company


It was announced a while ago but last week the deal was completed and Microchip Technology, Inc. acquired Microsemi, Corp. for $10.3 billion, making it the largest acquisition to date.
This follows previous acquisitions of other important semiconductor companies such as Atmel, Micrel, SMSC, SST, etc.
But Microsemi is not foreign to acquisitions, actually the company originally Microsemiconductor founded in 1959 out of Culver City, CA, evolved over time product of multiple acquisitions of other companies and product lines. Most recent ones are for example Vectron, Phonon, PMC-Sierra, Symetricom, Zarklink, Actel, etc., and timing and synthesis business from Maxim, high reliability diode arrays from National Semiconductor, etc.
On its early days Microsemi was mostly a provider of semiconductor and systems solutions for defense applications. Nowadays has a very vast portfolio of products that will let Microchip diversify much more their product line, including FPGAs and SoCs, Storage, Ethernet and Network processors, Optical products, PoE, Power Management, Timing, RF transceivers, etc.

I visited their offices in Austin, TX last year when I was doing research and learning how to integrate Amazon Voice services (aka Alexa) into embedded systems. Microsemi has a very interesting front end audio processor which uses a revolutionary technology beyond DSPs to analyze the signals in the frequency domain, where using clever algorithms you can separate noise, music from voice, using multiple microphones implement beam forming, determine distance from the source, embed a “wake” word and obviously convert into digital format.




At the time I started working with an evaluation board of this processor, now they have a very nice development kit where using a Raspberry Pi you can easily learn how to put together a proof of concept for AVS.

You can order this kit from my friends of Arrow Electronics.







Saturday, May 26, 2018

Power over Ethernet - What is it ?

Power over Ethernet or as it is most commonly referred to “PoE” is a standards based implementation of power distribution using the same wiring on a twisted pair Ethernet network.

Essentially it is a method where a power source (the standard defines it as PSE - Power Source Element) is connected to the network wiring to deliver power to the other end to the cable to a device (the standard calls it the PD - Powered Device.)

This method was introduced around the year 2000 by Cisco Systems to deliver power to their new line of VoIP (Voice over IP) phones.

Basically the trick was to use the unused extra pairs on the Ethernet cable to carry DC power from the PSE to the PD. While today the most common implementation is to have the PSE integrated into the Ethernet switch, power can be “injected” in the middle of the wiring, what the standard calls Mid-Span.

To ensure interoperability the IEEE developed a standardized version of PoE as part of the 802.3 Ethernet Standard, the first version was issued on 2003 as 802.3af that defined how to deliver up to 13W of power to the PD using Cat3 or Cat5 cable, with the option of running the DC power on the same pairs as data (Mode A) or using the spare wires on 10/100BaseTX (Mode B.)


Over the years the standard evolved, first to 802.3at or PoE+ for up to ~25W and supporting Gigabit networks, to lately 802.3bt for up to 51-71W of power. The following table from Wikipedia shows a nice table with a comparison of the different PoE parameters for each version of the standard.


To optimize power usage and delivery, the standard classifies the power devices in various classes depending the amount of power they require and there is a sequencing or stages that establish how power is turned on and how much of it. IEEE 802.3 complaint implementations of PoE must follow this sort of electronic negotiation which requires a semi-smart controller on both sides of the network.

The following figure shows the stages of power negotiation and delivery for 802.3af/at
Be aware that there are non-compliant implementations of power delivery over the Ethernet cables that are improperly also called “PoE,” some of these implementations consist on just a power supply injected into the spare wires of the Ethernet cable without any negotiation/sequencing and maximum amount of power is often limited and not protected. These type of power injectors became very popular for installations of Webcams.

Over the next few weeks I’ll be publishing a series of “What is on the bench” articles about different options about how to implement and embed it on your designs for Powered devices, there are various companies that make things very easy with PoE ready modules, and others that provide the key components and reference designs.



Meanwhile here is a cool video from All about electronics with a brief explanation of PoE


Happy Networking

Cheers
Jorge

Thursday, May 24, 2018

Smart Buildings and IoT


This is a very interesting TEDx Berlin presentation I had to watch for my IoT (Internet of Things) Masters course.


Surprisingly 35% of carbon emissions come from buildings, which can be substantially reduced by applying modern technologies and sustainable development.

Building automation was a subject that grabbed my attention more than 30 years ago while working at IBM with the Series/1 computer. This system was designed for real time applications, one of them building control and automation. At that time Internet was still in its early days and modern computer networks where just in their infancy. Many systems and technologies were proprietary and there was minimal interoperability, and IoT was not even on the radar screen.

Nowadays with the ubiquity of the Internet, advances in technology, particularly on IoT and Big Data, it became feasible and commercially viable and redituable to develop sustainable or smart buildings, and the same concept can be used for developing smart cities.

As shown in the TEDx presentation by Coen van Oostrom, "The Edge" building is a clear demonstration on how the convergence of modern technologies with a sustainable development approach can enable the construction of more efficient and practical commercial building.


"The Edge" is not only consider sustainable and smart just because of the technology, but also as the way it is utilized by Deloitte (the principal tenant) to create a working space where no one has a desk, a new approach that goes beyond coworking spaces, in this case it is called hotdesking.

Your desk or space on the building is allocated based on your plans and preferences for the day. You drive an electric car, no problem the parking on the building includes plenty of charging places and your vehicle is recognized by its license plate and you are directed to your parking spot for the day.


Sunday, May 20, 2018

What is what you do ?

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

It is not rocket science, but I don't have an easy answer in few words given that they won't convey the deep complexity, knowledge and dedication for what I've been doing for a very long time.

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 and Internet of Things connectivity.

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 sold through my website, it is a circuit 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. Also for more complex designs and particular components the process includes testing and validating the components using "Eval Boards or Kits" or just samples.

Then using a specific CAD program (Computer Aided Design), in the past I used Eagle Cad (now owned by Autodesk) but several years ago I converted into Altium. There are many other CAD programs available including the very popular one called KiCad.
These CAD tools when used on the Electronics Design process are often called EDA for Electronic Design Automation, essentially the assist you to  capture a representation of a component (called a symbol) and its package layout or footprint for later use in the design of a circuit board. Once you have the symbols you can put together the schematics (shown as 1 in the picture), that show all the components, its values and how they need to get interconnected.

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 EDA program, this consists in placing the components and drawing the traces in one, two or more layers of conductive material that will interconnect them. When multiple layers are used on a circuit board we create a sandwich of conductive and non-conductive materials, what we call the "PCB Layer Stack" or just "Stackup."

The EDA 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 partial peek to my collection of development boards, evaluation kits and my own products and prototypes.