CNC Plasma Build: Arduino THC debugging/development

Поделиться
HTML-код
  • Опубликовано: 2 авг 2019
  • Upshot: it's a fucking heat thing. The joys of engineering.
    Here's the full plasma build series:
    • CNC Plasma Build (Full)
    This is my Arduino playlist, which includes how I made a functioning torch height controller:
    • Arduino
    Just the LinuxCNC stuff:
    • LinuxCNC Guides
    My Arduino and LinuxCNC code, up on my GitHub:
    github.com/swolebro/swolebro-...
    Help me make more cool shit:
    paypal.me/swolebroshopworks
  • НаукаНаука

Комментарии • 25

  • @UDoIt2
    @UDoIt2 3 года назад

    So hyped for this. I went to Drexel for electrical engineering and I'm a software engineer by day. Thanks for taking the time to produce this video series. I'm digging into it now!

    • @swolebro
      @swolebro  3 года назад +1

      Don't miss the general LinuxCNC videos either. Got a playlist for those:
      ruclips.net/p/PL9xPdBFt5g3Qnn3ZY2wYh7L2yzZ377UwI
      The THC works great, but it wouldn't be any use if I didn't have Linux running the machine.

  • @johannescordier7923
    @johannescordier7923 4 года назад

    yay!! im subbed

  • @izzeyfpv5885
    @izzeyfpv5885 3 года назад

    Where do you get the wires that go to the plasma input of the pcb???

    • @swolebro
      @swolebro  3 года назад +1

      In my case, since I have a Hypertherm plasma cutter, there's a plug on the back that comes from a voltage divider, tapping off the plasma circuit. For other units, you may have to open the casework and install a divider on your own. (Being careful to not leave any high voltage lines exposed, etc.)
      The circuit review (a few videos later on my channel) goes into some more detail on how that divider works.

    • @izzeyfpv5885
      @izzeyfpv5885 3 года назад

      @@swolebro thanks I will be on the lookout when I make a video about it for the moment I subscribe to your channel and activate the bell

  • @superblunt12
    @superblunt12 3 года назад

    I use INPUT_PULLUP so it pull the PIN HIGH through the built in pull up resistor. So if it reads nothing it reads high so no noise.

  • @benbenameur8429
    @benbenameur8429 4 года назад

    Hello
    these 7 seg will display the tension when the plasma cutter on or display just tension ajusted ?

    • @swolebro
      @swolebro  4 года назад

      Sorry, mate, I don't understand the question. Could you possibly rephrase it?
      I've got a few other videos in this series that might answer your question too: ruclips.net/p/PL9xPdBFt5g3SHT1WvcGovHCzQ3Ag_kZeZ

    • @benbenameur8429
      @benbenameur8429 4 года назад

      @@swolebro Hello
      _ I mean when i was reinitialise arduino , i set the potentiometer (target) showed in the 7 segment but this value not stable , when she rest not stable arduino can't set void loop() that mean no output ?
      _ My second question i dont understand this instruction :
      ftmp2 = MINSET + ((MAXSET-MINSET) * (target/1023.0));
      ftmp2 = ((int) (ftmp2*10))/10.0;

    • @swolebro
      @swolebro  4 года назад

      @@benbenameur8429 Ah, it sounds like your potentiometer or voltage reference might have some drift in it, which keeps it from giving a stable reading. If it can't get a stable reading, it'll never exit the while() loop of the setup() function and get to the loop() calls where it actually reads off the plasma.
      Are you using an external linear voltage regulator as a VREF as I discussed in the other videos? That is one thing you will want, for sure.
      The line you highlighted takes "target," which is the average of your readings off the potentiometer, which will later be the target/setpoint for you plasma (on a 0-1023 scale) and then it projects it onto a scale between MINSET and MAXSET. The following line, where it does *10 and /10.0 effectively truncates it to a single decimal.
      If you see the decimal part of the number flickering while you're not touching the potentiometer, you could change those 10's to *2 and /2.0, and then it would round it to nearest 0.5 instead of 0.1. That'd be an easy way to stabilize it at the cost of some granularity in the setting. The other option would be to put more readings into your average for target.
      That help at all?

    • @benbenameur8429
      @benbenameur8429 4 года назад

      @@swolebro
      1/ All fine, when i use :
      target = total / 20 and
      i = (i + 1) % 10; and
      ftmp2 = ((int) (ftmp2*2))/2.0;
      i dont know if i just plugging the numbers that i need ?
      2/ but when i set potentiometre in difference position the outputs dont set in function of potentiometre ,when i exchange input plasma. ( i mean ,It is assumed that when the resistance changes, the target changes, which means that the output is not achieved as it was achieved before the resistance changed ).
      3/ in void loop :
      total = total + tmp - values[i];
      for first loop values will be values [0] because i=0 ok , seconde loop i =1 and values [1]
      ( total = total + tmp - values[1];
      ) i cant substraction values[1] Because it does not exist ?
      thank you.

    • @swolebro
      @swolebro  4 года назад

      ​@@benbenameur8429 Have you gone and watched this video yet? ruclips.net/video/nmXoZt423WI/видео.html
      I know its nearly an hour long, but I walk through every line of code, step by step in it. (If you've already seen it, give it a second go.)
      1. In the setup() function, if you change the averaging of "target" to use 20 values, you also need to use "i=(i+1)%20". That modulo is what makes it loop as you fill the circular buffer "values".
      2. If turning the potentiometer isn't adjusting your setting, then you might be connecting the wrong pins, or have a weak connection. You'll want to refer to this video and the schematic for that:
      ruclips.net/video/lkKd5P8oH5Q/видео.html
      3. The entire "values" array is initialized to zero. It's got BUFSIZE slots, all full of zeros to begin with. (Look up C array initialization syntax for that one.) So if you're averaging 20 readings, it'll take 20 readings before you start getting good values out, but that happens in a split second, and then you get a good rolling average from there.

  • @SapiderMin_BoeyoLali
    @SapiderMin_BoeyoLali 3 года назад

    Is it work with grbl? Can you share wiring with grbl?

    • @swolebro
      @swolebro  3 года назад

      I don't believe GRBL has the ability to take inputs for performing motions outside of what the G-code says. I haven't looked at it in about a year, so that might have changed, but I'm pretty sure you'll need LinuxCNC (eh, or maybe Mach) if you wanted to use this.
      The wiring and the code came in future videos. Check the video description for the CNC build playlist and you'll find them.

  • @rikidwiprasetyo901
    @rikidwiprasetyo901 3 года назад

    how to do the wiring if using mach3 usb sir ??

    • @swolebro
      @swolebro  3 года назад

      Sorry, mate, don't got any experience with that one. This household is 100% Linux.

  • @regpye
    @regpye 4 года назад

    Power it with 6 volts instead and then there will be less power drop and less heat build up.

    • @swolebro
      @swolebro  4 года назад +1

      There's a decent chance that would work, but using the external LM317 I decided on cost literal pennies and meant I didn't have to worry about the case where it maybe didn't!
      Honestly, that whole part of the project would have been so much easier if I had an oscilloscope for debugging. I *could* pick up one of those Rigol DSO's easily enough in theory, but in practice, I just couldn't bring myself to do it. I'm so far from being an EE, that having a scope just seemed *wrong.* Hahah.
      None of my friends had a scope I could borrow, either. Clearly, I need new friends.