1.1.6 hybrid firmware

Topics around mechanical design, controller and electronics. Mods & hacks welcome.
firesped
Posts: 854
Joined: Mon Mar 21, 2016 9:23 pm
Location: Tucson, AZ

1.1.6 hybrid firmware

Postby firesped » Thu Nov 24, 2016 6:20 pm

spent time updating my hybrid firmware to 1.1.6

primary changes
added ELASPED and PENDING macro calls into temperature.h so code from lasest marlin RC can be used.

updated Thermal Protection Runaway to more closely match latest marlin RC.

Added and updated my hybrid code.
major changes include
* changing out if statements for switch case statements.
* added in EXT2 so if someone actually wants to put a 3rd extruder on the printer, they can.
* put all hybrid code behind #ifdef HYBRID, so it will not compile if it is not #defined.
* fixed an error in the failsafe code I put on the G0_G1 command.

once I have done some testing, I'll push it out to github.
RL name: Michael Nolen
printers:
raise3D N2 kickstarter Early Bird
Trinus Deluxe (running smoothieware on Azteeg X5 GT board)
Monoprice Maker Select v2

firesped
Posts: 854
Joined: Mon Mar 21, 2016 9:23 pm
Location: Tucson, AZ

Re: 1.1.6 hybrid firmware

Postby firesped » Thu Nov 24, 2016 7:50 pm

recalibrating my printer right now. so far there has need no issues with the 1.1.6H firmware. I'll have to do some TPR testing still but it should not have the issue with going into runaway status that earlier versions of the firmware have gone into.
RL name: Michael Nolen
printers:
raise3D N2 kickstarter Early Bird
Trinus Deluxe (running smoothieware on Azteeg X5 GT board)
Monoprice Maker Select v2

Jetguy
Posts: 3114
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: 1.1.6 hybrid firmware

Postby Jetguy » Wed Feb 22, 2017 2:50 pm

I'm having a dumb problem and I'm sure it's all on my end. Neither my previous firmware nor your firmware branch will work on my machines. By work, I mean that Arduino IDE compiles it, If I try to flash using the LCD menu system, it just hangs, If I flash the board with it directly using USB, the motion board is running the firmware, you can control the printer from Repetier host, everything is working but the Raise 3D code on the pcDuino refuses to talk to the firmware and is stuck in safemode.
Notes: First I was using Arduino IDE version 1.6.9, but that may not be recommended and in fact, I had to disable the graphic LCD define because the IDE was complaining about a line in the SD card reading (activated when LCD is chosen, SD card is enabled).

So then I thought let's go back in time to what we think worked. So I followed verbatim the instructions on github in a fresh copy of Arduino IDE 1.0.5 R2, added the files to hardware and libraries, and I still get the same basic problem It makes firmware, that firmware runs on the motion board, it will not talk to the front panel LCD. If I flash it back with the current official 1.1.1 versions, then the LCD connects. So now, I'm examining the serial messages upon connection using Repetier Host and clearing the log before I connect, connecting, copy the entire log to a text doc for examination and further comparison.

I guess what I'm asking, have you seen this before? I'm not sure how I got to this path where a known working source that I even have previous hex files from that works, no longer works?? This one has me scratching my head.

Jetguy
Posts: 3114
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: 1.1.6 hybrid firmware

Postby Jetguy » Wed Feb 22, 2017 3:10 pm

Here is a snippet and not 100% sure why, but I highlighted a response that failed in the log of the firmware. First section is Repetier connected to firmware 1.1.1, the next is 1.1.7.H

I may have to break out my other motion control board, I added some jumpers to connect 2 FTDI cables to sniff the actual serial coms on both sides- meaning the part we do not see is what the LCD firmware is sending upon initialization to the motion control board. Basically you intercept the TTL level serial going into and out of the mega2560 from the 16u2 performing the USB to serial. You then connect 2 FTDI cables to convert that TTL into something your PC can read and use 2 consoles open and you are only receiving on both, but one is TX from the pcDuino and the other is TX from the motion control board Marlin firmware. Thus you see the command and the response.
Attachments
Raise3D working protocol example1.rtf
(4.43 KiB) Downloaded 93 times

Jetguy
Posts: 3114
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: 1.1.6 hybrid firmware

Postby Jetguy » Wed Feb 22, 2017 3:25 pm

Grrr, I may have found it. I enabled the EEPROM function in config.h.
It seems when that is enabled, something about that changes the startup responses and something in the pcDuino code is very unhappy with the replies.
// EEPROM
// The microcontroller can store settings in the EEPROM, e.g. max velocity...
// M500 - stores parameters in EEPROM
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support
#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can.
//#define EEPROM_CHITCHAT

I originally had EEPROM_Chitchat disabled because that's what the comments suggest. Trying it right now with it enabled.

Yep, that is it and has been shooting me in the foot for at least a couple of hours.
If you use EEPROM by enabling it, you must also enable chitchat.
#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can.
#define EEPROM_CHITCHAT

Jetguy
Posts: 3114
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: 1.1.6 hybrid firmware

Postby Jetguy » Wed Feb 22, 2017 3:28 pm

BTW, EEPROM enabled is so much better. Now you can save acceleration and other values like PID tuning all via gcode.
I realize we may not have a direct console through the pcDuino, but figuring out that little snippet- well that makes my whole day and hopefully helps others.

Jetguy
Posts: 3114
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: 1.1.6 hybrid firmware

Postby Jetguy » Wed Feb 22, 2017 3:37 pm

No more flashing firmware just to get a simple change like PID or acceleration values, and also- steps per mm for fine tuning.
Attachments
IMG_0444[1].JPG
n series EEPROM.jpg

firesped
Posts: 854
Joined: Mon Mar 21, 2016 9:23 pm
Location: Tucson, AZ

Re: 1.1.6 hybrid firmware

Postby firesped » Wed Feb 22, 2017 9:16 pm

Jetguy, you should check out this firmware for the current Marlin release client.
https://github.com/Firesped/Marlin/tree ... s-RCBugFix

I've had it on my printer for over a month and I haven't had any issues that were not caused by me programming in incorrect settings for the printer.

EEPROM is also enabled on it. I also know a lot of the specifics involved with getting the PCduino to talk with the firmware installed on the motion controller. meaning that your Repetier firmware is very possible to get done. I just haven't played with it yet.

raise3d was looking at my firmware but I don't know what has become of it.

There is a ton of new functionality in the new firmware and new printer behavior that make the printers not damage themselves. such as when homing X/Y, it will make sure the Z axis is at a safe point to not have the nozzle hit your clips holding the glass bed.

I know TRP also work on it. I had a gcode for a temp tower that I accidentally put in like 25000 C. the printer shut itself down instead of trying to melt a hole into the earth.
RL name: Michael Nolen
printers:
raise3D N2 kickstarter Early Bird
Trinus Deluxe (running smoothieware on Azteeg X5 GT board)
Monoprice Maker Select v2

Phife
Posts: 77
Joined: Thu May 12, 2016 3:47 pm

Re: 1.1.6 hybrid firmware

Postby Phife » Thu Feb 23, 2017 2:58 am

Im having to change my eeprom setting for the Z offset on a regular basis, I can do it pretty quick, but I have to Log into the printer with Putty, Kill the touchscreen process, run Octoprint and then connect to octoprint so I can use the terminal to enter gcode commands.

That Marlin Firmware EEPROM setting app looks interesting, what is it? and does it work with our machines? I would love to not have to type in a bunch of command line commands just to change one Z Homing Offset setting.

I have a BL touch on my printer and im trying new positions and mounts so the offset changes a lot.

Jetguy
Posts: 3114
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: 1.1.6 hybrid firmware

Postby Jetguy » Thu Feb 23, 2017 3:14 am

That was just Repetier host. I physically unplugged the USB to the motion board, plugged in to my PC, ran Repetier Host, then plugged the USB back in and rebooted the pcDuino screen to reconnect it to the motion board.

firesped
Posts: 854
Joined: Mon Mar 21, 2016 9:23 pm
Location: Tucson, AZ

Re: 1.1.6 hybrid firmware

Postby firesped » Thu Feb 23, 2017 9:31 am

all the stuff for the BL touch is in the newer firmware. I haven't played with it yet, as I haven't setup the BL touch I got yet.
RL name: Michael Nolen
printers:
raise3D N2 kickstarter Early Bird
Trinus Deluxe (running smoothieware on Azteeg X5 GT board)
Monoprice Maker Select v2

User avatar
walshlg
Posts: 1350
Joined: Wed Mar 23, 2016 12:01 pm

Re: 1.1.6 hybrid firmware

Postby walshlg » Thu Feb 23, 2017 2:21 pm

Nice, it would be great if we could add this to ideamaker, I really wish I could change PID when running the 800um nozzles. I'm pretty sure that it would improve things to run PID while printing, not while the head is not extruding

Jetguy
Posts: 3114
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: 1.1.6 hybrid firmware

Postby Jetguy » Thu Feb 23, 2017 2:29 pm

I don't agree with that assumption and here is why. Even if extruding, the temp sensor is in the heater block, not the nozzle. When you PID tune, you are tuning the response rate of the heater compared to the distance and thermal conduction of the heater block. You are maintaining the heater block at a process temp not the nozzle.

When extruding, yes, you are pulling heat out of the system but that cools the block evenly. PID tuning does not change that fundamental thermal conduction between the block and the throat and nozzle, both of which are part of the melt zone of the extruder. Again, PID tuning has nothing to do with extruding and everything to do with the specifics of the aluminum heater block, the heater, the power supply driving the heater, the response rate of the thermocouple and it's coupling to the aluminum block.

User avatar
walshlg
Posts: 1350
Joined: Wed Mar 23, 2016 12:01 pm

Re: 1.1.6 hybrid firmware

Postby walshlg » Thu Feb 23, 2017 2:59 pm

I disagree, when printing you are adding a heatsink which will cool the block and reach a new equilibrium, hopefully, of heat input and heat loss. THis is analogous to adding a heat spreader to the block so the heat response curve will change.

Jetguy
Posts: 3114
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: 1.1.6 hybrid firmware

Postby Jetguy » Thu Feb 23, 2017 3:09 pm

No, I still think you have it wrong but should be moved to another thread if you want to go down this path of heat process control discussion.


Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 2 guests