3D Printer Rebuild

Original “Eaglemoss Vector 3” revisited for greater accuracy, control and flexibilty.

This project focuses on the re-design of the original “Eaglemoss” (now discontinued) kit built 3D Printer. It’s main hardware control board has been replaced with an Arduino ATMega 2560 and a RAMPS 1.14 Control board. As shown below:

The RAMPS 1.4 BoardTHE ARDUINO MEGA 2560

The interconnectivity between the Arduino and RAMPS board

is shown in this schematic:

ArduinoMega_Pololu_Shield (RAMPS)
See this clip to install stepper drives

RAMPS 1.4 and Mega 2650 Arduino Pin numbers

This is an A4988 Stepper motor driver of which 5 are used on the RAMPS 1.4 Bosrd for the X, Y Z and EXTRUDers

STEPPER MOTORS AND OTHER PINS

The original 24v Power Supply uses an ATX PSU

 

..and the software is now controlled by a Raspberry

Please view the clips below to understand the connectivity and running of the software

This clip shows the setup from the Arduino to the pi

and this details how to control your print with ctoprint

 

 

running Octoprint in conjunction with the Marlin Firmware

Installing Software and Firmware 
the firmware “Marlin” is installed on the Arduino using VSC

Marlin is an open source firmware for the RepRap family of replicating rapid prototypers — popularly known as “3D printers.” Originally derived from Sprinter and grbl, Marlin became a standalone open source project on August 12, 2011 with its Github release. Marlin is licensed under the GPLv3 and is free for all applications.

Install Marlin

A standalone source code editor that runs on Windows, macOS, and Linux. The top pick for Java and web developers, with tons of extensions to support just about any programming language.

Install Microsoft VNC

Marlin Flasher or Firmware Updater App

AVRDUDE (AVR Downloader Uploader) is a command-line utility used to program AVR microcontrollers. In the context of a firmware plugin, AVRDUDE helps manage the process of uploading firmware (a specific software program or set of instructions) to an AVR microcontroller or other compatible device.

When used in a firmware plugin, AVRDUDE typically performs the following functions:

  1. Communicating with the device: It communicates with the microcontroller through a programmer (like USBasp, Arduino as ISP, or other AVR programmers).
  2. Uploading firmware: It uploads the compiled firmware (usually a .hex file) onto the microcontroller, allowing the device to run the new firmware.
  3. Programming and Configuration: In addition to uploading firmware, AVRDUDE can also be used to read/write fuse settings, EEPROM data, and other configuration settings on the microcontroller.

AVRDUDE supports a wide variety of AVR chips and programmers, making it a versatile tool for developers working with AVR-based embedded systems.

In summary, in the context of a firmware plugin, AVRDUDE is used to interact with hardware and upload the firmware or make changes to the device configuration.

Here’s a breakdown of the components:

  1. avrdude: The command to run AVRDUDE.

  2. -c <programmer>: Specifies the programmer type. This could be a device like usbasp, arduino, usbtiny, etc.

    • Example: -c usbasp (to use the USBasp programmer).
  3. -p <partno>: Specifies the target microcontroller or “part” number (model of the chip you are programming).

    • Example: -p m328p (for ATmega328P, commonly used in Arduino boards).
  4. -P <port>: Specifies the serial port or device file to which the programmer is connected.

    • Example: -P /dev/ttyUSB0 (on Linux, for a USB device), or -P COM3 (on Windows).
  5. -b <baudrate>: Sets the baud rate for the communication between the computer and the programmer (for serial connections).

    • Example: -b 115200 (this is often required for serial programmers like USB-to-Serial).
  6. -U <operation>: Specifies the operation to perform on the microcontroller, such as reading or writing data. This is followed by a memory operation and a file.

    • Example: -U flash:w:firmware.hex:i (write a .hex file to the flash memory in Intel Hex format).
    • The operation has the format memory_type:operation:file_type, where:
      • memory_type could be flasheepromfuses, etc.
      • operation could be r (read), w (write), or v (verify).
      • file_type could be i (Intel Hex), s (Motorola S-record), etc.

Example Command:

To upload a .hex file to an ATmega328P using a USBasp programmer, the command might look like this:

cssCopy
avrdude -c usbasp -p m328p -U flash:w:firmware.hex:i
 
The actual Code format in Octopi is
{avrdude} -v -q -p {mcu} -c {programmer} -P {port} -D -C {conffile} -b {baudrate} {disableverify} -U flash:w:{firmware}:i

In this example:

  • -c usbasp: Use the USBasp programmer.
  • -p m328p: Target the ATmega328P microcontroller.
  • -U flash:w:firmware.hex:i: Write (w) the firmware from the firmware.hex file to the flash memory in Intel Hex format (i).

Additional Options:

  • -v: Verbose mode, which provides more detailed output.
  • -F: Forces programming even if AVRDUDE detects a mismatch in signature.
  • -t: Run in “test mode” to check the setup without actually programming.

 

Translate »