Menu

Horus Firmware released under GPL

The Horus firmware is a program that allows you to control the stepper motors, laser modules and LDR analog sensors using G-code1commands. It is compatible with Arduino2 based boards and the ZUM SCAN3 shield.

The firmware has been designed to control all physical elements of the Ciclop43D scanner, a rotating scanner based on laser triangulation. The base of the code is the Grbl5project, a program that enables CNC machines to be controlled. It has also been used in other projects such as Marlin, the firmware for 3D printers.

The code has been published on Github, released under the GPLv3 licence6. This licence guarantees the fundamental freedoms associated with the use of open source software. Any code released under this licence automatically becomes part of the Technological Heritage of Humanity.

Compiling and loading

Different interfaces may be used to compile the Horus Firmware, such as de Arduino IDE7 and Sublime with the Stino8 plug-in, etc. These interfaces also allow you to load the compiled firmware in .hex format onto the microprocessor. Another way of loading the firmware is to directly use AVRDUDE9, or the most simple option is using the Horus software.

Uploading of the firmware using Horus (left) and Sublime+Stino (right)

Connection

You can communicate with the board via USB or Bluetooth. There are different open source applications for establishing the connection, such as the Arduino Serial Monitor or CuteCom10. If the latter is used, you will need to select the device, adjust the baud rate to 115200 and set the command ending to LF or CR, ‘\n’ or ‘\r\n’, respectively.

After starting the serial communication, this will be the first message that Horus sends:

Horus 0.1 [‘$’ for help]

After each command is received, the software will answer with ok when the processing of that command ends, either correctly or with an error message. The communication flow is as follows:

Configuration

The Horus firmware, due to its Grbl heritage, provides a configuring and monitoring interface which uses $ commands, as well as control commands in real time. All supported commands are described in the Grbl wiki.

Yu can also view the help menu on the available configuration commands by sending $:

As an example, the commands $110=v y$120=a, adjust the speed and maximum acceleration of the motors to v º/s and a º/s² respectively.

G-code commands

G-code is the most widely used programming language in numerical control devices (CNC). Milling machines, laser cutters and 3D printers use this de facto standard to communicate. Instructions are executed sequentially in this language. These are the G-code commands that have been integrated into Horus:

G1: Circular movement

G1 Fv Adjusts the rotational speed to v degrees per secondG1 Xd Moves the stepper motor to the position d defined in degrees

M0–M2: Pause and program end

M0 Pauses the program. It may only be restarted through the Cycle start (~) commandM2 Stops the program and resets it

M17–M18: Enable / Disable the stepper motors

M17 Enables the motors, maintaining their position. They stay enabled even after sending G1 commandsM18 Disables the stepper motors. They stay disabled even after sending G1 commands.

M50: LDR analog sensors reading

M70–M71: Laser modules turn on / off

M70 Tv Turns off the laser module vM71 Tv Turns on the laser module v. After a four-minute timeout, the laser is turned off automatically

Future work

One of the future projects is adapting the firmware to new electronic boards and new processors. The purpose is to increase its functionality and define a standard communication interface, which guarantees compatibility with tools like Horus and derivatives.

Horus Firmware has been developed with simplicity in the structure and code in mind. For example, it contains just enough for controlling 3D scanners such as Ciclop, while easily enabling you to add functionality. As with all open source projects, we encourage you to contribute, improve and evolve this firmware and adapt it for new requirements and projects.

Horus FW is oriented to 3D Scanning. LDR sensors are implemented in order to be used in the future to, for example, auto-adjust the exposure of the camera with ambient light. Moreover, you can connect any analog sensor, apart from LDR.

Need help desperately – as motor is not moving at all
And getting message in Horus software as”Check Motor Direction and Pattern Position and try again error” and motor not at all responding in control bench mode

We built the ciclop using Arduino Uno + laser driver and stepper motor driver on a prototyping shield.

After assembling the shield , we have loaded ‘firmata’ sketch and used firmata.exe (firmata testing program), and enabled one -by-one the relevant pin and ensured motor can rotate and also laser can be switch on or off – this is just to ensure all the wiring is ok.
In this everything worked fine.

I tried loading the three different firmware through below three procedures , and still my motor will not move at all in all the cases

Method of loading the firmware
Used Horus software version 0.1.2.4 to upload the firmware – under preference – Burn Firmware option – selected Arduino UNO as option – selected the external file – and showed the path of downloaded Hex file and uploaded it , It uploaded without any error. (tried EEPROM clear option also – but with same result as below)

Result :
In Horus under GCode control – issued $X and unlocked the alarm , and then we could ON/OFF lasers fine, enabled motor in control workbench but motor will not move !! at all.- and upon “enabling ” motor in Horus still the motor will not lock even (means the motor enable pin from does not go LOW to enable the motor).

Method of loading the firmware
Used Arduino IDE 1.6.5 to open the source code , and compiled with no errors and upload the firmware using Arduino IDE itself with no error on to the Arduino UNO.

Result :
In Horus under GCode control – issued $X and unlocked the alarm , and then we could ON/OFF lasers fine, enabled motor in control workbench but motor will not move !! at all.- and upon “enabling ” motor in Horus still the motor will not lock even. (means the motor enable pin from does not go LOW to enable the motor).

Procedure 3 :

Wiring is same as Procedure 1 :

Source of Firmware :
Used Horus 0.1.2.4 inbuilt default firmware

Method of loading the firmware
Used Horus software version 0.1.2.4 to upload the firmware – under preference – Burn Firmware option – selected Arduino UNO as option and selected inbuilt default firmware to load,
it loaded without and error.

Result :
In Horus under GCode control – issued $X and unlocked the alarm , and then we could ON/OFF lasers fine, enabled motor in control workbench but motor will not move !! at all.- and upon “enabling ” motor in Horus still the motor will not lock even. (means the motor enable pin from does not go LOW to enable the motor).

Hoi i am building the ciclop i love your work
I was looking to amp up the resolution is there a form or topic where i can find some more persons working on this i wil share al my finding ..again love the work tanks

About the author

An industrial engineer trained at the Polytechnic University of Madrid (ETSII). Passionate about programming and mathematics. Musician, creator, maker and defender of free knowledge culture. He currently works at the R+D department of BQ.