Open-source VSCP IoT/M2M automation framework supports Arduino, Raspberry Pi

VSCP (Very Simple Control Protocol) is an open-source IoT framework that works on development boards like Arduino or Raspberry Pi, and lets you control IoT home automation tasks. The framework is highly scalable, has a very low footprint, and as such is specially designed for resource-limited devices.

VSCP is an open-source standard protocol for m2m, IoT and other remote control and measurement applications. It enables simple, low-cost devices to be networked together with high-end computers and/or to work as an autonomous system, whatever the communication media is.

The VSCP Protocol has two levels: Level 1 and Level 2. The protocol was primarily used in CAN networks (that is Level 1 for tiny microcontrollers) because CAN is cheap and reliable with high efficiency. However, VSCP can be used for faster transport layers such as TCP/IP, so here comes Level 2 which achieves better performance.

We have already seen Souliss, an open-source IoT framework for home automation. If you wonder why another protocol was developed, then the maker says,

VCSP is designed to be used where other solutions are too expensive to implement. This can typically be in code overhead, where most other protocols use more resources (flash/ram) on a micro-controller than the actual “application” adding a lot of cost to the project. VSCP can work with typically low-cost dumb nodes like the Microchip MCP250xx series, to a 1K-2K flash microcontroller module up to a full implementation with all features in about 5K flash.

VSCP Software Components

  • The VSCP daemon is like a hub. It can connect to other VSCP servers and hardware nodes forming larger systems. This can be used on PC’s running Windows or Linux and development boards like Raspberry Pi, Beaglebone Black, Carambola, etc.
  • The VSCP firmware is the code that you can find in the hardware nodes, usually MCU-based like Arduino boards communicating with the daemon over CAN, RS-232, Ethernet, TCP/IP, MQTT, 6LowPan, etc…
  • The VSCP helper library is a collection of library tools for VSCP program developers. This includes the helper functionality that is needed by a programmer to interface Level I drivers (previously called CANAL drivers) and functionality to interface a local or remote VSCP daemon (Level II) over TCP/IP and a lot of other things.
  • The VSCP Works is a diagnostic toolbox for VSCP developers that can be used to discover nodes, configure nodes, update firmware of nodes, etc…
VSCP Works Screenshot

Hardware Modules

If you are interested in developing a VSCP hardware module, all the firmware code and samples are available in the GitHub repository. However, the main reference code for hardware developers is provided by the Kelvin and Paris hardware modules.

Kelvin NTC10KA module

Kelvin NTC10KA module is used to measure temperature and this measurement is then reported to other CAN4VSCP modules or servers. The module fully adopts the CAN4VSCP specification.

Paris Relay Module

Paris is a relay module that connects a CAN4VSCP bus and can be used to control up to seven external relays. Even this module has fully adopted the CAN4VSCP specification and these VSCP4CAN modules have a communication speed of 125 kbps.

How does VSCP protocol work?

The protocol is an event-based system. To understand this, let us think of a typical application of a water tank with a level sensor and a water pump. Basically, all the intelligence/ decision making is given to the nodes. Talking more about the example, with VSCP, the level sensor is made to send information after a predefined time interval. This means the water pump starts filling the tank at a lower level and stops at a certain higher level.

Now, if you are wondering what if the sensors are damaged due to some reason and stop working. Don’t worry, it can be designed in such a way that the pump goes into a safe state == pump off, indicating there is some problem in the self-contained system.

But the transport mechanism is unknown to the application that brings uncertainty about the event’s arrival. For this, it is very important to get a confirmation back whenever the event arrives. So, the node that originates an event should know as little as possible about how the event it sends out will be used, making the system very flexible.

How to get started with VSCP?

You can download the source code for VSCP & friends from the official website of Very Simple Control Protocol, while the firmware code is available on GitHub. To get started using the framework, there are examples on an NXP FRDM-K64F or a PC simulation node.

For the Arduino library of VSCP software framework for Level 1 devices, you can connect an LED that shows the node state. An example showing the basic integration of the VSCP Arduino library uses CAN-BUS Shield from Seeed-Studio or CAN-BUS Shield from Sparkfun.

Support CNX Software - Donate via PayPal or cryptocurrencies, become a Patron on Patreon, or buy review samples
Notify of
newest most voted