Welcome! Log In Create A New Profile


Arduino Due + RAMPS-FD, PS_ON pin goes high on reset problem.

Posted by ld 
Arduino Due + RAMPS-FD, PS_ON pin goes high on reset problem.
October 10, 2016 07:39AM
Hello all.
I am modifying my custom delta to work with 32-bit hardware (modified RAMPS-FD from Geetech + Arduino DUE, repetier firmware) and want to be able to turn on/off power supply from arduino side.
I have separate 5v power rails and 24v supply. The connection follows diagram described in the wiki.
The problem is that on each board reset pin 53(B14), marked PS_ON on Ramps-FD, goes high for a short period of time. Problem is observable with both SSR an EM relays. Firstly ordinary electromechanical relay was used, but it cannot handle surge current well so I switched to SSR.
From my understanding pins should be in high impedance input state on the start. So resistor to the ground should secure LOW pin state on boot. Problem can be observed with Repetier firmware and even with simple blink sketch, pin 53 configured as OUTPUT LOW.

What I have tried already:
1.Transistor switch connected to SSR relay, 1.8K pull-down resistor on Pin 53. PSU turns on for short time on Due reset.
1.Inverted logic with transistor NOT gate, 1.8K pull-up resistor on Pin 53. Works fine, but in error state or line brake condition PSU turns on which is not safe behavior.
2.RC delay filter + transistor switch, 1.8K pull-down resistor on Pin 53. Works great and dumps out fast switching. But I feel like it is not correct solution as it is more a software problem than hardware (Due initialization code? Bootloader? Can't find anything that can be responsible for this in the Arduino repo.).

So, my question what may cause such odd behavior? Pin goes high on reset even with pull-down resistor, nothing is connected to the pin except relay.
Thank you.

Edited 1 time(s). Last edit at 10/10/2016 08:54AM by ld.
Re: Arduino Due + RAMPS-FD, PS_ON pin goes high on reset problem.
October 10, 2016 08:45AM
Sounds like a firmware or bootloader issue to me. On reset, the internal pullup resistor of about 100K in the microcontroller is enabled, so the output will be pulled high, but that is easily defeated by a 4.7K pulldown resistor. This is the arrangement that the Duet 0.8.5 and and Duet WiFi use to drive the PS_ON mosfet.

Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Arduino Due + RAMPS-FD, PS_ON pin goes high on reset problem.
October 29, 2016 10:54AM
If anyone curious the problem was caused by CAN1 initialization in the DUE init code.
I have commented CAN1 section and now PS_ON pin works like it should.
line 406, arduino\hardware\sam\1.6.9\variants\arduino_due_x\variant.cpp:
// Initialize CAN pins
  //  g_APinDescription[PINS_CAN1].pPort,
  //  g_APinDescription[PINS_CAN1].ulPinType,
  //  g_APinDescription[PINS_CAN1].ulPin,
  //  g_APinDescription[PINS_CAN1].ulPinConfiguration);

dc42, for next my machine I will buy Duet board, too much effort to fix all problems with Geetech RAMPS-FD.
Sorry, only registered users may post in this forum.

Click here to login