Displaying AC Mains Voltage Waveform


Hey, I’m new to this and still need to learn a lot, I’m using an ADC channel on my MCU to sample the AC mains voltage and have calculated true RMS voltage from it, at the same time I want to plot this waveform on my dashboard. At the moment I have observed that it takes some time for exosite to update, but the signal I’m trying to plot is of 50 Hz, i.e. 20 ms for a cycle, would it be possible for me to somehow plot it on exosite ?

I’m really a beginner and still trying to understand the example exosite project that came with my board, so please bear with me.

P.S. I’m using TI’s Tiva TM4C1294 launch pad.



Hi @Khan,

Thanks for posting! What you want to do is possible, but will take a bit of setup. Exosite supports 1 second entry resolution in dataports(AKA a data source). This means that a single datapoint (TS: Value) entry can be written once a second. Given multiple write calls within one second, the first write will enter the system with all others being discarded. There are a number of methods in which to load that datapoint with a number 20ms samples, but the best method may be to encode your data as a JSON string, and write it to the target dataport. This means that your launchpad can gather that signal data you care about and batch upload it in a string to the platform.

You could then create a custom widget and teach it to decode and plot your data. Starting with widget example may not be a bad idea: https://github.com/exosite-garage/custom_widget_scripts/tree/master/line_graphs/line_graph_self_refresh

This widget makes use of the ‘read’ procedure in the Widget API. This allows the widget to poll, and become aware of new values as soon as new writes occur to the dataport it is watching.

If I remember correctly expecting an integer value, which means most your effort will be focused around creating the parsing and plotting behavior you are looking for.

Additionally, don’t forget to make a custom dashboard; The pre-loaded dashboard that comes with the device cannot be edited. You can create your own dashboard for your own use and development from: https://ti.exosite.com/manage/dashboards and clicking on ‘Add Dashboard’.

Let us know how this works out for you.