-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Printrboard RevF #3182
Add support for Printrboard RevF #3182
Conversation
ec61d8a
to
b85a9dd
Compare
The PrintrBoard Rev F utilizes a mcp4728 DAC to set motor current. Printrbot's implementation utilizes 2 new M-codes to set and write the DAC settings to the DAC EEPROM: `M909` (Read DAC) and `M910` (Write DAC). `M907` is re-used to set value, `M908` for direct control. The Pins file for the RevF board is included.
db9ee09
to
994a4bc
Compare
994a4bc
to
5948322
Compare
@StephS and @thinkyhead is the Printrbot Rev F a working version? I'm fixing a friend's Printrbot Simple 1403 and need to reflash the Atmel processor. The Printrbot site provides a firmware but the Y axis is inverted. My aim is to get a working firmware into the Printrbot by using DFU or Arduino IDE. I do have some issues here because of the environments (can't seem to add the Teensy libraries to my Arduino 1.6.5 version, the installer complains that it can't find the version.txt):
... and the installation of Teensy boards into the Arduino IDE breaks. @StephS any how I can get that "version.txt"? |
This is supposed to be all the same stuff that the Printrbot fork is using — that's all I know. I haven't been able to test building it yet, as I also don't have Teensy++ 2.0 support installed, and it's a slow connection here so I need to do the download overnight. |
Let me know if you succeed to install it. Maybe you figure it out, I haven't been able to get it working yet. |
@thinkyhead I managed to install Flip 3.4.7 and could load the marlin.ino.hex file from Arduino into the Printrbot. The new RCbugfix release runs now on the Printrbot SImple 1403. So far so good. The only issue that I notice is some z banding on the prints but that is probably and rounding error in the Z step config (2020 steps) and not related to Marlin. So in total Printrbot, Prusa It2 are working for me, Haven't test the corexy yet (just a few dry runs). |
The default installed bootloader for the Printrboard and Teensylu is the Atmel DFU bootloader, which requires Atmel FLIP to program. Full programming instructions are here: http://reprap.org/wiki/Printrboard#Loading_Firmware_.28Windows.29 |
@thinkyhead I took a look, great job on fixing up my messy code into something that works. Everything looks good, just a few things I want to fix later: dac_amps(int8_t n) utilizes hard-coded value for the reference current (2.048v). in our case this works because printrbot is the only one using this thing, but in the future we would need the preprocesser to determine the correct value, or move it into the pin definition (confusing since there is already a dac_vref, but that one is a bitmask that is sent, versus the physical ref voltage). this is not critical so long as no-one else designs a board with the same dac and uses an external vref. I'll try to build and test within the next week. |
We will definitely have to add a note that FLIP is needed. Thanks for the info on the voltage. We can certainly make that conditional based on the board type, and I suppose the pins file would be the right place for that. Anyhow, gotta go chase bugs and do another release. Keep us posted! |
@StephS I have updated the Reprap page http://reprap.org/wiki/Printrboard#Loading_Firmware_.28Windows.29 to reflect some of the steps that I encountered for a succesful re-flash of a Printrbot Rev F board. |
@thinkyhead I had a look comparing the printrbot branch to the latest RC, it looks like for Extrudrboard support they disable the JTAG pins using |
Yeah, setting that register is all you need, but there are a few gotchas you have to be careful of.
|
I'm a little drowsy at the moment, so… is there anything I need to do to correct the pins files and JTAG disabling code? |
FYI, I'm Building/Installing with Linux on Simple Metal. If you install teensyduino and dfu-programmer you can
******** GNUmakefile begin ********
TEENSYDUINO = /opt/teensyduino/arduino
printrboard:
$(TEENSYDUINO) --board teensy:avr:teensypp2:speed=16 --verify --verbose Marlin.ino
******** GNUmakefile end ******** |
hey @thinkyhead I found out that the dac_init() is missing from setup in marlin_main.cpp without it, the M909 command won't return anything (dac_init sets a flag that the DAC is connected) #if ENABLED(DAC_STEPPER_CURRENT)
dac_init();
#endif |
Thanks @StephS – Just patching that now! |
In answer to #2971 here's support for Printrboard RevF provided for us by @StephS and @Printrbot. This PR includes updates to bring the code up to date with the latest code-base.
Adapted from the Printrbot Marlin Rev F branch.
The Pins file for the RevF board is included.
For reference, Marlin currently assigns these codes for
DIGIPOTSS
andDIGITPOT_I2C
:M907
to set digital trimpot motor current using axis codes.M908
to control digital trimpot directly.The PrintrBoard Rev F utilizes a mcp4728 DAC to set the motor current. This PR includes Printrbot's
M907
andM908
supporting DAC stepper current. If you are building for Printrbot, these codes will set and control stepper current through the mcp4728.This PR also includes Printrbot's new M-codes to set and write the DAC settings to the DAC EEPROM:
M909
(Read DAC)M910
(Write DAC)If you are building for Printrbot Rev. F, these codes will be available to read and write DAC values.