As light as a Feather

Abstract: We are trying to improve the capabilities of the HyperRail to have wireless communication with other sensors, and in order to do that we needed to upgrade the microcontroller. I’ve tested the Feather M0 LoRa with the HyperRail and it works. This post is a summary of the integration of the new microcontroller. 

Design: The code was made modular so that it could be used on any microcontroller that could handle delays in the microsecond range and serial communication. The program also doesn’t make use of any libraries for the HyperRail to work. The Feather M0 LoRa is a great option for the HyperRail’s wireless communication upgrade because not only does it do serial communication and can handle microsecond delays but it can also do radio communication. Here is an image of the new microcontroller: 


Feather M0 LoRaFeather M0 LoRa

Feather M0 LoRa

Here is the wiring diagram of this configuration:


Wiring diagramWiring diagram

Wiring diagram

With some minor changes in the code, I was able to get the system working with the new microcontroller. Although the changes were minimal, it took some time to figure out what to change. One thing that wasn’t working was the serial communication, this is essential for the system to work. What was happening is that the Feather was outputting the serial prints way faster than the serial port would open, so I had to put in some checks for the serial port communication to be established first before any print statements were executed. Another thing I had to change was the pins used for the communication to the stepper motor driver.

Conclusion:

The upgrade to the new microcontroller went very well. I will now try to start sending commands to the microcontroller from another Feather and see how it responds. Here is a video covering the same points with a demo: