Posts | Comments

Planet Arduino

Archive for the ‘data analysis’ Category

Ago
07

Introduction

When the time comes to capture data from a microcontroller-based project, or control an embedded project via a PC – the thought of writing the appropriate PC software can give some people a headache. Or if you’re an Arduino or other development board user and are frustrated with the Serial Monitor box – where do you go? These problems and many more can be solved by using the Megunolink Pro software that’s the subject of this review.

From the Megunolink website,

MegunoLink Pro is a tool designed to aid embedded electronics designers. MegunoLink provides a set of tools to help visualize serial data, it is made up of a set of visualizers that each have a unique function and any number of them can be utilized at once. With these visualizers and our functional tabbed and docked interface you can create a full control center for your embedded project. Plot, log and monitor serial streams from both hardwired, bluetooth, and network based (UDP) devices.

The user interface allows for a completely customized layout with many different visualisers displaying information at once. Perfect for developing exciting new microcontroller based designs. Data streams go from hard to follow serial messages to easy to interpret tables and interactive plots. The interface panel allows you to set up custom GUI elements that let you take control of your device from the comfort of your PC screen.

Phil from Megunolink gives us a quick demonstration in the following video:

Installation

Getting Megunolink running takes around ten minutes. You’ll need a recent PC running Windows of some variety (XP/ 2003/Vista/Win7/8) and also .NET Framework v4.0. You can download a trial Pro version which operates for seven days – at which point you can use the “lite” version or purchase a Pro license. The Megunolink team have given our readers a discount on the personal version, use the coupon code “TROMLP” for 30% off.

Operation

Using Megunolink is quite simple, even though there’s a whole pile of functions. From the home page there’s a variety of documentation for all of the software features, so you can get started very quickly. You can simply capture all output from the serial line and have it saved to a text file (and with a time/date stamp, which removes the need for a RTC in the hardware) – something which seems quite simple but not done with the Arduino IDE:

rtccapture

Furthermore there is an “upload monitor” in Megunolink – which can automatically disconnect from the COM: port used by an Arduino when you need to upload a new sketch, then reconnect afterward. This saves a lot of to-and-fro between the two programs when adjusting code.

The key to analysing data from the microcontroller is to insert text notes in the serial output, which are then interpreted by Megunolink for display purposes. For example, if you have your MCU code send labels with the data, Megunolink can then sort these out into channels and graph the data, for example:

timeplot_screencapture

An example Arduino sketch is provided to demonstrate this, and it translates to other development platforms. Another great feature is the ability to create a graphical user interface for projects connected to the PCB. You design the GUI which can include buttons, sliders and numeric fields, for example:

controls

… and each of which send values of your choice to the device via USB. Then it’s a simple matter of coding your device to respond to the serial commands.

Real-time mapping

As mentioned in the video above, there’s also mapping support – your hardware sends GPS coordinates and they’re displayed in a real-time window:

mapping

Arduino programming

There’s also an interface to allow programming of an Arduino with .hex files via Megunolink. Currently it can work with the ATmega328, -2560, and with an external programmer -328P and -644 microcontrollers.

Conclusion

Once again Megunolink has proven to be a useful piece of software. It gives you a friendly and powerful connection to all the data from your microcontroller, and also a simple GUI for control via serial. So test it for yourself, it won’t cost you anything for the trial version. And if you like it – don’t forget about the tronixstuff.com discount on the personal version - use the coupon code ”TROMLP” for 30% off. Finally, if you have any questions please contact Megunolink. And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

[Note - Megunolink Pro software license was a promotional consideration]

 

The post Visualise microcontroller data with Megunolink Pro appeared first on tronixstuff.

Giu
27

Improving Arduino to PC Interactions with MegunoLink

arduino, capture, connection, data, data analysis, interaction, logging, megunolink, serial, software review, tutorial Commenti disabilitati su Improving Arduino to PC Interactions with MegunoLink 

Introduction

Through a colleague I was introduced to a new piece of software for the Windows environment which comprises of useful tools that interact with an Arduino-style board (or other MCU with serial data). The software is called MegunoLink, from BlueLeafSoftware in New Zealand. Megunolink has many useful features, and we’ll run through them briefly in this article. They include:

  • Serial port monitoring – that doesn’t reset the MCU
  • The ability to capture serial port data to a text file
  • A tool to graph formatted data sent from the Arduino in real time
  • “George” the serial monkey! (see below)
  • Enable building Arduino projects using ATMEL AVRstudio
  • And Megunolink can also act as a graphical interface for AVRdude to upload compiled code to an Arduino

Installation was simple and straightforward. The installation is only ~1.5 megabytes and not taxing at all. We only have a Windows 7 64-bit machine, so haven’t tested this in emulation under MacOS or Linux. Before moving ahead, note that the software is free. However the developers do ask for a US$10 donation, and if you use the software more than once this is a very fair amount to pay for such a featured piece of software. Now for a look at each of the features.

Serial Data monitoring

As with the Serial Monitor in the Arduino IDE, you can monitor the data from the Arduino, and also send it back through the serial line. Just click the ‘Monitor’ tab and you’re set, for example:

However unlike the Arduino IDE, opening the monitor does not reset the Arduino. But if you do need to perform a reset, a button on the toolbar is provided as shown below:

Capturing Serial Data to a file

Very useful indeed, much quicker than dumping data to a microSD card and then bringing it back to the PC. Just click the ‘Log’ tab, specify a file location and name, then click ‘Enabled’, for example:

You can also append data to an existing text file. When creating the output format in your Arduino sketch, be mindful to have separators such as commas or colons – which make it much easier to delimit the data once imported into a spreadsheet or database application.

Plotting and Graphing Serial Data

Plotting data to a graph is very simple. You simply format the data you’d like to plot using Serial.write commands, and Megunolink takes care of the rest – just click the ‘Plotter’ tab and you’re off.  The data must be formatted as such:

Where ‘a’ is the name of the series. T tells MegunoLink to plot the actual real time, and b is the data as a number in string form. Here is a very simple example:

which resulted with:

Here is another example, it is the “SendSineCurve” sketch from the Arduino Graphing library:

You can always save the graph as an image in the usual formats as well as in .emf vector image file format.

“George” the Serial Monkey

This is a serial protocol simulator tool which is useful for testing the control of serial-based devices. You can setup George so that it listens for a particular pattern in the serial output from an Arduino – and then sends back a response of your choice to the Arduino. For example:

For a more detail explanation and detail tutorial on how to control George, see the MegunoLink website.

Arduino Development with AVR Studio 

Using MegunoLink you can develop Arduino projects with Atmel AVRStudio software. As some people find the Arduino IDE somewhat limiting, this option gives you access to the more programmer-friendly Atmel IDE, for example:

Although there is a small amount of tasks to make this possible, it is straightforward to do so, and an easy to follow tutorial has been provided at the MegunoLink website.

Upload compiled .HEX files to Arduino

For those using avrdude to upload compiled .hex files to an Ardiuno, you can also do this using the GUI MegunoLink interface. This is also used for uploading the compiled files generated in AVRStudio, for example:

As with all the other MegunoLink features – there is a relevant tutorial available on the website.

Conclusion

MegunoLink works well, is easy to use, and the price is right. It has to be the simplest tool available for plotting data from a microcontroller, or capturing it to a file without any extra hardware. So download it and give it a try, it won’t cost you anything and I’m sure you will find a use for it in the near future. And remember – if you’re using MegunoLink, please consider making a donation towards the development of further versions. Thanks to Freetronics for the use of their top-notch Arduino-compatible hardware.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

The post Improving Arduino to PC Interactions with MegunoLink appeared first on tronixstuff.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook