Перейти к содержимому
Hub Nexus

Автора пока нетВзять себе

Версия 2Обновлено 7 мин чтения

Поддержка

This Appropedia how-to covers running the Franklin software on the CNC Router Parts 3-D printer, or any compatible machine: the electrical system, setting up Franklin on a BeagleBone Green, and troubleshooting.

A large gantry-style 3-D printer with black printed parts on its bed

The CNC Router Parts 3-D printer. Photo: Handychandra7 on Appropedia, CC BY-SA 3.0.

The electrical system

The CNC machine the printer is built on already had its motors, inductive sensors, stop switches, stepper drivers, sensor interface board and motor interface board. What was added is a BeagleBone Green, a main interface board, a fan, a hot end and a thermistor.

Block diagram of the printer's electronics: inductive sensors and a soft emergency switch feed the sensor interface board, the main interface board connects that board, the BeagleBone Green, the heater and thermistor, the fan and the motor interface board, and the motor interface board feeds the stepper driver and its motors

The printer's electronic system. Handychandra7 on Appropedia, CC BY-SA 3.0.

Hot end. A Volcano hot end was chosen for its bigger heating element, which transfers heat better with a bigger nozzle and layer height. It comes with the fan, heater cartridge and thermistor cartridge. The fan and the 40 W heater cartridge need a power supply of at least 4 A at 12 V, and the thermistor is a Semitec 104GT2.

Stepper drivers. According to CNC Router Parts, the drivers are like a commercial drive the page links to, but rated for 50 V and 4.2 A. Franklin's timing settings must be adjusted to the driver's timing requirements, and the input needs extra current for the optocoupler inside. Set every driver to 2000 pulses per revolution. The Z axis takes the maximum current, 4.2 A, and the extruder is fine at the lowest, 1 A. For X and Y the page gives a figure that does not match its own "half of that", so it is left out here.

Sensor interface board. Its two slide switches, SW1 and SW2, must be ON to enable the inductive sensor outputs.

Main interface board. This custom board carries an ATmega1284p running on a 16 MHz crystal, a logic level shifter between the ATmega's 5 V logic and the BeagleBone's 3.3 V logic, a logic buffer that supplies the current the stepper drivers need, and two power transistors that drive the hot end and the fan. Other open-source 3-D printer electronics can be used if they meet the same requirements and the microcontroller is an ATmega328p, 1280, 1284p or 2560; the easiest is an Arduino board connected to the BeagleBone by USB.

Three headers connect the board to the rest: P1 to the BeagleBone Green (through the BeagleBone's header P9; do not reverse the connection), P2 to the motor interface board and P3 to the sensor interface board. All sensors are active low, except the emergency switch, which can be either, depending on whether it stops on press or on release.

P2 pinATmega pinCarries
1PD2/D10Z1 step
2PD3/D11Z1 and Z2 direction
3PD4/D12X1 step
5PD5/D13X1 direction
6PD6/D14Z3 and Z4 direction
7PD7/D15Y step
9PC0/D16Y direction
11PC1/D17Extruder step
13PC2/D18Extruder direction
15PC3/D19X2 step
17PC4/D20X2 direction
19PC5/D21Z2 step
21PC6/D22Z3 step
23PC7/D23Z4 step

On P2, the even pins from 10 to 24 are ground and pin 26 is 5 V; the original also names each signal's motor interface board terminal.

P3 pinATmega pinCarries
3PB3/D3X1 min
4PB4/D4Soft emergency stop
5PB2/D2Z3 max
7PB1/D1Y min
11PA0/D24Z1 max
13PA1/D25X2 min
15PA2/D26Z2 max
17PA3/D27Z4 max

P3 has ground on the even pins from 10 to 24 and 5 V on pin 26. Beyond power and ground, P1 carries RESET and three other signals to the BeagleBone's header P9. On the terminal block, the thermistor goes on ADC1 (PA7/D31, its other lead to ground), the heater cartridge's negative lead on HOTEND/FAN1 (PA4/D28) and the fan's negative lead on HOTEND/FAN2 (PA5/D29), with both positive leads on 12 V.

Setting up Franklin on the BeagleBone Green

  1. Flash the image. Download the Franklin image from the Franklin project page, write it to a microSD card with a tool such as Etcher, put the card in the BeagleBone and power it on. The LEDs flash in a wave pattern; when all of them go off, remove the power and the card.
  2. Connect over USB. Connect the BeagleBone to the computer with a micro-USB cable and open an SSH connection to 192.168.7.2 (for example with PuTTY) as the user debian, with the image's default password, which the original gives.
  3. Get it online for a while. Connect the BeagleBone to the computer with an Ethernet cable and, on Windows, share the Wi-Fi connection with the Ethernet one. On the BeagleBone, change "iface eth0 inet static" to "iface eth0 inet dhcp" in /etc/network/interfaces, then run "sudo ifdown eth0" and "sudo ifup eth0" until a message says "bound to" an address.
  4. Change the timings. Franklin's default timings are for the Athena printer and must be changed for this printer's stepper drivers. In /etc/apt/sources.list, comment out every line containing 192.168.8.2, run "sudo apt-get update", clone the Franklin source from github.com/mtu-most/franklin and install the build packages listed on the original page. Then make these edits:
    • In firmware/arch-avr.h, add the line "#define STEPS_DELAY 60" before "#ifdef FAST_ISR", change "#define TIME_PER_ISR 75" to 180, change "#if 1" to "#if 0", and change "ldi 18, 40" to "ldi 18, 0x3c".
    • In server/cdriver/space.cpp, change "int max = 0x7e << 7;" to "int max = 0x1e << 7;".
    • In server/driver.py, change "dist = 1000" to "dist = 3000".

With the BeagleBone still online, run "make" in the franklin folder (if an error occurs, try "git stash"), then, as root, "dpkg --install /tmp/*.deb".

  1. Go offline again. Change eth0 back to static, remove the internet sharing in Windows, and shut the BeagleBone down with "sudo poweroff".
  2. Set the fuse bits (custom main interface board only). The ATmega1284p must have its fuse bits flashed first so that it uses the on-board 16 MHz crystal and has JTAG disabled; skip this with another Arduino board. Connect the main interface board to the BeagleBone and supply 5 V to it through the terminal block. Over SSH, as root, go to franklin/server/bb, run "make setpin", then "./setpin 30 0x37" and "./setpin 31 0x37". Use avrdude (programmer bbbmelziO4, part atmega1284p, configuration file /usr/lib/franklin/bb/avrdude.conf) to write the high fuse 0xd9 and then the low fuse 0xe7. Finish with "./setpin 30 0x2e" and "./setpin 31 0xe", and remove power from the board.
  3. First run. Wire the system as in the diagram, turn it on and connect the BeagleBone to the computer by Ethernet. Open http://192.168.76.2:8000/admin in a browser and tick "Show setup". If the microcontroller has not been flashed yet, pick /dev/ttyS4 and "Melzi from BeagleBone (atmega1284p, bridgeboard v2)" (for another Arduino board, the right board and serial port) and press upload; if it fails, check the connection between the BeagleBone and the microcontroller. Cycle the power to the microcontroller, then import the configuration file on the setup page, after changing its extension to .ini.

Before anything else, check each motor's direction (it can be reversed, depending on the wiring) and that the inductive limit switches work, so the machine does not crash into its sensors; the easiest test is to move X, Y and Z a little through the box in the interface.

Troubleshooting

ProblemWhat to check
A motor does not moveThe soft and hard emergency switches' positions. A small sound from the motors means the driver is active and connected even when the motor is still (at least for the CRP5042); with none, the driver may be disabled or unpowered, and its enable pin must be driven low (ENA+ and ENA- both low).
An inductive sensor does not workIts LED should be on when metal is in front of it; if not, check for 12 V at the sensor interface board and that SW1 and SW2 are on. The output is active low, so "inverted" must be checked in Franklin.
Another main interface board is usedIt must be able to drive the optocoupler inside the stepper driver. Convert between 5 V and 3.3 V logic where needed. The Franklin firmware's clock must be 16 MHz or timing problems follow.
The printer is not detectedWait a while; if it is still missing, cycle the power to the main interface board, and if that fails, reflash the microcontroller.
Movement is inaccurateThe driver must be at 2000 pulses per revolution with enough current for each axis, and the steps per mm in Franklin must be correct.
Layers shift at random heightsTry Cura 15.04.6 with the start and end G-code from Appropedia's Athena Software page; it was tested with that version.
Extrusion problemsThe filament must sit directly above the extruder. Common causes: filament stuck on the spool, friction with a Bowden tube or another object that keeps the extruder from pulling it, a fan that does not cool the hot end so the filament sticks, and the drive gear grinding it.

Sources

  • Appropedia contributors, Using Franklin on a CNC Router Parts 3-D printer, Appropedia, licensed under CC BY-SA 4.0; the photograph and the diagram by Handychandra7 on Appropedia, each under CC BY-SA 3.0; changed here: condensed and reorganized, with the pin tables shortened and the references and configuration file left out; rewritten in hubnx's own words.

Комментарии

Spinner Logo

Ещё на тему «Природа»

Автор: Hub Nexus Nomad
From the glowing waves of the ocean to fireflies lighting up the night sky, bioluminescence is one of nature’s most mesmerizing phenomena. This article dives into the science behind bioluminescence, its role in nature, and how this glowing phenomenon has inspired both innovation and awe in the human world.
CC0 1.0 (общественное достояние)
Antimony makes plastics, textiles and paints resist flames, hardens batteries and ammunition, and its ore stibnite has been known since ancient Egypt. The US mined none in 2013 and imported most of what it used.
CC0 1.0 (общественное достояние)
Explore Badger Springs Trailhead, a gateway to archaeological sites, desert wildlife, and a riparian river canyon in Agua Fria National Monument.
CC0 1.0 (общественное достояние)
Encompassing the northern section of the Coso Range, this Wilderness preserves an area of extensive erosion revealing outstanding displays of volcanic formations and numerous valleys and washes. From high points--primarily Joshua Flat in the east-central portion--you'll discover great views east int
CC0 1.0 (общественное достояние)
Secretary Salazar Announces $150,000 for Habitat Improvement On Private Lands in Ohio