author

mecanicafina

34
Inbox View Profile
5Instructables93,358Views48Comments

Tell us about yourself!

Achievements

10K+ Views Earned a bronze medal
  • Spot Welder 1-2-3 Arduino Firmware

    I do not share personal information, you can post comments here.

    View Instructable »
  • Spot Welder 1-2-3 Arduino Firmware

    Please see the link to the code repository at the end of the instructable.

    View Instructable »
  • Spot Welder 1-2-3 Arduino Printed Circuit Board

    Hi Thomas,look like a nice and clean build! Glad you found it useful and thanks for the posting the pics!

    View Instructable »
  • Spot Welder 1-2-3 Arduino Printed Circuit Board

    Hi Thomas,not exactly, in northern Europe, and safe for now thanks. We all hope it stays that way, and that the situation in Italy will improve soon. 1 - Thanks, I now understand what you meant. We have something similar over here where 3-phase is often delivered to residential homes, then each phase is used separately (with the neutral) to provide 240V 16A per phase. This allows e.g. to run 7 kW electric cooking stoves using two of the three phases. Back to your question, I understand the 240V voltage comes from a transformer secondary which is center tapped to provide the two 120V lines and the neutral wire into your home. I would expect no problems connecting the circuit to the 240V voltage if this is the case.2 - Understood. I would mount the triac on a dissipator which is good practi…

    see more »

    Hi Thomas,not exactly, in northern Europe, and safe for now thanks. We all hope it stays that way, and that the situation in Italy will improve soon. 1 - Thanks, I now understand what you meant. We have something similar over here where 3-phase is often delivered to residential homes, then each phase is used separately (with the neutral) to provide 240V 16A per phase. This allows e.g. to run 7 kW electric cooking stoves using two of the three phases. Back to your question, I understand the 240V voltage comes from a transformer secondary which is center tapped to provide the two 120V lines and the neutral wire into your home. I would expect no problems connecting the circuit to the 240V voltage if this is the case.2 - Understood. I would mount the triac on a dissipator which is good practice anyway and expect still the transformer to be the bottleneck. Yes, you could add a cool down delay in the code, and maybe a thermal safety using the EXT connector and support code. This is tricky however to get right, as you would need to measure the transformer temperature where it gets hot, i.e. in the secondary copper winding either to find the appropriate delay or to feed the thermal probe. It can be done but is going to be trial and error, and I would stay on the safe side given the difficulty of accurate temperature measure where it really matters.3,4 - happy to help!

    View Instructable »
  • Spot Welder 1-2-3 Arduino Printed Circuit Board

    Hi Thomas,here are some clarifications, I hope they will help you.1-> don’t understand clearly the question, so I am shooting a bit in the dark. If you mean to want to use a 3 phase system and connect the circuit between two phases, I do not think it will work (I would expect the power supply to require single phase + neutral conductor wiring, but don’t have access to the internal schematic). If you means a one phase system with single phase + neutral conductor writing, yes, it will work as is.2-> The bottle neck is not likely to be the triac, but the transformer. The real issue is not the inrush, but the short-circuit current (the secondary is “ almost” shorted while welding). You have to keep the on state of the MOT short and allow for cooling. Heat management can otherwise defini…

    see more »

    Hi Thomas,here are some clarifications, I hope they will help you.1-> don’t understand clearly the question, so I am shooting a bit in the dark. If you mean to want to use a 3 phase system and connect the circuit between two phases, I do not think it will work (I would expect the power supply to require single phase + neutral conductor wiring, but don’t have access to the internal schematic). If you means a one phase system with single phase + neutral conductor writing, yes, it will work as is.2-> The bottle neck is not likely to be the triac, but the transformer. The real issue is not the inrush, but the short-circuit current (the secondary is “ almost” shorted while welding). You have to keep the on state of the MOT short and allow for cooling. Heat management can otherwise definitively become a concern, as the current in the MOT secondary is so high that it may and will eventually melt the isolation on the copper wire if you either keep it on for more that a (very) few seconds or do not allow for heat dissipation between welding cycles. 3.1 - You mention in a comment that “all resistors are 1/2 Watt except R4, which is 1.5 Watt (or more).” -> Point taken. It is R1.3.2 - there are three package sizes for the resistors in the BOM. R3 is listed as 0207/10 which seems to suggest a higher power rating? -> higher power rating not necessary, they can be all 1/4 W. 4 - -> The number after the K refers to RMS rating for some MOV’s, but to DC rating for others. Depends on producer. Very confusing and dangerous industry practice. The BOM is for RMS rating.The links are to DC-rated MOV’s. Voltage sizing: Rule of thumb for sizing is to use, say, 20% RMS MOV rating over the nominal RMS rating of the supply. This is to allow for fluctuations on the high side of the supply RMS voltage that should not trigger the MOV response. For 240V nominal, I suggested a 275V MOV, for 120V nominal the MOV rating would be 150V. If you were to use a 275V MOV on a 120V line the MOV will not “catch” voltage spikes as high as twice the nominal supply voltage.

    Hi Claustro,some of your comments lead me to revisit the instructable and to make couple of corrections, my thanks for that. For your questions:1 - I have updated the code on the repository to version 1.1 which is now aligned with version 1.1 of the PCB. Now the pins are consistent and they are A0 A1 A2.2 - Don’t know about this, mine works fine, but try again please after rewiring and upgrading the firmware.3 - There is no support in FW 1.1 for the buzzer.It is not hard to do, but somehow never got around to do it. See comment on line 379 for a hint.Again, thanks for pointing out the inconsistency.

    Sorry for pointing you in the wrong direction. There is no support in the firmware v1.1 for the buzzer. It is not hard to do, but somehow never got around to do it in the final version. See comment on line 379 for a hint.

    View Instructable »
  • Spot Welder 1-2-3 Arduino Printed Circuit Board

    It should work, is an equivalent with higher rated collector current which you do not need but it will not hurt.

    View Instructable »
  • Hi, most likely you have swapped some connection on the transistor or the buzzer. This assuming transistor and buzzer are the right type. Unfortunately I am away with no access to the lab for a couple of weeks, so my suggestion is to double check all connections and polarities. Good luck!

    View Instructable »
  • Hi,1) The PCB requires the 3W variant, the 5W I suspect you have is too big.2-9) I don't understand the pin numers you use here, all connections are as per schematic. 5), yes, it is the front panel connector for encoder, push button and led. 6) is used to flash the MCU without removing it from PCB, see remark added in the instructable. 7) You don't need to use the EXT connector, see remark in the instructable.

    1) You must have the 5W version that has a larger form factor, the PCB is made for the 3W version.2-9) I don't understand the PIN numbers you mention here, all is as per schematic, the mains connector is marked also "mains" on the PCB. Yes, PNL is the front panel connector for encoder push button and led. You don't need to use the EXT connector, that is for future expansion. Finally, the jumper JP1 marked PRG is to temporarily open the power supply connection if you need to flash the firmware for the MCU without removing it from the PCB.I think I will add a note about the required power supply version and the PRG jumper to the instructable.

    View Instructable »
  • I did https://www.instructables.com/id/Spot-Welder-1-2-3-Arduino-Printed-Circuit-Board/

    Hi, I am not sure how I can helpyou with your question, the power circuit just has a handful of components andthere is plenty of pictures (if that is what you mean by real life circuit). Asfar as wire gauge is concerned, I would recommend 2.5 mm2 for the brown wiresin the picture, 1.5 for the blue and green. Of course, assuming they arereasonably short (max 25-30cm). Beware however that this is not the right kindof project to start playing with electronics if you do not have much experiencewith electric circuits. In any case, I just followed up on this instructable with details on a professional PCB for the project: https://www.instructables.com/id/Spot-Welder-1-2-3-Arduino-Printed-Circuit-Board/

    View Instructable »
  • Hi, I actually did all that, only did not take the time yet for the write up. I guess having someone asking for it is good motivation to get it done. Say within 3-4 weeks it should be online. Would that help?

    View Instructable »
  • Glad to hear it is solved now. BTW, library compilation/linking issues are a recurring trouble in C/C++ development, so it is only normal you had some as you are new to the dev platform. Out of interest, what are the pulse durations and the nickel strip thickness you are using for 18650 cells?

    View Instructable »
  • Hi, this is nor a source code issue, is a build system setup problem. Your library setup is not correct (you either did not install the library or the compiler is not is finding them). Late with replying, so I hope you fixed this in the meantime.

    View Instructable »
  • Hi, they are in the firmware code, lines 25-30.

    View Instructable »
  • Hi, design principle i like a lot is "just enough", i.e. don't overload your code with features if you don't need them. I just wanted/needed to use ASCII, so indeed I chose for a smaller footprint library.

    View Instructable »
  • Hi, nice you are building this. The answer to your question is... nowhere!Sometimes we can’t find something because it is not there. In fact the durations are stored as floats in the EEPROM, read back as a float on line 240, then printed straight away on line 103. Hope this helps!

    View Instructable »
  • Hi, I don’t mean to patronize, but your questions raises a concern that you maybe can not properly read the schematic, from which it is clear that the push button is not on the mains side of the circuit. Momentary push button means the button closes a contact when it is pressed and while it is pressed, and opens the contact when it is released. Please do not attempt do build this circuit if you are not familiar with electricity, this can be very dangerous. A mains operated circuit is not the place the gather basic skills.

    View Instructable »
  • Hi, yes it is ok from what I can see it just has a slightly higher voltage rating. Nice you plan to build this.

    View Instructable »
  • The discharge current through the resistor is not constant, but decays exponentially to zero. The initial value with your numbers is 400/2200 A indeed, but this is only true for an instant and the current goes to zero with a time constant RC. This means that the capacitance you are trying to discharge also plays a role in addition to the initial voltage.

    View Instructable »
  • I believe it should be fine - saying this just based on the MOC3052 datasheet, did not test it.

    View Instructable »
  • Hi Fabiano, welding control push button is on pins 1 and 2 of the J2 connector “Panel” in the schematic, see Step 5.

    Hi, you got an encoder with a breakout board and the connections are different (see http://henrysbench.capnfatz.com/henrys-bench/arduino-sensors-and-input/keyes-ky-040-arduino-rotary-encoder-user-manual/ ). I am not sure about encoder library support for this one, and it may need code modifications, so my advise would be to just get a simple naked encoder (without break board) like the one I used as the fastest path to success.

    View Instructable »
      • Spot Welder 1-2-3 Arduino Firmware
      • Safe Capacitor Discharge Tool
      • Wedges for Drill Chuck Removal
  • Hi there, glad you liked this project and have a use for it. For your questions, all resistor are 1/2 Watt except R4, which is 1.5 Watt (or more). The trailing R in the resistance value (as in 39R, 360R) means Ohm. So 39R is 39 Ohm, etc. In the old days it was not common to be able to print an omega greek letter as a symbol for Ohm (as in physics texbooks), so engineers used an R in schematics. The R was either used at the end as in 360R=360 Ohm or to indicate fractional values in lieu of the decimal point, as in 1R5 = 1.5 Ohm.

    View Instructable »
  • Not really.It is more an habit of mine not to always start from the 0 address. Rationale is that the number of EEPROM write cycles is limited, so if I write all my sketches using always the first few bytes of the EEPROM (and keep using the same MCU for many initial development/debugging cycles), I may eventually hit it. So I use a #define that I can easily change from time to time.

    View Instructable »
  • Good to hear the encoder is ok! The 128x64 display should show some text, I tested one here, if you don't see anything two things that I would check are the wiring and that your display has indeed a I2C interface, not SPI.

    View Instructable »
  • Hi,Depends a bit on your encoder, but assuming your encoder looks like this one (most common type):http://www.learningaboutelectronics.com/images/Rotary-encoder-pinout.pngYou would connect A0 to pin A, A1 to pin B, GND to ground. With reference to the schematic, on connector J2, this is pin 6 to pin A, pin 5 to pin B, pin1 to GND. Now by rotating the encoder to the right the menu number is meant to increase (e.g. move from Profile 1 to Profile 2). Should it decrease, just swap the connections on pin A and pin B to correct. Th encoder has two more terminals for the push switch on the opposite side that you can’t see in the picture in the link. Connect one of them to A2 (pin 4 on J2), and the other to GND. The switch has to be able to ground A2 to provide a LOW logic level, so if yo…

    see more »

    Hi,Depends a bit on your encoder, but assuming your encoder looks like this one (most common type):http://www.learningaboutelectronics.com/images/Rotary-encoder-pinout.pngYou would connect A0 to pin A, A1 to pin B, GND to ground. With reference to the schematic, on connector J2, this is pin 6 to pin A, pin 5 to pin B, pin1 to GND. Now by rotating the encoder to the right the menu number is meant to increase (e.g. move from Profile 1 to Profile 2). Should it decrease, just swap the connections on pin A and pin B to correct. Th encoder has two more terminals for the push switch on the opposite side that you can’t see in the picture in the link. Connect one of them to A2 (pin 4 on J2), and the other to GND. The switch has to be able to ground A2 to provide a LOW logic level, so if you connect them both to 5V and A2 you would never be able to set A2 to LOW.All analog pins on Arduino are actually GPIO pins like the “digital” pins. Basically being “analog” means they can be used in combination with the internal A/D converter as analog input pins, but they don’t have to. On your last question, changing the display size is a bit harder to get right. You can just change the call oled.begin(&Adafruit128x32, I2C_ADDRESS) to oled.begin(&Adafruit128x64, I2C_ADDRESS), that will “work” as the library will handle it just fine, but the UI will not look good because the font sizes and the position of the text is designed for a smaller screen. So you will need to make quite some changes in the display & UI section of the code to get it right.Stay tuned as I am planning to write a follow-up instructable providing a single complete schematic, PCB design and layout, and some building tips.Hope this helps!

    View Instructable »
  • Hi, just one note on the varistor rating. If you are in a 220-240V mains voltage country you will need one rated for 430V peak value, coded S20K431. Most varistors are coded using the peak value, not the RMS value, so there is potential for some confusion and smoke here. I have changed the component name in the schematic and added an explanation in the text. Would be nice to see a picture here when you finish the project!

    View Instructable »
  • Hi, please pause right here in your build... WARNING: R3 on the power control circuit is not a potentiometer, it is a varistor. The symbol is different. The 20 in the type string is the disk diameter for a disk varistor. The K in the type string is the tolerance class, not the K abbreviation for the Kilo prefix. Please google for "S20K275 varistor" and you will easily find relevant datasheets.

    View Instructable »
  • It is just a default that can be changed within the code. Feel free to experiment, if you go too low however you will at some point hit some constraint like the timer resolution on the MCU or transient core magnetization effects in the MOT.

    About the display: Any 128x32 with I2C support and an SSD1306 controller would require no changes to the code, I used this one (https://www.aliexpress.com/item/Free-Shipping-0-91-Inch-128x32-IIC-I2C-White-OLED-LCD-Display-DIY-Oled-Module-SSD1306/32794583827.html)

    View Instructable »
    • Spot Welder 1-2-3 Arduino Firmware
      9,954 views
      183 favorites
      13 comments
  • Hi, not all at all, but of course it is not in a closed enclosure yet. I think I will mount the triac in contact with the enclosure metal wall to stay on the safe side and get rid of the heatsink for the final build.

    View Instructable »
  • Hi, yes an SSR can in principle replace the power circuit. You need to pick up one that can be driven by an Arduino pin (consider current draw and input voltage), and it must be designed to drive an inductive load (built-in snubber network and random phase switching). It is not the most common type, but of course they are available.

    View Instructable »
  • Hi, X-type capacitor are actually not hard to find, but looks like to get a search hit you have to look for a specific subclass like X2. If you search for "x2 capacitor 0.01 uF" on amazon or aliexpress you will find them. You need one with a voltage rating higher than your mains voltage. Anyway, you could use a non-X rated capacitor here as long as you mount a varistor as per schematic in parallel to the capacitor. Using an X rated capacitor is just additional safety built in. Should this capacitor fail short, the MOC would be turned on with high current going through R1, and a risk of fire. Notice that as far as upstream current protection devices are concerned this would not look like a fault, as the current absorbed is the same the welder would absorb with the MOC on and the …

    see more »

    Hi, X-type capacitor are actually not hard to find, but looks like to get a search hit you have to look for a specific subclass like X2. If you search for "x2 capacitor 0.01 uF" on amazon or aliexpress you will find them. You need one with a voltage rating higher than your mains voltage. Anyway, you could use a non-X rated capacitor here as long as you mount a varistor as per schematic in parallel to the capacitor. Using an X rated capacitor is just additional safety built in. Should this capacitor fail short, the MOC would be turned on with high current going through R1, and a risk of fire. Notice that as far as upstream current protection devices are concerned this would not look like a fault, as the current absorbed is the same the welder would absorb with the MOC on and the secondary open.

    View Instructable »
  • You are welcome! And if you missed information about the power circuit schematic and components it is there now, so the whole thing is self-contained.

    View Instructable »
    • Safe Capacitor Discharge Tool
      6,423 views
      119 favorites
      18 comments
  • As Fezder already pointed out, 1 mF = 1 milliFarad = 1000 uF. With a 1k resistor the 3RC discharge time is two and half minutes, if you are happy with that 5 watt is plenty as Wo is just under 4W.

    View Instructable »
  • Well spotted and corrected, thank you.

    Thanks for your question. The good news is, you canuse the circuit as is, but there is a catch. I suggest you optimize it for yourapplication, here is why and how. For a 50 mF capacitor charged at 63 V thecircuit as it stands will work. In fact, the max input voltage is 63 V, the maxinput current is 29 mA, and the max instantaneous power dissipated on theresistor is 1,80 W, all well within the component specifications. However thedischarge time constant RC is 110 sec, so for the voltage to drop to 5% of 63Vyou will have to wait 3RC = 330 sec. That is way too long if you do this on aregular basis. To drop RC the only option we have is to lower the value of R,which shortens the safe discharge time, but also increases the powerdissipation in the resistor. Sizing the resistor is a bit tricky …

    see more »

    Thanks for your question. The good news is, you canuse the circuit as is, but there is a catch. I suggest you optimize it for yourapplication, here is why and how. For a 50 mF capacitor charged at 63 V thecircuit as it stands will work. In fact, the max input voltage is 63 V, the maxinput current is 29 mA, and the max instantaneous power dissipated on theresistor is 1,80 W, all well within the component specifications. However thedischarge time constant RC is 110 sec, so for the voltage to drop to 5% of 63Vyou will have to wait 3RC = 330 sec. That is way too long if you do this on aregular basis. To drop RC the only option we have is to lower the value of R,which shortens the safe discharge time, but also increases the powerdissipation in the resistor. Sizing the resistor is a bit tricky because the dissipatedpower decreases exponentially from its initial maximum value. If we were tosize the resistor as if the power dissipated was constant and equal to theinitial value, we would oversize it quite a bit. Here is what I mean.The instantaneous power dissipated in the resistoris given by W(t)=Wo exp (-2t/RC), where Wo=Vo^2/R is the instantaneous powerdissipation when the discharge process is started. Let’s say we want to dropthe safe discharge time to 30 sec. That means RC has to be about 10 sec, thisgives a resistance R of 200 Ohm. Now Wo is almost 20 W, that is a bit of aresistor! Math comes to help, because if we plot the curveW(t) for 0<t<30 we see that the instantaneous power dissipated in theresistor drops under 10 W already after about 3 sec. and under 5 W after about7 sec. This suggests that we can go quite lower than 20 W. A jellybean 200 Ohm 10W resistor mounted on a heatsink will happily handle this (you will need to use an enclosure big enough forthe circuit to accommodate the resistor and heat sink). I am thinking hereabout the jellybean power resistors with aluminum body, and they need a heatsink. You could probably go even lower in terms of wattage but then you wouldreally need to be picky about the construction of the power resistor youchoose, for example try a vetroceramic power resistor. They can glow red for afew seconds and live happily even after. I would not go this route as thosecomponents are quite specialized and may not be easy to source. In summary, swap the 2200 Ohm 3W resistor for a 200Ohm 10W with an adequate heat sink and you’ll be fine.

    Funny, same resistance I picked up for generic usage. I amsuggesting a lower resistance value in my answer to SPenrodbelow because his caps are 50 mF,so I feel the discharge time will be too long. Actually, in your case the discharge time to 5% of the initial 63V should notbe 160 sec, but about 100 sec.

    Thanks for your question. The good news is, you can use the circuit as is, but there is a catch. I suggest you optimize it for your application, here is why and how. For a 50 mF capacitor charged at 63 V the circuit as it stands will work. In fact, the max input voltage is 63 V, the max input current is 29 mA, and the max instantaneous power dissipated on the resistor is 1,80 W, all well within the component specifications. However the discharge time constant RC is 110 sec, so for the voltage to drop to 5% of 63V you will have to wait 3RC = 330 sec. That is way too long if you do this on a regular basis. To drop RC the only option we have is to lower the value of R, which shortens the safe discharge time, but also increases the power dissipation in the resistor. Sizing the resistor is a b…

    see more »

    Thanks for your question. The good news is, you can use the circuit as is, but there is a catch. I suggest you optimize it for your application, here is why and how. For a 50 mF capacitor charged at 63 V the circuit as it stands will work. In fact, the max input voltage is 63 V, the max input current is 29 mA, and the max instantaneous power dissipated on the resistor is 1,80 W, all well within the component specifications. However the discharge time constant RC is 110 sec, so for the voltage to drop to 5% of 63V you will have to wait 3RC = 330 sec. That is way too long if you do this on a regular basis. To drop RC the only option we have is to lower the value of R, which shortens the safe discharge time, but also increases the power dissipation in the resistor. Sizing the resistor is a bit tricky because the dissipated power decreases exponentially from its initial maximum value. If we were to size the resistor as if the power dissipated was constant and equal to the initial value, we would oversize it quite a bit. Here is what I mean.The instantaneous power dissipated in the resistor is given by W(t)=Wo exp (-2t/RC), where Wo=Vo^2/R is the instantaneous power dissipation when the discharge process is started. Let’s say we want to drop the safe discharge time to 30 sec. That means RC has to be about 10 sec, this gives a resistance R of 200 Ohm. Now Wo is almost 20 W, that is a bit of a resistor! Math comes to help, because if we plot the curve W(t) for 0<t<30 we see that the instantaneous power dissipated in the resistor drops under 10 W already after about 3 sec. and under 5 W after about 7 sec. This suggests that we can go quite lower than 20 W. A jellybean 200 Ohm 10W resistor mounted on a heat sink will happily handle this (you will need to use an enclosure big enough for the circuit to accommodate the resistor and heat sink). I am thinking here about the jellybean power resistors with aluminum body, and they need a heat sink. You could probably go even lower in terms of wattage but then you would really need to be picky about the construction of the power resistor you choose, for example try a vetroceramic power resistor. They can glow red for a few seconds and live happily even after. I would not go this route as those components are quite specialized and may not be easy to source. In summary, swap the 2200 Ohm 3W resistor for a 200 Ohm 10W with an adequate heat sink and you’ll be fine.

    View Instructable »
  • You are welcome, thanks for your feedback

    The full voltage could appear at the LED terminals if one of the 1N4007 diodes would fail with an open junction. In that case one of the LED’s would see the full input voltage applied as direct voltage, the other one as reverse voltage. For an input voltage of 300 V one of the LED (hard to say which one) would blow up, however I am not sure it would explode.One could add some sort of overvoltage protection to the circuit of course, but maybe the simplest course of action is to just modify the case using LED mounting holes that are not pass through. The material is “transparent” enough that you would still see the LED lighting up.

    Good point. The resistor fits quite snugly in that milled slot, and I added the braid (from a piece of coax) to improve heat transfer while padding the fit a bit (the resistor body is not a cylinder). I have added some silicone like sealant afterwards anyway to fix everything in place even better. Unfortunately I had already taken the pictures, but I will add a note in the text.

    he full voltage could appear at the LED terminals if one of the 1N4007 diodes would fail with an open junction. In that case one of the LED’s would see the full input voltage applied as direct voltage, the other one as reverse voltage. For an input voltage of 300 V one of the LED (hard to say which one) would blow up, however I am not sure it would explode.One could add some sort of overvoltage protection to the circuit of course, but maybe the simplest course of action is to just modify the case using LED mounting holes that are not pass through. The material is “transparent” enough that you would still see the LED lighting up.

    View Instructable »
    • Wedges for Drill Chuck Removal
      967 views
      19 favorites
      5 comments
  • mecanicafina's instructable Drill Press: Quill Play Fix's weekly stats:
    • Drill Press: Quill Play Fix
      3,337 views
      63 favorites
      4 comments