Pages

Monday, November 26, 2012

The VisualMicro Debugger plug-in upgrade

The VisualMicro Debugger Upgrade option to their Arduino plug-in is excellent! I've only begun to use it but it was easy to setup and get running after viewing the YouTube tutorial and reading some of their documentation. What will really help is the ability to record analog and digital responses without adding code to record it. For example, if you have a temperature module plugged into one of the analog ports, you can watch that port and see what values are being returned.

I highly recommend this plugin with the debugger upgrade.

I hope to include my own examples as my project develops.To get the upgrade you have to ask for a beta license. This free license will be available through January 2013. See their forum for more information.

Sunday, November 25, 2012

Arduino Software Development using VS2010

For software development I've decided to use VisualMicro, Arduino for visual studio. As a plugin, it integrates well with the Microsoft Visual Studio environment. This choice was based on the fact that I am familiar with the Microsoft Visual Studio tools, and they have a debugger available. I also downloaded and used the "standard" Arduino IDE, but I found it lacks a rich and robust UI.

The plug-in installation was not exactly straight forward and creating a project took some trial and error. When creating a project, and subsequent solution, the c++ style arduino sketch files were not recognized and would not compile. The instructions have you make the following c++ associations:

This indicates that these files will be associated with c++ projects. The problem I found (in my installation?) is that by creating a raw Arduino project (and subsequent solution) creates what appears to be c++ project, but most of the time (always?) main can't find the setup() and loop() functions that are defined in the .ino file even though it is associated correctly.

My workaround is to create a C++ project/solution first. Then I simply delete the c++ project and add a new Arduino (c++) project to the solution.


This works every time, although it is a little cumbersome. There is a possibility I have some setting(s) wrong, but if you read through the "test installation" directions there are some even more convoluted ways to setup an Arduino project.

January 2013 Update: I discovered that I can't (shouldn't?) use and dashes (and perhaps underscores) in the project name. Although I don't get a file naming error, the compile may indicate that main can't find setup() and loop().


Saturday, November 24, 2012

TinyDuino - Another tiny arduino kickstarter

Another Tiny Arduino project on Kickstarter just came to my attention. TinyDuino appears to be fully funded and has now entered stretch goals. It doesn't have as many shields, but is a tiny stackable micro-controller.

An entire stack of low power shields could be powered by a simple 3.3v button battery. This is a very clever idea with an extremely small profile. They are planning round form factors and lily pads as well.

I understand the processor is an Atmel ATmega328P, and an FTDI shield would snap onto that for programming. I like the fact that the FTDI USB interface chip could be removed after the micro is programmed. There are similar systems, but none that I know of just use a snap on connector.

The processor board and shields will be made in Ohio, with the board reported to be about $22 USD.

Monday, November 12, 2012

Standing Close to the Event Horizon

At this point in my micro controller adventure, I feel that I'm standing next to the event horizon of micro controller project development. By that I mean it would be easy to slip into low level ARM chip and coding; wire wrapping boards with tiny micro-controllers, or even worse. Right now the higher level boards have a USB connector that can power the board and download the program. However, this package can be reduced to just a board, but the underlying code and hardware will not have to be ported. For example, here is a compatible mini to the board I just ordered.


The dimensions of the Pro Mini PCB are approximately 0.7" x 1.3"

But is the future, there will emerge a new modular "Arduino" called smARtDUINO which at this time is in KickStarter here.

. .
It is a board level component system. In the above demonstration a quad core Arduino is built.



Arduino Prototyping, a beginner's thoughts

After eliminating the Netduino, I've chosen the Arduino platform for my prototyping. Here is the form factor for the Arduino Uno board. As you can see, for the most part the connectors expose the micro controller's i/o pins.
 
Arduino prototyping can be accomplished at the component level, and/or at a subsystem level. By component I mean a simple potentiometer or LED, and by subsystem I mean an entire assembly that does wireless networking for example. These higher level sub-assemblies are most often referred to as Arduino shields. These plug directly into and on top of the Arduino board, and then expose the pins for another shield or component. For example, here is the WiFi Shield:
Note that some shields are not complex subsystems but rather bus or pin extensions. I'm not going to discuss higher level shields at this point because I don't think I need them right now.

Prototyping can be accomplished by either a bread board of jumpered components, or with some inexpensive plugin modules similar in concept to Gadgeteer or GoBus, or probably a combination of both.

I originally started down the path of breadboards and components but discovered a module based component system from SeeedStudio called Grove that will help me prototype. The plugin components are called twigs, and they plug into a SeeedStudio Grove base board shown here:
This board plugs directly into the Arduino form factor and does little more than expose the analog (left side ports) and the digital i/o (center ports). Then by using a 4 wire connector, an inexpensive (compared to Gadgeteer or GoBus) component can be plugged into the board such as this Grove touch sensor and LED connected to some digital ports:

What could be simpler? As an added bonus, the built in micro controller I2C bus and SPI bus are exposed as a connector, but more on that later.

So my first order was a SeeedStudio version of the Arduino Duemilanove called Seeeduino V3.0 (Atmega 328P). As of this date it is in transit.
In addition to being one of the most inexpensive boards in its class, I also chose it because it is designed to run in either a 5 volt or 3.3 volt mode via a voltage select switch. The Atmega 328P chip is rated from 1.8v to 5.5 volts. This may be particularly useful if I can run my project on 4 AA rechargeable batteries for a reliable total of about 4.6 volts. Running at 5v requires a minimum of 7 volts in, which means 6 AA's at 1.2 volts for a solid 7.2 volts. In one forum I was told that most batteries only output about 1.2 to 1.3 volts throughout their life.

Netduino Wrap-up

In the previous three posts I outlined the three .Net Micro Framework platforms that can run code generated on a subset of the C# programming language; the GHI FEZ (Fast and EaZy) with Gadgeteer modules, Secret Labs LLC Netduino Go with GoBus modules and Netduino with Arduino shields. Each one of these platforms have their pros and cons and which one chosen would depend on the situation. Gadgeteer is very user friendly when you consider that it has a visual hardware connection screen in the IDE which automatically will help you select ports on the main board. GoBus has a lot of expansion capabilities and ability to run Gadgeteer S U and X modules. Lastly the Netduino board in an Arduino form factor opens up a lot shields and other components that have been around for a long time but it would be a bit harder to program than say a Gadgeteer, so each option has its advantages and disadvantages.

Of course the caveat here is that I do not actually own any of these boards, nor have I ever used them. My comments are only based on what I've read. These ramblings should at least give the casual hobbyist an idea for further reading. Also note there are differences in hardware and CPU capabilities that you might want to explore as well.

Sunday, November 11, 2012

Thoughts on Netduino

Right now I would put Netduino at the top of my big project development platform list for two reasons: 1) the board supports .Net and I have experience with C#; 2) at this time the Arduino form factor (blue connectors in the image below) allows the greatest opportunities for low cost expansion and prototyping. Today these boards are selling for about $35. Unfortunately they are not good for production development of inexpensive products because the .Net micro framework needs a lot of CPU power and memory to run. Here is a migration discussion from 2011. However, high end production products could benefit from this technology. Once again, C# garbage collection is non-deterministic so time critical operations may be tricky at best.
For me personally it would be ideal for home type DIY projects where the final cost, size and power consumption is of little issue; but surprisingly, only a handful of Netduino projects appear on Instructables today. Of particular interest to me is the support for Event/Delegates through C#. I've build many software controllers over the years and I've only used the event driven programming pattern.

Unfortunately I cannot find a Netduino mini or micro single chip breakout, which means this development platform is not yet easily suited for the ultra small, low cost and low power (3v3) controllers without a software/hardware port.

I read one blogger's post that he successfully used the Netduino board with SeedStudio Grove modules. So in addition to roll-your-own shields and components, the Arduino form factor allows a wide variety of component access from a variety of suppliers. 

Thoughts on Netduino Go

In competition with GHI's FEZ Gadgeteer based platform is the Netduino Go. I don't know what the timelines are but I believe this was produced as a more versatile competitor to Gadgeteer by Secret Labs LLC. The boards are similar in that they use module port connectors, but in the case of GoBus, all of the ports can be interfaced to any module, so it makes the ports more universal rather then semi-dedicated as in the Gadgeteer.

Module costs are about the same as Gadgeteer, meaning a bit pricy when compared to bear bones components, and the Netduino Go controller is about $50 on Amazon as of this writing. Gadgeteer has far more modules right now. On the plus side is my understanding that there is a cross over path (posted April 2012): "So we created a compatibility mode for Netduino Go which lets you use most S-U-X Gadgeteer modules with Netduino Go." (interesting arrangement of module letters). This could be a big plus in the future.

This platform appears to have all of the advantages of the Gadgeteer platform and perhaps a few more because it uses a standard GoBus architecture. This means there are no specific sets of ports that need to be used. On the down side to that is the need to decode the bus commands so each module would require additional circuitry.
Here is the potentiometer module for $8 (as of this writing) on Amazon that shows the added chip on the right side of the module.

I haven't directly compared the prices of modules between Netduino Go and Gadgeteer, but I would expect them to be in about the same price range, making this a more expensive hobbyist prototype platform than say an Arduino Uno. Although the Netduino Go also supports the .NET Micro Framework and C#, I believe it would be difficult to port the code to a smaller commercial platform.

If you are considering a prototype platform with a lot of expansion capabilities this might be as good a solution as Gadgeteer. Because of the bus, it may have better long term interfacing opportunities. Again, if the idea is to shrink your prototype down without a complete rewire/re-hardware, which is my case, this might not be a good option. If on the other hand you want to build a one off, or expensive production models, this would be a good platform.

Thoughts on Microsoft .Net Gageteer

I'm planning some projects using micro-controllers so I began an investigation of the various prototyping platforms that are available. First up was Microsoft Gageteer because I already have a strong background in C# and I own the complete VS2010 Pro suite. Visual Studio Professional is not required for using Gadgeteer, Visual Studio Express works just as well. Gadgeteer module integration and controller programming appear to be very simple and straight forward to use. The underlying foundation uses the .NET Micro Framework and a subset of the rich C# language features.

The boards, mostly sold by MS partner GHI and various Gadgeteer modules form a very worthwhile development platform. The controller boards need to be more powerful than most Atmel based Arduino boards because of the special language requirements for .Net like garbage collection and event handling. These boards might not be suitable for critical real time operations as the garbage collection system may not be deterministic. The only issue for the hobbyist might be the cost of each module, cable and the controller board.
Here is one of the cheapest Gadgeteer controllers, the FEZ Cerberus main board which at the time of this post is abut $30. It runs on a 168Mhz 32bit Cortex M4 processor. As you can see, the board has various connectors such as Y,X,P etc. These correspond to various module types. A module that is designated "P" for instance can be plugged into any port with a "P" designation (which you can see are many).

Although the platform is great for prototyping, feasibility studies or one off projects, I could see no way to easily migrate this to a smaller commercially viable product. It would be difficult to port the code to a small ARM based chip for one thing (IMHO), and it is not exactly straight forward how to breadboard this main board. I don't think this platform lends itself to miniaturization either, so if you are interested in building a small portable project, this may not be the answer.