AstralCNC
Replacement board for the Larken StarCNC controller, built around the RPI Pico.
Journal
Hours: 21h
A while back, right before highway announced to June 16
Hours: 3h
When I got to this school, I've always wanted to fix the two CNCs that we have. One of them is a Larken 24/24 router, which is over 25 years old.
The controller uses a parrallel port which moder Operating systems don't support anymore, and the software that it uses is very old and doesn't work on modern computers.
I did a bunch of research and I needed to find the controller box which my teacher conviniently knew where it was. I took it home and started trying to use the parrallel port not knowing that it was not supported by modern operating systems.
After that I started looking for alternatives and documentation on how the controller works. I found (https://www.larkencnc.com/dloads/index.shtml)[https://www.larkencnc.com/dloads/index.shtml] which has a lot of documentation on the controller and how it works.
June 16-17
Hours: 2h
Me and my friend (Jayson) started hacking at the controller using a Pico. We started by directly connecting the Pico to the stepper drivers and using the Pico's GPIO to control them. it kind of worked.
I soon figured out that the Pico's GPIO is 3.3v and the stepper drivers are 5v, so we made a level shifter using some mosfets and some resistors. This worked, but I unfortunately did not get pictures of it.
heres the code: ```python import board import digitalio import time import supervisor
Pins
steppin = digitalio.DigitalInOut(board.GP0) steppin.direction = digitalio.Direction.OUTPUT
dirpin = digitalio.DigitalInOut(board.GP1) # Change if using a different pin dirpin.direction = digitalio.Direction.OUTPUT
Settings
step_delay = 0.01 # Default speed
Functions
def stepmotor(steps): for _ in range(steps): steppin.value = True time.sleep(stepdelay) steppin.value = False time.sleep(step_delay)
def setdirection(direction): dirpin.value = bool(direction)
def setspeed(level): global stepdelay step_delay = max(0.001, min(0.1, 0.1 / level)) # Level 1–10
def print_help():
print(Commands:
)
print(step
)
print(dir <0|1> - Set direction
)
print(speed <1-10> - Set speed level
)
print(help - Show this help
)
print(Stepper Control Ready. Type 'help'.
)
Main loop
while True: if supervisor.runtime.serialbytesavailable: try: line = input().strip() if not line: continue parts = line.split() cmd = parts[0].lower()
if cmd == "step" and len(parts) == 2:
step_motor(int(parts[1]))
print(f"Stepped {parts[1]} times.")
elif cmd == "dir" and len(parts) == 2:
set_direction(int(parts[1]))
print(f"Direction set to {parts[1]}.")
elif cmd == "speed" and len(parts) == 2:
set_speed(int(parts[1]))
print(f"Speed level set to {parts[1]}.")
elif cmd == "help":
print_help()
else:
print("Unknown command. Type 'help'.")
except Exception as e:
print("Error:", e)
I then tested the spindle and it is just a simple solid state relay running off 5v, so I connected it to the Pico and it worked.
# June 17
Hours: 3h
I started by exploring software options. Here are the options I found:
FluidNC: A very good option, for ESP32 but I didn't want to use it because people (ChatGPT) did not recommend it for CNCs.
Remora: Very new and modern but small community, so I didn't want to use it.
GRBL-HAL: Best ive seen, a bit dated but very good documentation and a large community. I decided to use it.
I continued with a Pico as the docs recommended it, and I started by making a simple schematic of the board.
I also looked at linuxcnc, but it added a bit too much complexity for my use case, and I didn't want add a full computer to the CNC.
# June 17
Hours: 3h
Schematic!

# June 18-19
hours: 6h
PCB design!

# June 19
hours: 4h
BOM and journal
https://docs.google.com/spreadsheets/d/1fKyxs4xyiDP1QXcRQpTOFPQCPsDcIa7fzhB4tR6pHxY/edit?gid=1552496342#gid=1552496342
Side note: why does LCSC not stock Molex KK-254 connectors? ts pmo
Side note 2: Why are molex product nameing so bad? We have two manufacturer product numbers, two series names, and like no consistency.
Polish and added usb c connector because I forgot lol.

# June 20
Hours: 1h
Fixed up some silkscreen issues, added some more silkscreen text, and exposed an IO pin I forgot to expose.
Thanks to Larry Kenny (The guy who made the original controller) for making the documentation available and awnswering my questions.