Welcome! Log In Create A New Profile

Advanced

Marlin, RAMPS 1.4 and SevenSwitch - pin changes

Posted by RGN01 
Marlin, RAMPS 1.4 and SevenSwitch - pin changes
June 23, 2015 05:56PM
Can someone please help me?

I've built a SevenSwitch to control the bed heater to eliminate the mechanical relay because ultimately I'd like to use PID PWM heating for the bed. The D8 output isn't suitable because the negative pin is switched. I therefore need to find a pin on the RAMPS board I can use. How do I do this?

The pins.h file has this entry:
#define HEATER_BED_PIN      8

I guess that means that the bed heater (D8 pair) is fed from pin 8 of the Arduino through a FET. If I choose another pin, is it just a matter of changing this entry to a free pin to free up this FET output for fans etc?

Next question - how do I identify a free pin? It seems to be in pins.h but I'm not comfortable reading the programming logic to find an unused pin. I read somewhere that 44 is usually free - how can I verify this?

If I'm only going to be using one servo, is there any reason not to use the output for the 4th servo - Pin 4 - for the bed heater?

Thanks.

Richard

Edited 2 time(s). Last edit at 06/23/2015 06:51PM by RGN01.
Re: Marlin, RAMPS 1.4 and SevenSwitch - pin changes
June 24, 2015 03:56AM
I just read the SevenSwitch Wiki and don´t see, why you can´t use the D8 terminal?
Just wire GND to GND and signal to +12V.
Only when the MOSFet on the ramps switches the "-" terminal of D8 to ground, you see 12V at the signal input of the SevenSwitch.

But you can use a servo connector as well. Just make sure, the MOSFet of the SevenSwitch can switch ON at voltages lower than 5V. (Arduinos 5V regulator is weak)
-Olaf
Re: Marlin, RAMPS 1.4 and SevenSwitch - pin changes
June 24, 2015 02:05PM
Thanks for your response Olaf. My plan was to use the D8 FET combination for another purpose - a fan - so I wanted to free it if possible.

I have added a 5V regulator to the mix - it feeds the appropriate ground and +5V pins on Aux1 - this was mainly to stop problems with the LCD unit I have attached. It was 'dimming' and the messages were corrupted. Adding a 5V external supply has almost completely removed that problem.

I'm about to delve into pins.h to try to change the configuration to pin 4 - wish me luck!

Richard

Edited 1 time(s). Last edit at 06/24/2015 02:23PM by RGN01.
Re: Marlin, RAMPS 1.4 and SevenSwitch - pin changes
June 24, 2015 04:36PM
Success. The bed heater is now on pin4 and I'm currently doing a PID calibration.

I had to change pins.h in two places (line 51 and 215) - my pins.h file is attached. Note that I have removed all that was not obviously RAMPS and Arduino Mega256.

I then enabled PID bed heating, ran a PID Autotune [reprap.org] - the bed now stays within 1°C of the desired temperature.

Pin 8 and D8 are now free for use by an extra fan. My next step is adding a second extruder and hotend and when I do that I'll add another fan.

Richard
Attachments:
open | download - pins.h (13.9 KB)
Re: Marlin, RAMPS 1.4 and SevenSwitch - pin changes
August 17, 2016 01:45AM
Hi RGN01,

I also built a sevenswitch, connected through Pin 4 but cannot achieve the results.

I don't feel the FET on sevenswitch heated. Niether the temp on LCD rises.

Can you post a picture of your sevenswitch.

Also can you post your config.h file.

Thanks.
Re: Marlin, RAMPS 1.4 and SevenSwitch - pin changes
August 17, 2016 04:29AM
Quote
o_lampe
I just read the SevenSwitch Wiki and don´t see, why you can´t use the D8 terminal?

It's at the bottom of that page.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Marlin, RAMPS 1.4 and SevenSwitch - pin changes
August 18, 2016 05:19AM
Hi Traumflug,

I have successfully built and run sevenswitch 1.2.

Just want to confirm whether I should comment the PID temparature control in Marlin.

As you mentioned Bang-bang temparature control in Sevenswitch wiki.

Countermeasures:
Lower PWM frequency. For example, comment out FAST_PWM in Teacup's config.h.
Use a bang bang temperature control. For Teacup, also use BANG_BANG_ON = 255.


Are the above countermeasures only for TeaCup or also for Marlin?

Regards,
Prashant

Edited 1 time(s). Last edit at 08/18/2016 05:19AM by prashantdshinde.
Re: Marlin, RAMPS 1.4 and SevenSwitch - pin changes
August 18, 2016 05:44AM
Quote
prashantdshinde
Just want to confirm whether I should comment the PID temparature control in Marlin.

Does the MOSFET get hot? Like hot enough to unsolder its self? Like above 150 °C? In the very unlikely case it does, you have to go with bang-bang.

To find out, put your finger on the MOSFET and turn the heater on. If it doesn't hurt within the first minute, all is fine.

Also, PWM != PID. One can do PWM with bang-bang, which is just as harmful/harmless as PWM with PID. It's the PWM which causes many switches, which in turn heats up undersized MOSFETs. PID is just a strategy for deciding wether and how much to turn on the heater on or not.

Quote
prashantdshinde
Are the above countermeasures only for TeaCup or also for Marlin?

A SevenSwitch doesn't care (or recognize) which firmware creates the signal.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Marlin, RAMPS 1.4 and SevenSwitch - pin changes
August 19, 2016 01:15AM
Hi Traumflug.

The MOSFET does not get hot but it take about 2 - 3 minutes to get upto 50 deg C from ambient room temp.
Sorry, only registered users may post in this forum.

Click here to login