Today I have been focusing more on completing the firmware of main controller. It is nothing more than movement synchronization, zeroing and movement control algorithms. I am using STM32F103BC microcontroller (micro on the Maple Mini). It has ARM architecture with which I am not so experienced yet. This is why I am still having few problems with SPI communication and so forth. I have also started working with PlatformIO which is slowing me down a bit due to no experience. I have switched from Arduino IDE to PlatformIO, because it is more universal. If I am correct this could allow people to use their own microcontrollers with little or no tweaking at all. It also speeds the development process quite a bit with auto-complete.
The main controller will function more like command to action interface instead of being a GPIO like interface. This way it will get commands from SBC (probably beaglebone black), which will trigger some sort of action. Here is a list of commands that I will almost certainly implement:
Setting commands
- Build cylinder steps per layer
- Feed cylinder steps per layer
- X axis resolution (steps per minimal move)
- Y axis resolution (steps per minimal move)
- Enable/disable calibration mode
- Function commands
- New layer
- Fill cylinder
- Start printing layer or single pass (yet to decide)
- Zero the machine
- Engage/disengage servos
I am still deciding on how I want zeroing and calibration to function. One of my Ideas is for main controller to cut power to servos but keep the encoders and servo controllers running. After that the controllers would be sent into calibration mode (via communication line or a pulse on specific input pin). Then one could just move the printhead in to print area zero position. After that main unit would receive the global coordinates of the print area zero position via I2C or some other communication. Second option which is a bit more makeshift is to cut power to the servos, move the printhead into position, reset the controllers and then power on the servos.
Single pass or layer printing function will probably function so that the printhead moves in to desired position. After that the controller will enter the pulse to move mode. This will be done using interrupts, so I will be able to achieve high speeds (hopefully somewhere around the max speed of the printhead). It will function so it moves to next position (set by resolution settings) after receiving a pulse from printhead controller. Then the interrupt would be attached for new pulse. I am still deciding on how I want main controller and printhead controller to talk to each other. I as settling on the idea of having three lines:
- Next position (main controller moves the printhead to new position)
- Next line (main controller moves the printhead to new line)
- Move finished (printhead controller triggers the printhead)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.