Page 2 of 2

Re: Automatic shutdown mods

Posted: October 2nd, 2017, 6:47 pm
by Roberts_Clif
It has been a long time let me think. If you put AC across a Capacitor, you will have capacitor guts all over the room.
I believe this is still correct. AC travels thru a capacitor and DC is stored in a capacitor.


Did you mean the signal side of the Solid state relay maybe this will work. However a pull-up resister on D12 may never let you turn it off.

Re: Automatic shutdown mods

Posted: October 2nd, 2017, 7:00 pm
by ieatacid
I meant the AC side, whoops.

Re: Automatic shutdown mods

Posted: October 3rd, 2017, 3:53 pm
by ieatacid
For anyone following along and planning to do this, you need to define POWER_SUPPLY as 2 in Configuration.h.

Conditionals_post.h illustrates why:

Code: Select all

  #if (POWER_SUPPLY == 1)     // 1 = ATX
    #define PS_ON_AWAKE  LOW
    #define PS_ON_ASLEEP HIGH
  #elif (POWER_SUPPLY == 2)   // 2 = X-Box 360 203W
    #define PS_ON_AWAKE  HIGH
    #define PS_ON_ASLEEP LOW
  #endif
This way it sets D12 to HIGH (5V) and the relay latches, keeping power on, and sets D12 to LOW (0V) to cut off power and M80/M81 will behave as they should.

Re: Automatic shutdown mods

Posted: October 9th, 2017, 8:58 am
by Roberts_Clif
Do you have any updates for the Solid State AC Relays

Re: Automatic shutdown mods

Posted: October 9th, 2017, 9:29 am
by ieatacid
I have everything wired up, I just need to connect to the printer's power supply and test it.

I wound up designing my own, smaller enclosure, that includes a place to hold the capacitor securely, a 30x30 fan and vents. I decided to add the capacitor because if OctoPrint restarts for any reason (installing a new plugin, for example) it resets the ramps board which would cause the relay to unlatch and I'd have to push the start button again. Not a huge inconvenience but I wanted to make it as smooth as possible. I also added an inline fuse on the hot lead coming right from the mains power.

The cap is 10v, 22mF (millifarad) -- or 22000uF (microfarad) -- which should (in theory) give it 2-3 seconds of power to the 5v side of the relay to keep it latched during a reset.

Hopefully I get a chance to test it after work today. If all goes well I'll update and include a link to the capacitor I used.
20171009_091307.jpg

Re: Automatic shutdown mods

Posted: October 9th, 2017, 10:31 am
by Roberts_Clif
ieatacid wrote: October 9th, 2017, 9:29 am The cap is 10v, 22mF (millifarad) -- or 22000uF (microfarad)
Strange have worked in Electronics most of my life and this is the first time have heard millifarad when referring to a capacitor,
I know millifarad exist, have only hear of capacitors referred to as farads, microfarads and picofarads and on rare occasions pF as (micromicrofarads).

Scanned the web for a millifarad capacitor and found this.

Technically ‘mfd’ represents ‘milliFarad’ while ‘uF’ stands for ‘microFarad’ which is an order of magnitude smaller. Here is where the confusion begins. Some older capacitor manufacturers used ‘mF’ in place of uF on their capacitors. Whether it was because their machines could not imprint the correct symbol ‘µ’ or for another reason not known to us, this was the common practice.

Thank you for the nostalgia

Re: Automatic shutdown mods

Posted: October 9th, 2017, 10:37 am
by ieatacid
pF is picofarad. You can get 1 farad caps for car audio systems that go for around $70 and up, and they're about the size of beer cans.

Here's the one I'm using: http://www.mouser.com/Search/ProductDet ... KW1A223MRD

Re: Automatic shutdown mods

Posted: October 9th, 2017, 8:26 pm
by ieatacid
It works! Have to hold the button down a few seconds to power up, but it stays on whenever OctoPrint reboots and when the ramps board resets, which is what I was going for. There's about a two second delay after sending M81 until it turns off because of the capacitor but that's no big deal.

Re: Automatic shutdown mods

Posted: October 9th, 2017, 9:13 pm
by Roberts_Clif
Works almost exactly as was predicted.

Re: Automatic shutdown mods

Posted: October 9th, 2017, 9:19 pm
by ieatacid
Here's a schematic I made that's exactly how I wired it. Tomorrow, after work, I'll try and upload the files for the enclosure I made and I'll update the first post with links to parts I used, etc.
auto_off_schematic.png

Re: Automatic shutdown mods

Posted: October 9th, 2017, 9:31 pm
by Roberts_Clif
Thank you for providing the Circuit diagram.