Author Topic: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code  (Read 24722 times)

0 Members and 2 Guests are viewing this topic.

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #25 on: November 28, 2018, 02:20:28 am »
the pedal input current I'm not sure on, if you mean the current coming from the machine, into the potentiometer within the pedal (without the board connected)

I'd have to head over to the machine with my soldering iron, unsolder a wire, and place the DMM in between to get that read out.  I'll try and do that later. Right now I'm expecting a shipment and can't do anything that requires time, while I watch for it.
I had hoped, given the state of the project, that this would be easier to do externally.  Alas, it's not going to be that simple.
Quote

If that current is well below the 25mA (with pedal pushed all the way down and TIG welding) Then is it safe to say that the 74HC will not be a problem for this application?

I don't see it that way.  All of the examples in the datasheet max out at Isw = 1 mA.  The maximum values are just numbers that somebody thinks will cause the chip to melt down.  I'm not sure that the region between 1 mA and meltdown is well understood.  But the author made it work so, try it!  See if the chip gets hot!

BTW, is the author still supporting the project?  I see he never posted the source code and I was wondering if his hardware has melted and he just moved on to a different version.  Yes, I am a cynic by nature.  So little trust...

All you need is yet another op amp set up as a non-inverting amplifier with a gain of 1.  If you do the offset/scale thing for the LED, you might as well use a dual op amp and use the second op amp for this buffer.

The reason I am bringing this stuff up, including full scale testing, is that you seem about ready to order PCBs.  Were it my project, I would be spending more time on the breadboard to see if these side issues can be solved and what impact they make on the PCB.  My PCBs tend to cost a lot of money (ExpressPCB  doesn't use China pricing) so I try to stay on the breadboard until I am absolutely convinced.

I might even do a bunch of welding with the circuit still on the breadboard.  Among other things, I would know more about the EMI issues.  Yes, an aluminum box will help for radiated disturbances but not a bit for conducted disturbances (down the wires between the gadget and welder).
« Last Edit: November 28, 2018, 02:52:29 am by rstofer »
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #26 on: November 28, 2018, 02:25:34 am »
nah, the board isn't even close to be designed. so far, I just have the components placed and rat lines, on a board to see if i can get everything fit inside my project boxes i planned for.

I guess I need to go test this thing tomorrow and see.  I can't TIG worth crap, but maybe I can run a few beads and see if that chip gets hot.  I can just forget about the LED, and just put it on Pin 13, then we don't have to worry about that at all.

I'll try testing it tomorrow when I get time.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #27 on: November 28, 2018, 06:30:10 am »
However, I will be putting in a 1.3" OLED display so I can visually see the percentage of the value of the Potentiometers.  That has 4 pins. But, again, inside the aluminum enclosure project box.  Being in the box (which I heard metal creates kinda like a Faraday Cage, you still think I would need to put a filter circuit on it?  If I put resistors/capacitor filter on the Potentiometers, it will change my values, but I guess I can just adjust that with the multiplier i have in the program to compensate.  There really isn't much going on with this circuit, and the guy in the video did not add anything to his circuit, and it was working very well for him.  I want to do it right, but if it isn't needed, no sense to.

Yes, the metal enclosure helps a lot.  Consider a closed, continuous (welded, say) box, with one hole for one wire to come through.  Nothing's getting through the box, the only place noise can enter is along the wire, along with whatever signal/power is on it.  Filter this signal with respect to ground (which is the enclosure), where the wire passes through it, and you have clean signals inside.

Now consider if we open up a hole in the box.  If no wires go through it, then it's only radio signals that can pass, and high frequencies at that (corresponding to the size of the hole).  Still fairly good shielding, even if it's looking like Swiss cheese, and as long as we've got signals filtered with respect to ground.

Now consider more wires going into the box.  If we filter each one with respect to ground (the box), they're all treated the same, and everything stays clean on the inside.

Now for practicalities.  Suppose we route the wires onto a PCB, because that's easier to do than filtering right on the enclosure itself.  Now we're asking the PCB to act as part of the enclosure, but it has to be mounted somewhere inside the enclosure, not actually as the enclosure itself*.

We need the next best ground then, which is going to be some screws and standoffs mounting the board inside the enclosure, and providing a ground connection that way.  Say we put two ground screws on one edge of the board, and the connectors and filters are all placed on the board on that same side.  That keeps the noise off to that side of the board, and the internal signals are surrounded by ground (ground plane and enclosure) and relatively free from interference.

*Well, you could actually arrange it that way, and it would be pretty good if you can work out the electrical details -- I mean, install the PCB over a hole in the enclosure, one side exposed to the world, one side facing in, and with a ground plane which carries the same ground as the enclosure, so the connectors can be filtered directly to ground as such.

I think it's best to think about shielding in terms of the ideal case (full shield), made worse by certain geometric transformations -- opening holes in the walls, terminating or filtering potentially-noisy wires with respect to the walls, or if not the walls directly, then the next closest thing, without opening up loops between the wires and the walls.  (Example, a board that's grounded on the opposite end of where the connectors are, would carry noise through the board, making a huge loop under the board.  That's not so great.)

You can also continue this stripping process, all the way down to a bare board.  Then you have only the ground plane for ground-as-such, and traces and components are fairly open and exposed to noise, but that's still not necessarily a terrible thing as long as the signals (with respect to local ground plane) are clean enough for purpose.  Noise is not so much one wire with respect to an ideal, absolute ground, as one wire with respect to all the others; but as it happens, this doesn't force a change in topology, as we can at least contain those (noise) currents to one side of the board, and have all the active circuitry off to one side, away from all the connectors (which are grouped on the other side).

For your case, building with dev boards, you're probably going to add a "glue" board, on which you can place connectors and filters and stuff, and which gets grounded to the enclosure.  Short cables or headers then connect to the dev boards, which therefore stay clean, away from the noisy outside world.  If you need very little "glue" (basically just the filters, no, like, I/O transceivers or voltage regulators or whatever), you may get away with using the main dev board in this way, minding to tie ground to the enclosure in an opportune spot (don't be afraid to scratch away soldermask and make your own ground pads if needed -- it's your board, you can modify it however you like!).

Or if using the dev boards just for circuit reference, and basically copying all that onto a single main board proper -- same idea, connectors and grounds to one side, everything else on the other side. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #28 on: November 28, 2018, 11:28:26 am »
gotcha.

So make some ground points where the wires connect to the boards, and then solder or screw that (with wire of course soldered to board), to the wall of the enclosure.

Might be alittle difficult to screw the wire to the box, but, i think maybe I can screw it to the end caps.  The end caps get screwed on with 4 screws, so That may be good enough.

I have managed to place almost the entire circuit on the top plane, and all the grounds connecting on the bottom plane on a Copper Pour. I then placed a copper pour up top, and also connected that to ground, and placed in some more vias just to help.

I've left alittle more room between the signal traces and the Power Traces and since I poured, there's ground between them as well.

Really, the only signal wires are the 2 for the OLED Display, and the 1 going to the 74HC4051 (Pin 9) from the Arduino.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #29 on: November 28, 2018, 05:38:11 pm »
I can just forget about the LED, and just put it on Pin 13, then we don't have to worry about that at all.

By putting the LED output on pin 13, you use the onboard LED or, worse yet, you put another LED in parallel and pin current increases.  Furthermore, the onboard LED is probably not visible in the enclosure.  You also need to add a couple of lines of code plus define the pin as output.

If you put the LED on pin 9 (the output to the MUX), with the resistor between Vcc and the LED anode and the LED cathode connected to the pin, you will pull the LED cathode to ground when the mux is selecting the pedal current.  Just what you want!  And no code to write...  Try it on a breadboard, it should work right out of the box.

I prefer pulling LEDs down to ground rather than pulling them up to Vcc like the onboard LED.  It probably doesn't matter as much these days but some time back logic could sink more current than it could source.  In any event, you can now put the LED in the enclosure cover and get some sense of the pulse ratio while turning the knobs. 

Note that the LED is driven from the Arduino so it will flash whether there is pedal input or not.  Maybe ok...  Even pin 13 would do the same thing.  The Arduino just doesn't know when the pedal is pressed, with this design.

I like my analog design because the LED brightness is somehow proportional to current.  I clevered up the Vref and it may not work well that way.  It's true that Vf is 1.67 volts for some LEDs but what we need is to output some starting level of brightness when the pedal is minimum (but on) and the background is minimum.  We need to find the 'bottom' of the illumination scale and then recalculate the resistors - hence spending a few minutes with MATLAB; rework is easy.  We also need some measurements, both eyeball for brightness and DMM for Vf, to calibrate the LED.

Either way works and the analog bit is really overkill.  The pin 9 approach doesn't given any indication of heat but it does show the pulse rate and width.  Still very useful with no analog involved.  I'm not sure which way I would go but, being lazy, probably pin 9.  <=== this is the easy way!

 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #30 on: November 28, 2018, 09:06:25 pm »
Okay, but putting an LED on the Z output of the 74HC4051 or on the Output (pin 9) of the arduino and having it sink to ground, would mean that the LED only goes on when the Pulse is off?
 

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #31 on: November 28, 2018, 09:32:21 pm »
I'm not a EE and just a hobbyist that normally plays with digital electronics, my original plan was to make a remote button replace the peddle in a TIG welder, but adjustable pulse looks like a great idea to add as well.

I'm asking because my plan was to use a digital pot to control the welder control input.  Anybody see anything wrong with this?  Analog electronics isn't my thing and don't want to go the wrong direction.  5v signal and 5v microcontroller should work fine with a basic digital pot and I could control much more than just high/low, cycle, and duration.
Mark Higgins
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #32 on: November 28, 2018, 09:39:09 pm »
Do You mean a Rotary Encoder? 

This guy made one and is selling his units, but IMO wants way too much for them.

So yes, it's possible to do it with that.  I found code searching arduino programs for the Encoders, seems simple enough. But, I wanted the quickness and ease of adjusting on the fly, without having to use a push button to scroll through a menu to adjust the settings. With the potentiometers, and a digital read out display, I can adjust on the fly.  So I chose this route instead.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #33 on: November 28, 2018, 09:54:16 pm »
Okay, but putting an LED on the Z output of the 74HC4051 or on the Output (pin 9) of the arduino and having it sink to ground, would mean that the LED only goes on when the Pulse is off?

Let's not talk about pin Z, I think that is a really bad idea.  Try it if you like...

Pin 9 goes low to select the pedal input and it goes high to select the pedal plus background input.  So, if the LED is pulled to ground, it will be bright when pedal input is selected (high current) and off when background current is selected.

The resistor goes from Vcc to the anode of the LED and the cathode of the LED goes to pin 9.  No code changes required.  No overcurrent problems either as long as the LED current is reasonable.  Maybe 10 mA or so...

R = (Vcc - Vf) / 0.01 should get you close.  You should try to find out what Vf is.  Just hook up the LED and measure it.  I don't know what Vcc is either.  Some Arduinos are 5V and some are 3.3V.
 

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #34 on: November 28, 2018, 09:55:03 pm »
A rotory encoder would be for the interface, that's not what I'm talking about.

In the video's design a analog switch is used to switch between the levels of the different pots.  Instead of using the analog switch and the pots, just using a single digital pot to control the input.  I'm assuming that's what the last video there is using as it's showing different pulse forms as well other than just square.  So replace all the pots with and the switcher with a single digital pot, the interface then can be whatever you want.

EDIT:  Or it's possibly using a DAC I guess.
Mark Higgins
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #35 on: November 28, 2018, 10:00:30 pm »
rstofer

I will just be using a standard flat top 3mm Red LED. So vF should be about 3.3v

The Arduino I'm using is the 5v Pro mini. I am using 5v, because i have 5volt output from the Machine, so no need to add a Voltage Regulator then.
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #36 on: November 28, 2018, 10:15:47 pm »
okay, I took the LED and soldered the anode to vcc(with resistor in between of course), and the cathode to PIN 9. The LED turns on when pin 9 goes low, as i thought it would, but when a DMM is put on the Z pin of the multiplexor, it appears the LED turns on when that PIN goes high. I'm confused. Is the multiplexor switching the high low from the arduino?

But, when the LED is on pin 9, I don't see the current though that will be on, as background current, i only see the on/off  of the torch pulse.  I could live with this I guess, but would be nice to see the LED go low to bright as the pedal, or the background current, is turned up or pedal pushed down.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #37 on: November 28, 2018, 10:55:56 pm »
okay, I took the LED and soldered the anode to vcc(with resistor in between of course), and the cathode to PIN 9. The LED turns on when pin 9 goes low, as i thought it would, but when a DMM is put on the Z pin of the multiplexor, it appears the LED turns on when that PIN goes high. I'm confused. Is the multiplexor switching the high low from the arduino?

But, when the LED is on pin 9, I don't see the current though that will be on, as background current, i only see the on/off  of the torch pulse.  I could live with this I guess, but would be nice to see the LED go low to bright as the pedal, or the background current, is turned up or pedal pushed down.

Pin Z is not a digital pin, it is the output of the multiplexer selecting 1 of 8 analog inputs.  It is a voltage level, not digital at all.

When pin S0 goes low, the multiplexer selects channel Y0 as input (which is the pedal voltage) and delivers whatever it is (0, 1.4, 4.555, <whatever>) to Z.

When pin S0 goes high, the multiplexer selects channel Y1 as input (which is the pedal voltage reduced by the pot setting) and delivers that to Z.

Since you have parts laying around, you can set up two pots as inputs Y0 and Y1, play with S0 (logic 0 or logic 1) and watch Z on a DMM.
« Last Edit: November 28, 2018, 10:57:34 pm by rstofer »
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #38 on: November 28, 2018, 11:09:57 pm »
hmm, sounds like we can eliminate the 74HC4051 and put in a relay or solid state relay in it's place. that would...

wait,t hat won't work, there would be no back ground current, while pin 9 goes low.  Thus, turning off the torch, not good, hmmm
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #39 on: November 28, 2018, 11:20:54 pm »
But, when the LED is on pin 9, I don't see the current though that will be on, as background current, i only see the on/off  of the torch pulse.  I could live with this I guess, but would be nice to see the LED go low to bright as the pedal, or the background current, is turned up or pedal pushed down.

I gave you an analog solution, one op amp and 4 resistors.  Once the minimum brightness and equivalent Vf are established, I can compute the appropriate resistor values.  3+ volts, Vf, for a conventional red LED seems way too high!  At least I have never seen anything like that.  I'm more familiar with about 2.2V and the datasheet I linked earlier shows 1.67V (IIRC).  Try measuring it with a 220 Ohm resistor in series...

Linear LED intensity just doesn't work.  The op amp solution is elegant but it probably won't really work well.  The human eye just isn't linear!

The easiest way to get this done takes one extra pin - probably not pin 13 - and a diode (1N914 or 1N4148).  Connect the LED anode directly to Vcc.  Connect the cathode to one end of a 220 Ohm resistor.  Connect the other end of the resistor to the anode of the diode.  Connect the cathode of the diode to the IO pin.  The diode prevents interaction with what follows.  Connect the cathode of the LED to ground through another but higher value resistor (say 1K).  Now, toggle this new pin exactly the same as pin 9.  When the output is low (pedal voltage selected), the LED will be bright (through the 220 Ohm resistor and diode) and when the output is high (background level) the LED will be dim (through the 1k resistor).  Pick resistor values that work for you.  Try to keep the LED current at or below 10 mA for full brightness.  Yes, the uC can handle 20 mA per pin but, oddly, you don't see much brightness change between 10 and 20 mA.  You will have to play with resistor values to get the brightness levels the way you want them.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #40 on: November 28, 2018, 11:22:43 pm »
hmm, sounds like we can eliminate the 74HC4051 and put in a relay or solid state relay in it's place. that would...

wait,t hat won't work, there would be no back ground current, while pin 9 goes low.  Thus, turning off the torch, not good, hmmm
The 4051 is working exactly like a SPDT relay except that it switches in less than 500 nS.  Relays aren't anywhere near fast enough unless you get one with overlapping contacts.  That would actually work.  But you would have an annoying buzz.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #41 on: November 29, 2018, 12:44:50 am »
I'm not a EE and just a hobbyist that normally plays with digital electronics, my original plan was to make a remote button replace the peddle in a TIG welder, but adjustable pulse looks like a great idea to add as well.

I'm asking because my plan was to use a digital pot to control the welder control input.  Anybody see anything wrong with this?  Analog electronics isn't my thing and don't want to go the wrong direction.  5v signal and 5v microcontroller should work fine with a basic digital pot and I could control much more than just high/low, cycle, and duration.

Unless you add an op amp buffer between your controller and the input to the welder, I don't think this ends well.  You still don't have the input current and, trust me, it's not zero.  It might not be much or it could be a lot, relative to what a digital pot can handle.  You still need numbers - and measurements.

Remember, we were talking about the MUX and its nominal usage at 1 mA, not 20 mA like in the MAX table in the datasheet.
 

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #42 on: November 29, 2018, 01:13:29 am »
Unless you add an op amp buffer between your controller and the input to the welder, I don't think this ends well.  You still don't have the input current and, trust me, it's not zero.  It might not be much or it could be a lot, relative to what a digital pot can handle.  You still need numbers - and measurements.

Remember, we were talking about the MUX and its nominal usage at 1 mA, not 20 mA like in the MAX table in the datasheet.

Thanks.  I'll measure the current on my pedal and see what it's actually pulling on the sense line.  A buffer might be a good idea anyway and I don't think it's that hard to implement.
Mark Higgins
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #43 on: November 29, 2018, 01:16:41 am »
hmm, just went and measured the voltage out of the machine. It seems the voltage going to the Potentiometer is 3.3v, while the voltage to the switch in the pedal is 5v.

Right now, the circuit was working off that voltage going to the potentiometer in the pedal. Oddly enough, the circuit works with that, and a 5V arduino. weird.

Should I just leave it? and order some 3.3v Arduino when I actually order and make the boards? Or keep the 5v arduino?  I don't think it would be wise to pull the power from the switch, I have no idea what the circuitry of the machine is before and past that switch.
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #44 on: November 29, 2018, 01:28:53 am »
Okay, so I measured the foot pedal amerage.

Here's what I got.  I disconnected the wiper part of the Potentiometer, and put my DMM in between that and the machine. It was reading 0.3uA when pedal pushed to the floor. 0 when pedal not pushed.

Moved the leads to the positive and negative output of that potentiometer. 1.937mA when pedal pushed to the floor, and 0 when not pushed. 

The internal potentiometer in the footpedal is 10K, and the machine is putting out 3.3v.

Did I measure correctly?  Doesn't seem like a lot

Was I suppose to put my DMM between the positive coming out of the machine, and then the positive terminal of the potentiometer?
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #45 on: November 29, 2018, 01:37:46 am »
okay, now it makes more sense, because of that 10k potentiometer.

The output of the machine to the pedal is 3.3v at 296mA when pedal pushed to the floor. 0 ma and 3.3v when not pushed to the floor.

The output of the wiper on the potentiometer is 0.32uA when pedal pushed to the floor.

So it looks like, with just the pedal (no circuit), it is drawing 295mA from the machine, but only putting out 0.32uA back to the machine through the wiper on the potentiometer in the pedal.

Does all that make any sense?  So, if that's all the output is, then an LED on the output of Z of the 74HC4051 should be fine.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #46 on: November 29, 2018, 02:06:48 am »

Does all that make any sense?  So, if that's all the output is, then an LED on the output of Z of the 74HC4051 should be fine.

I don't think so but you can try it.  If the MUX is spec'd with a 1 mA output (ignoring MAX values) then the LED won't even begin to light up.  Normally, I set up red LEDs for 10 mA but 20 mA is usually a limit for continuous operation (not pulsed).

Then there is the voltage problem.  Suppose Vf actually IS 3.3V.  You just barely have that much voltage when the foot pedal is fully depressed.  Yes, the Z output will track properly but there won't be enough voltage to get to Vf.  That it worked at all is testment to the idea that Vf is a good deal less than 3.3V.

If, as I suspect, Vf is around 2.2V (or maybe as low as 1.67V) then the LED won't turn on until somewhere between 1/3 and 1/2 throttle depending on Vf.

If the foot pedal pot is 10k and the machine delivers 3.3V then the current should be 330 uA not 290+ mA.  Any chance something went wrong with the measurements?
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #47 on: November 29, 2018, 02:16:04 am »
nope. when measure from voltage out of the machine, through DMM, then to positive input of the Potentiometer in the foot pedal, it reads 296mA

When dmm between footpedal potentiometer wiper, and machine input, it reads 0.3 uA when pedal pushed down.
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #48 on: November 29, 2018, 02:17:07 am »
maybe the position of my leads are in the wrong place.  I thought you had to splice a wire and put the leads between them.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #49 on: November 29, 2018, 03:02:26 am »
Another way to get the LED to respond to current level:  Run the Z output into an Arduino analog input and do  an AnalogRead(the_int) and use that value to set a PWM output on one of the digital pins.  You can do some kind of calculation (quickly, the metal's hot...) based on the input to make the LED do what you want.

Like this but with the Z output going to the analog input instead of a potentiometer.

http://www.toptechboy.com/arduino/lesson-11-arduino-circuit-to-dim-led-with-potentiometer/

Note the 255./1023. in the conversion function.  That division needs to be done in setup() and carried in a variable.  The value of the division is loop invariant and shouldn't be calculated every cycle through main().  Especially when it is a floating point calculation.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf