Here is the current schematic. Once I realized that I had blundered with the I2C based motor shield, I re-worked the design to directly drive four H-Bridges plus the stepper driver for the Extruder.
To get enough pins on the Teensy 3.1, I had to give up the second endstop on each axis, but I can now directly accept four Quadrature Encoders, and drive four DC motors.
Features included on this build:
- Two Flex Timer Hardware controlled Quadrature Decoders (X/Y AXIS)
- Two Hardware interrupt based Quadrature Decoders (Both Z AXIS)
- Four PID controlled PWM DC motor drivers (X/Y/Z1/Z2)
- One stepper driver for the extruder
- Three thermistor inputs (Extruder and two bed)
- Three heater PWM drivers ( (Extruder and hot bed)
- uSD card reader
- I2C interface for LCD display, etc...
- Serial Interface over USB
So... On to Teacup_Firmware:
I've been conversing with the fine folk on the Teacup project "Traumflug", "drf5n", and "triffid" with regards to getting the firmware to compile on my Ubuntu Linux 14.10 desktop.
I copied his instructions verbatim..
Notice the "git co teensy3" ? yeah... that "co" is alias for "checkout", and I checked out the teensy3 branch rather than the known-to-be-working teensy3.1 branch.
I spent a week, off and on trying to get that branch to compile and work on my Teensy3.1. It compiled and uploaded fine, but I was not able to see the virtual serial port over USB (/dev/ttyACM0).
DAMN YOU PRIDE!
I'm already feeling stupid for taking so long to complete this project, I didn't want to admit that I was actually having troubles...
I finally sent a request yesterday to the Teacup_firmware issues log, indicating what I had done to this point and describing my inability to see the serial port.
I've also opened an issue on the Teensy forum to see if anyone can point me in the right direction.
Teacup_Firmware on Teensy 3.1 not initializing USB Serial
I've successfully compiled the latest Teensy 3.1 branch of Teacup_Firmware as per instructions on the Reprap wiki
I'm using Ubuntu Linux 14.10.
No more errors in compile using Paul's most recent teensyduino 1.21 I've associated it with Arduino IDE v1.0.6, but am actually compiling with Teacup_Firmware's Makefile using the ARM toolchain supplied with Teensyduino at the commandline.
As I said, It compiles fine, and the HEX file uploads to the Teensy, but I do not get /dev/ttyACM0 on Teensy reboot. If I replace the HEX with another sketch I compiled in the Arduino IDE (any thing) I get /dev/ttyACM0 to show up.
I know about the need to initialize the virtual serial over USB by sending a string out from the Teensy. I do not see this happening in Teacup_Firmware, however I know others have been able to compile and use it successfully on the Teensy. I'm at a loss as to where to start looking.
Any guidance would be appreciated.
Finally, I noticed my mistake.
Remember that "git co teensy3" ?
Today I backed up the branch I had been working on, and ran the proper "git co teensy3.1"
Using the proper Teensy3.1 branch of Teacup_Firmware, I started copying the correct files into place:
Then I modied the make file to point to the correct toolchain as provided by teensyduino, AS WELL AS THE POINTER TO THE CORE FILES. <-- This step is not documented as best as I can find. It's in the make file, but nowhere are you told empirically to modify it. Doh! <facepalm>$ cp config.teensy3.h config.h $ cp ThermistorTable.single.h ThermistorTable.h $ cp Makefile-teensy3 Makefile
In the issue log, Dave (drf5n) also noticed that modification was required to allow the teensy3 branch to compile as below:
#if defined (_mk20dx128_h_) || defined ( __MK20DX128__ )
// Teensy 3.0 uses a MK20DX128 32 bit ARM Cortex-M4 48 MHz Test on this for config.h #include "arduino_teensy3.h" #endif
I had to also update the define for the teensy3.1 processor MK20DX256 as so:
#if defined (_mk20dx256_h_) || defined ( __MK20DX256__ )
// Teensy 3.1 uses a MK20DX256 32 bit ARM Cortex-M4 48 MHz Test on this for config.h #include "arduino_teensy3.h" #endif
Low and behold... make clean && make && make project and I had a fairly clean compile. There were a few warnings that I was prepared for, but it compiled ... and uploaded... AND I had my /dev/ttyACM0 !!!So at this point, I hurriedly launched Repetier Host, configured the printer port, and pressed "connect"... Mais voila!
Now, the real fun begins... bringing my Quadrature encoders over to Teacup, and modifying my PID loops to use Teacup's dda_clock().
Wish me luck!
My Previous blogs on this project:
(little did I know I'd be working on this on and off for a year... and the real work is just beginning)
- Repscrap: DC Motor Control for X-Y working - now to Teacup_Firmware
- Teensy 3.1 based Repstrap control board initial wiring completed - test #1
- Prototype Printer Controller Cont'd - Teensy 3.1 w/DC motor/encoders
- Prototype Board: DC motor/Encoder - Teensy 3.1 based 3D printer controller
- Teensy 3.1 Repstrap printer with DC motor control and Flex Timer Quadrature Encoders
- Developing a Robot Shield for Teensy 3.1: Looking for feedback
- Using the Arduino PID Library for position control of X and Y axis on RepScrap printer
- Further Progress on framing my RepScrap 3D printer.
- My Repscrap: DC motors and rotary encoders for Z-Axis too?
- Arduino Sketch to manage high resolution - high speed linear encoders
- Followup on 3D printer from Scavenged DC Motor / Encoders Blog
- Using DC Motors and Encoders for 3D printer: Challenging the norm!
- My journey into building a 3d printer from old printer parts
No comments:
Post a Comment