User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

connect_sevenswitch_to_ramps [2016/06/19 23:49]
Traumflug Link to the RepRap wiki until we have the SevenSwitch pages here.
connect_sevenswitch_to_ramps [2018/05/27 16:10]
Line 1: Line 1:
-====== Connect a SevenSwitch to a RAMPS ====== 
-One of the oddities of the RepRap community is the heated bed circuitry on the very popular RAMPS controller. It's undersized for modern beds and this is known for years. Even a [[http://​​wiki/​RAMPS_1.4#​RAMPS_1.4.2|claim of a fix]] exists, but such fixes aren't recognized by cheapo-china,​ where everybody buys, so the undersized variants are found about everywhere. 
-Anyways. One of the solutions to work around this situation is to use a [[http://​​wiki/​SevenSwitch_1.2|SevenSwitch]] to do the hard work. Here we show how to connect this switch to a RAMPS and how to tweak the popular firmwares to work with the new switch instead of the old one. 
-===== Finding a Signal Pin ===== 
-{{ :​sevenswitch:​ramps_1.4_servo_connector.jpeg?​300|The red oval marks the Servos connector.}} 
-First step is to find an appropriate signal pin on the RAMPS. "​Signal"​ means, a pin which can be switched between 0\_V and 5\_V by the firmware, preferably using PWM. A RAMPS has a whole lot of extension connectors, we choose the //Servos// one. This connector features 4 PWM-able signal pins as well as convenient GND pins. 
-Some vendors solder in pins there already, others don't. If there are none, you have to do this yourself. Standard 0.1" spaced pins are fine. Another option is to solder the signal wire directly into the board. 
-<​html><​div style="​clear:​both;"></​div></​html>​ 
-{{ :​sevenswitch:​ramps_1.4_servos_pinout.png?​300|Pinout of the RAMPS Servos connector(s).}} 
-There are 4 signal pins available for interfacing in the servo section: D4, D5, D6 and D11. Each of them works equally well. Connecting more than one SevenSwitch is possible, too. 
-===== Wiring ===== 
-{{ :​sevenswitch:​sevenswitch_1.2_ramps_wiring.jpeg?​600 }} 
-The above picture shows how things get together: 
-  * Thin lines are signal wires which draw negligible current, so one can use thin wires. Typically used wire is 0.14\_mm² or AWG\_35. 
-  * The green line is the signal wire. Voltage on this one turns the switch on and off. 
-  * Thick lines mean wires carrying substantial current, so it needs thick wires. Required thickness depends on the current going to the heated bed; using a 1.5\_mm² (AWG\_15) wire is almost always sufficient. For a little extra bed power, many use 2.5\_mm (AWG\_11) size. 
-  * Dismantling an old power cable meant to connect a 110/​230\_volts device to mains power is a convenient way to harvest such thick wires. Works on 12\_volts just fine. 
-  * As well, chopping the cable from any old electrical device that connects to a wall outlet is a cheap way to obtain such wires. 
-  * Power supply doesn'​t have to be the same as the one supplying RAMPS and stepper motors. A separate one works entirely fine. 
-  * Polarisation of these two wires going to the heated bed doesn'​t matter. 
-  * Do not connect the heated bed, yet. Without the bed connected there are no currents flowing, so nothing can overheat. The green LED will show wether the switch is working. 
-===== Firmware Modification ===== 
-One obvious task left is to tell the firmware which pin to use to switch the heated bed. How to do this depends a bit on the used firmware. 
-There are several pin naming schemes in use. This table shows different names for the same pin. Teacup Firmware allows two names, each of them works equally well: 
-^RAMPS ^ [[https://​​en/​Hacking/​PinMapping2560|Arduino]] ^ ATmega ^ Timer((This is the internal name of the timer used to do PWM on this pin. Use this name when investigating wether a particular firmware uses this timer for other purposes, making PWM on this pin unavailable.)) ^ Teacup ^ Marlin ^ Remarks ^ 
-^    D4|   ​D4| ​ PG5|  OC0B|   ​DIO4\_or\_PG5| ​  4| | 
-^    D5|   ​D5| ​ PE3|  OC3A|   ​DIO5\_or\_PE3| ​  5| | 
-^    D6|   ​D6| ​ PH3|  OC4A|   ​DIO6\_or\_PH3| ​  6| | 
-^   ​D11| ​ D11|  PB5|  OC1A|  DIO11\_or\_PB5| ​ 11|PWM unavailable when using Teacup or Marlin firmware((These firmwares use OC1A as stepper timer.)) | 
-==== Teacup ==== 
-{{ :​sevenswitch:​teacup_bed_pin_change.png?​300|Here a heater pin gets changed.}} 
-Launch Configtool, go to the board panel, then to the heater panel, then mark the line for the bed and click on //Modify//. Select the new pin, click on //Save//, build and upload the firmware. 
-==== Marlin ==== 
-For the actual code, depending on which version of RAMPS you have there will be a ''​pins.h'',​ or ''​pins_ramps_13.h''​ if you have the Makerfarm Pegasus, file that has a few lines that will need to be changed. There should be between 1 and 2 lines that have a value that need to be changed. Typically the line will be: 
-  #define HEATER_BED_PIN ​    ​8 ​   // BED 
-We will use pin D4 for the new SevenSwitch. This will need to be changed to: 
-  #define HEATER_BED_PIN ​    ​4 ​   // BED 
-Or whatever pin you decide to use. Once this is done, from within the Arduino software, go to the corresponding pins file and confirm the changes. After that you can upload the firmware and proceed to testing. 
-===== Why not ... ===== 
-Some people tend to try connecting a SevenSwitch a different way. Let's elaborate on this. 
-==== ... using D8, the original heated bed connector? ==== 
-Using D8 is a possible, but poor choice for several reasons: 
-  * D8 is switched by a high current MOSFET, which is like using a truck for transporting a single cookie. There'​s no need for this MOSFET. 
-  * Due to being behind a MOSFET, signal on D8 is inverted. Without firmware modification,​ commanding the heater to be off turns it actually on and vice versa. 
-  * There are better uses for this output, e.g. for driving a fan, lighting, heaters, whatever draws less than 10\_amps and has no coil inside. 
-  * If the RAMPS is operated with 24\_volts, it'll destroy the SevenSwitch'​s signal pin, which can withstand 20\_V, only. 
connect_sevenswitch_to_ramps.txt · Last modified: 2018/05/27 16:10 (external edit)