Posted on Leave a comment

Heating Bed and Nozzle Simultaneously On CR-10 In Cura

On my CR-10, the nozzle heats up and then the bed heats up. This seems like a waste of time particularly in that I need to make sure the first layer of the print goes down correctly. After that, I don’t care. This sequentially heating dramatically increases my time investment in a print.

Warning: I’ve heard that the stock CR-10 power supply is trash and can’t handle this. I’ve been doing it for about a year (hundreds of prints) with no issue. Use at your own risk.

In Cura, go to Settings > Printer > Manage Printer > Machine Settings > Printer

———START G-CODE

M140 S{material_bed_temperature} ; start preheating the bed WITHOUT wait to what is set in Cura

M104 S{material_print_temperature} T0 ; start preheating hotend WITHOUT wait to what is set in Cura

M190 S{material_bed_temperature} ; start heating the bed to what is set in Cura and WAIT

M109 S{material_print_temperature} T0 ; start heating hotend to what is set in Cura and WAIT

M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration

M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate

M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration

M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk

M220 S100 ;Reset Feedrate

M221 S100 ;Reset Flowrate

G28 ;Home

G92 E0 ;Reset Extruder

M92 E98 ; Brando configured extruder e-steps

G1 Z2.0 F3000 ;Move Z Axis up

G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position

G1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line

G1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little

G1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line

G92 E0 ;Reset Extruder

G1 Z2.0 F3000 ;Move Z Axis up

——— END G-CODE ————————–

G91 ;Relative positionning

G1 E-2 F2700 ;Retract a bit

G1 E-2 Z0.2 F2400 ;Retract and raise Z

G1 X5 Y5 F3000 ;Wipe out

G1 Z10 ;Raise Z more

G90 ;Absolute positionning

G1 X0 Y{machine_depth} ;Present print

M106 S0 ;Turn-off fan

M104 S0 ;Turn-off hotend

M140 S0 ;Turn-off bed

M84 X Y E ;Disable all steppers but Z

Posted on Leave a comment

Blue Pill STM32 Clones Brown Out or Become Unresponsive

The Problem:  The STM32 Blue Pill sometimes dies for no apparent reason.  On the PSU, it’s pulling 30mA and then for now apparent reason, the current draw reduces to 10mA (for the power indicator LED, presumably) and the microcontroller appears dead.  It only seems to occur when powered from a power supply to the 5V pin.   Once it occurs, giving the 3.3V pin power instead appears to do no good.

For some reason, I’ve been able to fix the problem reliability by removing external power and powering the STM32 via the Stlink clone along with the CLK, GND, and IO pins.  Voltage SHOULD be voltage in such a situation, but maybe the IO pin has some kind of effect.  I’m really not sure.  If anyone knows, please pass on why.

I’ve wondered if the problem is some kind of BOR brownout problem, but I haven’t done the work to find out yet.  It only seems to happen with the CS32F103C8T6 STM32 Blue Pill clones (which I currently have 9 of I need to burn through and never buy again.)

 

Posted on Leave a comment

Engineering Rule #1: Make Friends With Iteration

Imagine you’re a young boy who worked hard all day on his sandcastle. Just as your mom calls you for dinner, a teenage jerk runs up and kicks your castle down. That feeling of loss, betrayal, and rage is only topped with the feeling that all that hard was for nothing.

This is every day. At least it’s most days. It’s the odd day that things go right the first try. To be honest, I kinda like it this way. I say that now because typing it is easy. Going back to the PCB I have to throw in the trash and start all over on is harder.

It’s a good idea for everyone involved with making and engineering to go ahead and make friends with iterating because you are going to be doing it from here on out. It is the way. There’s no way around it. You do. You fail. You repeat. In theory, it’s supposed to get easier somewhere along the line, but that’s only if you aren’t trying new things. As long as things are new, you will completely screw up on a perpetual basis.

This quick blog is my way of saying that this state of disaster is not only normal, it’s the correct path. The hard part is not beating yourself up. Yes, there are people that already goofed up whatever part of the path you are on and it’s easy to look around and think that you are the only one having problems. The truth is they probably had the same problem and they probably had the same problem more times than you did. Accept that you may have to solder up 3 boards on your needed project before you get one that works. Enjoy it.

Brandon

Posted on Leave a comment

Trace Width vs Length Inductance Table for PCB Traces

I need to know the inductance of the traces I’m creating.  It’s too slow to use the inductance calculator at All About Circuits.   Unfortunately, the equation has any given variable on both the numerator and the denominator.  I refuse to invest the brainpower to develop a rule of thumb, so I’m resorting to a table.  I swiped their equation and tossed in typical values for trace widths  I used in Python.

I wouldn’t use this for anything hyper serious, but if I’m forced to make a 4″ trace, I can quickly see that doubling the width from 0.5mm to 1mm saves me 12nH.

The intuition to be gained from this (and this is probably not a shocker) is that keeping lengths down is a HUGE deal for reducing the inductance of traces.  Trace width is a little more interesting.   In terms of %, you get much better benefit for wide traces at short distances.  At 0.02″, inductance is reduced from 0.171 to 0.075 when switching from 0.01″ traces to outrageous 0.118″ traces.    At distances ~4″,  you go from 136.978nH with tiny traces to 93nH with enormous traces.

I’m using the JLC2313 stackup so the height of these calculations (distance from trace to ground plane) is 0.1mm.

Length: 0.02 in
Width: 0.01 in ( 0.25 mm ) Inductance: 0.171 nH
Width: 0.02 in ( 0.51 mm ) Inductance: 0.128 nH
Width: 0.03 in ( 0.76 mm ) Inductance: 0.104 nH
Width: 0.039 in ( 0.99 mm ) Inductance: 0.09 nH
Width: 0.049 in ( 1.24 mm ) Inductance: 0.08 nH
Width: 0.059 in ( 1.5 mm ) Inductance: 0.075 nH
Width: 0.118 in ( 3.0 mm ) Inductance: 0.075 nH

Length: 0.039 in
Width: 0.01 in ( 0.25 mm ) Inductance: 0.464 nH
Width: 0.02 in ( 0.51 mm ) Inductance: 0.368 nH
Width: 0.03 in ( 0.76 mm ) Inductance: 0.309 nH
Width: 0.039 in ( 0.99 mm ) Inductance: 0.269 nH
Width: 0.049 in ( 1.24 mm ) Inductance: 0.239 nH
Width: 0.059 in ( 1.5 mm ) Inductance: 0.216 nH
Width: 0.118 in ( 3.0 mm ) Inductance: 0.151 nH

Length: 0.197 in
Width: 0.01 in ( 0.25 mm ) Inductance: 3.868 nH
Width: 0.02 in ( 0.51 mm ) Inductance: 3.34 nH
Width: 0.03 in ( 0.76 mm ) Inductance: 3.003 nH
Width: 0.039 in ( 0.99 mm ) Inductance: 2.756 nH
Width: 0.049 in ( 1.24 mm ) Inductance: 2.563 nH
Width: 0.059 in ( 1.5 mm ) Inductance: 2.404 nH
Width: 0.118 in ( 3.0 mm ) Inductance: 1.81 nH

Length: 0.394 in
Width: 0.01 in ( 0.25 mm ) Inductance: 9.107 nH
Width: 0.02 in ( 0.51 mm ) Inductance: 8.04 nH
Width: 0.03 in ( 0.76 mm ) Inductance: 7.354 nH
Width: 0.039 in ( 0.99 mm ) Inductance: 6.85 nH
Width: 0.049 in ( 1.24 mm ) Inductance: 6.452 nH
Width: 0.059 in ( 1.5 mm ) Inductance: 6.123 nH
Width: 0.118 in ( 3.0 mm ) Inductance: 4.867 nH

Length: 1 in
Width: 0.01 in ( 0.25 mm ) Inductance: 27.842 nH
Width: 0.02 in ( 0.51 mm ) Inductance: 25.116 nH
Width: 0.03 in ( 0.76 mm ) Inductance: 23.357 nH
Width: 0.039 in ( 0.99 mm ) Inductance: 22.059 nH
Width: 0.049 in ( 1.24 mm ) Inductance: 21.03 nH
Width: 0.059 in ( 1.5 mm ) Inductance: 20.178 nH
Width: 0.118 in ( 3.0 mm ) Inductance: 16.885 nH

Length: 1.969 in
Width: 0.01 in ( 0.25 mm ) Inductance: 61.566 nH
Width: 0.02 in ( 0.51 mm ) Inductance: 56.187 nH
Width: 0.03 in ( 0.76 mm ) Inductance: 52.715 nH
Width: 0.039 in ( 0.99 mm ) Inductance: 50.148 nH
Width: 0.049 in ( 1.24 mm ) Inductance: 48.111 nH
Width: 0.059 in ( 1.5 mm ) Inductance: 46.423 nH
Width: 0.118 in ( 3.0 mm ) Inductance: 39.876 nH

Length: 3.937 in
Width: 0.01 in ( 0.25 mm ) Inductance: 136.978 nH
Width: 0.02 in ( 0.51 mm ) Inductance: 126.21 nH
Width: 0.03 in ( 0.76 mm ) Inductance: 119.255 nH
Width: 0.039 in ( 0.99 mm ) Inductance: 114.109 nH
Width: 0.049 in ( 1.24 mm ) Inductance: 110.025 nH
Width: 0.059 in ( 1.5 mm ) Inductance: 106.638 nH
Width: 0.118 in ( 3.0 mm ) Inductance: 93.477 nH