What is IoT Builder?
IoT (Internet of Things) Builder is a world's first product, providing an end to end workflow for the design of IoT appliances on Arduino or Raspberry Pi hardware. It can be added to either the Visual Designer for Arduino or the Visual Designer for Raspberry Pi product to allow the development of remote user interfaces to embedded design products.
The workflow is flexible and intuitive. Start by designing the product hardware on the schematic by adding electronic shields, sensors and breakout boards via the peripheral gallery. Then use the controls gallery to create the front panel, adding and placing dials, buttons, charts, etc. in the IoT Builder editor. Finally, use Visual Designer flowchart methods or C code (Arduino) / Python code (Raspberry Pi) to bind the user interface to the electronics.
Once everything is working as expected, the firmware and front panel can be deployed to the real hardware at the press of a button. The final step is to point the target device at the hardware, watch it acquire the front panel over TCP/IP and then control the remote hardware from your mobile phone, tablet or PC.
- Design your hardware with a library of ready-made shields/hats.
- Design your front panel with buttons, switches, dials, displays and charts.
- Link the UI and the hardware with flowchart methods in your firmware.
- Simulate the entire system and single step debug to find & fix problems.
- Control the simulation or the real hardware from your phone or tablet.
What can I do with it?Technical brochure
IoT Builder is an add-on module to both Visual Designer and Proteus VSM for Arduino and also to the Visual Designer for Raspberry Pi product. You can use IoT Builder to design a user interface (switches, buttons, rotary dials, displays etc) for your mobile phone or tablet and then use Visual Designer to program the hardware to work with the remote GUI using high level methods.
The front panel is drawn in the panel editor and the logic for the user interface is programmed at a high level with either flowchart blocks or Arduino C / Raspberry Pi Python method calls.
IoT builder is therefore well suited both for teaching the principles of IoT based applications to beginners and also as a rapid prototyping tool for more experienced developers.
How does it work?
IoT Builder enables inexperienced developers to produce applications in which an Arduino or Raspberry Pi based appliance can be controlled using a mobile phone, tablet or web enabled device.
The suite comprises a software stack for the hardware, a mobile application, and the 'Virtual Front Panel' editor. This last element allows Virtual Front Panels to be drawn within Proteus, using a library of pre-defined user interface elements such as buttons, switches, knobs and displays along with more complex elements such as message logs and graphing elements. These can then be controlled in exactly the same way as hardware peripherals would be controlled within Visual Designer, namely by dragging and dropping action blocks onto a flowchart.
As always with Proteus, the firmware and front panel communications can be fully simulated and then on deployment, the virtual front panel is served up to the controlling device by a micro web server running on the hardware appliance..
Front Panel Design
The front panel design is the remote user interface to your appliance and what you will see and interact with on your mobile, tablet or internet browser. In IoT builder the front panel design is created by drawing rather than coding. Controls such as buttons, displays and dials are added to the project and then the user arranges them on the panel in a suitable way.
A rich library of controls is pre-supplied and several themes ranging from contemporary to steampunk are available to help create stunning GUI control panels for your project. More advanced users can even use vector graphics tools such as Inkscape to design their own control themes.
The beauty of creating the front panel like this is that each IoT control in Proteus comes with its own driver, making the interaction between the front panel and the firmware program much, much simpler.
The firmware program is where we need to interact with both the hardware peripherals of our appliance and the IoT controls on our remote front panel. This needs to work in both directions. For example, a button press on the front panel may turn on an LED in the appliance, but equally sensor data from the appliance may update a display on the front panel.
Since both the appliance and the front panel are designed in Proteus, IoT Builder is able to make life much easier during programming. The project tree contains a list of the peripherals you have added and also a list of the IoT controls in your front panel. Each of these expands to show you high level function calls that allow you to control them. For example, a display control will have a print() method and a temperature sensor will have a readTemp() method. You can then drag and drop these method calls directly from the project tree into your program.
Since the user program is abstracted from a lot of the low level complexity IoT Builder makes the creation of Internet of Things appliances accessible to even novice programmers.
You can also set different levels of access control for your IoT Application. A login control enables user elevation to admin status and all controls and tabs of the front panel able to adjust their behaviour (disabled, hidden, etc.) based on whether the user is logged in or not. Two events for login and logout can also be dragged onto the main program allowing you to easily respond to successful changes in user status within the firmware program. This provides a really easy way to teach and learn about access control and user privileges in the context of a connected application.
Simulate and Debug
IoT Builder uses Proteus VSM simulation technology so that your firmware program is simulated along with any electronics you have added to the schematic. The remote user interface is also shown inside Proteus so you can quickly and easily test the interaction of your GUI with your virtual hardware.
Alternatively, you can use the free IoT Controller app for iOS and Android to control the running simulation. When the phone or tablet is on the same network as the PC, the app can discover and connect with the simulated hardware automatically so users can directly control the simulation from their mobile device.
Regardless of which way you work, the full debugging power of Proteus is available so you can set breakpoints in your firmware and single step execute the code to quickly find and fix problems.
Once your system has been debugged and tested in simulation you can transfer to the physical hardware at the press of a button (Raspberry Pi requires a one time configuration first). Proteus can detect your Arduino Yun, Uno+ESP8266 or Raspberry Pi hardware if it is on the same network and pre-configure the SSH options for you. Therefore, in most cases you can deploy to the physical hardware wirelessly at the press of a button. Alternatively, in the Arduino case you can connect a USB cable to the Yun which will appear as a programming target in your programmer dialogue.
Regardless of the method of programming, Proteus takes care of transferring the front panel graphics and the web server interface onto the hardware in addition to programming the firmware. After that, you can use our Apple or Android IoT Controller app on your mobile device or your web browser to connect and control the hardware.
- Receive data logged by a MQTT sensor device
- Easy configuration for state changes on MQTT input
- Use mobile devices to output to MQTT system
- Check messages published to the MQTT system
MQTT stands for Message Query Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks. MQTT is supported directly inside the IoT Builder product, making it easy to set up multi-device systems and manage communications between them.There are two main things you can do with MQTT and Proteus.
You can send a command to control an output. Here, your mobile device connects with the control device via Wi-Fi and loads the virtual front panel. It then transmits a command intended for the appliance via the remote user interface. This command is sent to the MQTT server. The appliance device will receive the command when it wakes up and checks in with the MQTT server and the firmware will interpret and execute the command.
You can read and publish data from a sensor.Here, your mobile device connects with the Raspberry Pi via Wi-Fi and loads the virtual front panel. It then transmits a command intended for the sensor appliance via the remote user interface. This command is sent to the MQTT server. The sensor device will receive the command when it checks in with the MQTT server and the firmware on the command will be interpreted and executed.
In both cases the MQTT protocol is used as a bridge between the appliance (arduino) and control unit (raspberry pi). Using a broker in the cloud is not essential but means that the appliance can sleep for long periods of time which saves power. In a classroom test environment having the broker on the PC itself is recommended since you'll see debug on the broker command prompt and the networking will be trivial.