Jackpot 3 changes?

I read through this thread with interest. 90% way above my knowledge and helps to appreciate the development process and exchange.

For what it is worth, my LR4 is in my basement on the carpeted finished side, other side half furnace room and my traditional workshop. I ran a dedicated 12 awg bare tinned copper wire through the vacuum hose and had it poke out and mechanically fastened next to the router.

Anyway cold Chicago weather air is dry and I always manually load my micro SD and purposely touch the ground wire on my machine first when I walk up.

Always get huge static discharge spark, then I insert the card after being grounded.

Just curious if it is worth asking about environmental conditions? I also tend to stage turning the router on then the vacuum not sure if there would in line noise problems.

Yes, that is great for helping to figure out what might have happened. The issue still needs to be prevented to the best of our abilities. I would hate for you to lose an input if you forget one time to discharge yourself.

I always think to discharge myself when opening up a PC, but most electronics with normal use I never think about it. I need that level of protection on the board.

2 Likes

If you’re getting big discharges like that, perhaps consider getting a cheap ESD lead/wrist strap that has a 1MR resistor in it and discharging through that. It does it more slowly (over milliseconds, not microseconds, so still instant as far as you’re concerned) and without the shock part.

1 Like

Start by taking a look at the SMAJ24 and putting that directly on the input with the anode to 0V and the cathode to input. Then look at the maximum clamp voltage and see if that matches the diode array rating. Then have a think about what parts of the circuit are potentially redundant and can be replaced or moved.

1 Like

Thanks but at my age I need a little spark in my day :smiley:

Sorry could not resist(or)

Good point however. I only notice when I wear my Croc’s which have a proprietary resign known for being a static charge.

2 Likes

ooof, this made my brain discharge!

1 Like

Is this leg of the bat54s, doing anything? I even made a little simulation and I don’t understand why it is there, we could have just used a single shottky diode?

I have been thinking about this all day. The current inputs are up to 30V safe, but they don’t work above 3.3v, do they? So If I find a TVS that clamps below 30V, and has a working voltage above 3.3V, that is just a single component plug and play right, nothing changes except these will be more robust?

Datasheet - LCSC Electronics These are some of the most common on LCSC that fit that description.

It’s preventing the input being pulled down to voltages below 0V. What inputs are you putting into your simulation? It’s always worth considering not just correct operating conditions but also incorrect ones like reversed connections or broken external connections etc.

Bear in mind that the input voltage going below 0V doesn’t necessarily just have to be because something is hooked up backwards, it can also be because something doesn’t share a ground with the jackpot and it’s floating at a different voltage for some reason.

As I mentioned above, it’s kinda weird to think about with the microcontroller inputs going below 0V, it’s not that they instantly die or anything, it’s that they have their own diodes internally connected like that which will start to conduct. If you connected -12V to an ESP32 pin through a 100K resistor, it’d clamp to 0.5V or something and likely be perfectly fine. if you connected -2V via a bench power supply and no resistor, you’d almost certainly kill something. The voltage is what causes the current, but the current is what causes the damage, etc.

The thing to consider is if you add a TVS to the connector side of that circuit, it also provides that same function, so you may be able to do away with the diode array and just replace it with a single diode. If you don’t then no issue, it’s not a problem to have it doubled up there, it won’t likely conduct because anything going through the TVS is doing through one diode, while anything going through the schottky is going through two. I wouldn’t be too worried. I would, however, move the resistor to being on the other side of the schottky which will help avoid that situation.

I’m not sure what you mean here? The inputs should work fine on any signal that goes between 0V and 30V. Anything below ~1V is considered a logic low and anything above ~2V is considered logic high.

Yeah, that’s pretty much it. Just bear in mind where the TVS will start to conduct in reverse because you really don’t want it to conduct under normal operating conditions. If you were to use a 5V standoff voltage TVS and someone were to hook this up to something else, say +24V to sense whether a power supply is on or a switched 24V output from something else, that TVS would act pretty close to a dead short and likely damage whatever the output was.

So I would say, rather than keeping the reverse standoff voltage above 3.3V, instead think of it as keeping the reverse standoff voltage above whatever your maximum input voltage is.

I also wouldn’t be as worried about being exact with some of this stuff. The thing is, without being very certain above how the ESD strike will occur, you can’t really predict how much current it will actually be. The worst case HBM strike is, from memory, a 16kV pulse into a 1500R resistor and dead short, so 10A. ESD strikes can be much higher voltage but also aren’t likely to be perfectly into that diode like that, they’ll have other circuit resistance/impedances. So while it’s theoretically possible that a 24V 400W TVS would climb to 40V at 10A and that this would match the worst case 16kV ESD strike, that situation is probably pretty unlikely.

Another thing I forgot to mention previously when sizing TVSs is that the bigger, higher power ones tend to have similar clamping voltages just at much higher current, so for the same current they clamp at a much lower voltage. A 400W 24V Vr TVS might clamp at 40V/10A while a 1500W 24V Vr TVS might clamp at 40V and ~40A. Obviously if you only put 10A through the 2nd one it’ll clamp at a much lower voltage, likely closer to 30V, etc. That doesn’t mean you need the bigger one, it just means there are some considerations when choosing the right size. You might not need to survive a 1500W surge, it may just be that you want to overrate the device so it catches ‘tighter’.

You can also just use multiple 400W ones for the same effect or, better yet, spread them out. The first 400W one sees 10A and goes up to 40V. If you have a 100R resistor and then a second 400W TVS, for it to see 10A it’d need to have 1000V across that resistor. Instead if we assume it starts conducting at 30V then there would be 10V across that 100R resistor, so 100mA, meaning the 2nd TVS would barely see any further voltage rise. This is often how protection is handled in really gnarly situations like where you see huge surges. One big device that catches the bulk of the energy but lets through a voltage spike that can damage stuff. Some filtering components and then a second smaller but more accurate form of protection to clean that up, etc. then finally usually down to a diode connected to the voltage rail such that anything that makes it through is instead drained into the power supply capacitors, etc. None of that is needed, it’s just interesting.

So anyway, I’d be ok with just adding a decent sized 24V TVS like a 400W SMA part to that part of the circuit and calling it a day. If it were me I’d probably swap the diode array for a single SOD-123 diode and up the voltage to 60-70V for a bit more voltage withstand. I’d rearrange the circuit so it went Input connector → TVS cathode → single schottky diode → filter resistor → filter capacitor → pull up → ESP32 pin.

If you do want to use that tiny SOD-323 TVS, I’d say be careful because while it’s specified for 350W peak, the thing they don’t specify is how often these can occur before failure. It’s very likely that a board that’s seeing ESD issues will see them repeatedly until failure, so having some more overhead here will help. If you want to try with this one then go for it, but the clamping voltage is more like 50V so I’d definitely up the voltage on that diode array or replace it with a single higher voltage diode.

1 Like

If pin 13 is not lower than 3.3V isn’t everything positive blocked (below 30v). I keep looking this up and I do see people using these bat54s tied directly to gnd and 3.3 to limit the voltage but in this case we are kinda using it backwards and I only see it preventing negative signal (it let’s though -0.3v if I am not mistaken), and blocking anything from +3.3V to +30v before it breaks down.

Yes, that is correct. I’d say that’s still the input ‘working’, though… :slight_smile:

This will depend on current. From the datasheet:

That curve shows the forward voltage for the diode. In the case of how it’s connected currently, the diode is forward biased when current is flowing out of the input due to it being below 0V. How much current flows will depend on voltage and impedance of what is generating that negative voltage as there are no other limiting factors.

If it’s something like a 5V output with a 1KR output impedance then you’d see something like a few mA flowing (5V/1KR is 5mA if it’s a dead short, but there will be the 2 diodes), with the Vf across that diode being around 0.3V as you say… If it was something like a 24V output with a 100R output impedance you’d see something like 240mA which would be around 1V. Or if it was something even more limited on current and only 100uA was flowing, that’d be 0.15V, roughly.

So it is best to use a clamping voltage under 30V, and keep the bat54s, so we still have negative voltage protection after the TVS (since they have a possible -0.7v to -1v).


Datasheet - LCSC Electronics, these little boogers are 5x the cheap ones, but handle 400w instead of 200w, 9.2V clamp, 5uA leakage. I assume the 9.2V clamp is fine, I can not imagine any other use for these inputs other than 3.3V. Sod123, barely fit without making significant changes to the board layout.

1 Like

I’d bump the pull-up up to a 100K resistor, as well. The pull-up and filter resistor create a voltage divider. Assuming the input is actually 0V, which it never will be, that’ll be around 0.3V on the BAT54, so 3V across that divider. The voltage across the lower part of that divider will be 3V * 1K/(10K+1K) so 0.27V. That puts the input at 0.57V which is closer to the threshold than I’d like, personally. With a 100K pull-up that’s down to 0.25V or something around that.

If you’re ok with those inputs being 3.3V only then that should work fine. Personally, I’d probably go for the 24V one and replace the BAT54S with something higher voltage to keep 24V operation, but if you prefer to stick with the 3.3V only option, people can still wire it with an external diode in series which should still work.

I am not understanding how a 24V input would work there. If the pin is pulled up to 3.3v, and trigged at under 2.5v, how would we even hook up anything other than the 3.3input that is there.

Or in other words what does a +5v-24v input look like on the jackpot 3 input?


I was playing with Circuit Simulator Applet , I love seeing the voltage and current in motion with voltages and drops on every component. It really helps me to confirm a few things I was unclear about.

1 Like

Something else coming from somewhere else, like detecting a 12V signal from an external device. It may be that I’m being overly paranoid, but I don’t really have a whole lot of visibility into how people are using these things. I’m always very loathe to reduce specs and capabilities without a good reason to. You’ve currently got a board that is normally supplied at 12V or 24V and with inputs that will work at that voltage. That’s a decent approach. Shifting to having inputs that will be damaged (or even damage what they’re connected to) at anything more than 5V opens up a lot more possibility for damage.

Basically, it’s the idea of defensive design. I try to consider all the ways that a device will be used/abused, both accidentally and deliberately. One thing is miswiring. I like to try to have every input on my devices be able to handle the highest voltage present so someone swapping a 24V and 5V signal doesn’t blow anything up. I also try to avoid having connectors that can cross-mate, so larger pins on a power connector, smaller pins on input/output connectors. Make the input/output connectors a different series, different pin count, keyed in some way or at least in very different locations. Or put all the IO on a single connector so it can’t be swapped. I currently have a design that, due to limited DIN rail enclosure options, needs to have 4 connectors that are all cross-matable with a mix of inputs, outputs and power connections. As a result I’ve made sure that the logic inputs can be pulled up to power rails or down to 0, and that having the 0V connection pulled up to 24V while the inputs stay at 0V won’t matter. I’m using current limited drivers so connecting 2 outputs together is survivable. There are a couple of specific cases that I can’t protect against, like the outputs being connected backwards, but that was a situation I evaluated and decided it was too hard to protect against while also being a) unlikely and b) clearly a user-caused fault that would be obvious once the smoke had cleared. I still wired the connector so that it doesn’t matter which direction you read as pin 1, it still works the same, though. 4 pins, +Vout, 0V, 0V, +Vout.

There’s also the idea of considering the ramifications of design changes through a product’s life cycle. There are usually design changes that are form/fit/function compatible, meaning you should be able to use version 3.0 and version 3.1 interchangeably. Then there are breaking changes that may have different form (new enclosure needed), different fit (new mounts or different connectors needed) or function (a feature doesn’t work the same anymore, like an input that only handles lower voltage or an output that’s now a 100mA limit instead of a 2A limit, etc.). In those cases, it’s often a good idea to make sure they can’t be used interchangeably, like using a different connector now that an output is lower voltage, or deliberately changing a hole location so someone is less likely to just mount the new revision of the board in place and try it out. Another option is to label the revision numbers clearly, but in my opinion that’s the worst option because people, to a first approximation, don’t read warnings. The worst of all options is a note somewhere in the documentation, or going off things like serial numbers. I’ve recently been dealing with a $60k piece of test equipment that needs to be wired differently if it has a serial number before a certain number or is running firmware older than a certain revision. No indication whether it would be damaging to wire it differently for long enough to turn it on and check/update the firmware, so I’ve had to temporarily wire it one way and then plan to revert it later. I don’t ‘think’ it would be damaged and may just error out, but if it was damaged that’s a really crappy trap to set for someone.

Not saying that needs to be a priority, but as with everything try to keep it mind the ramifications if it turns out that a few % of people who bought the board have done something weird like used 24V for the end-stops or are using one of the inputs for something other than an end-stop like a light curtain or laser cutter enclosure lid-open, or are using 24V powered inductive endstops, or feedback from a VFD or something like that. In those cases, it’s possible to imagine someone buying a Jackpot 3, using it for a few months, having some issues, buying a replacement and then having that immediately die on startup. That’s not a user experience I’d personally be willing to risk, as well as being a support nightmare that likely eats more time/cost than doing it an alternative way would save.

But how would we do this. The inputs only detect if something is grounded. So how would we use them to detect anything other than a switch?

The inputs are still 24V safe, meaning if someone happens to touch one with 24v it hits one or both diodes and is okay.

I totally agree with the rest of that (Our 5v and 24V outputs should have a different connectors…)

So if we pulled down the input pins and used the diodes to clip the input voltage I could see how these would work for any voltage in that case. Since we are pulled up I am not sure how we would use these input any other way than a basic switch to ground? Now that I say that it seems that is a more useful use of these pins…

Let’s keep away from using the term ‘grounded’ for a minute.

The ESP32 input has 2 states, input high for anything where the ESP32 pin is above ~1.5V and input low for anything below ~1.5V.

We then have a pull-up and diode such that anything on the input below 3.3V relative to our 0V connection will cause the diode to be forward biased and the ESP32 pin will be roughly at that input voltage or anything above 3.3V relative to our 0V where the diode is reverse biased, isn’t conducting and so the pin is at 3.3V.

This can be done by a switch between the input and 0V, like the homing switches are normally wired. In that case, a closed switch pulls the input down to the 0V and thereby pulls the ESP32 input low. Or the switch can be open and the pull-up pulls the ESP32 input high.

This can also be done by an open-drain output where instead of a mechanical switch you’ve got a MOSFET, but the performance is basically the same.

Or this could be done by a bipolar driven output, where you’ve got something that can drive current out at +24V or can sink current in at 0V. In that case, when it’s at 0V you’ve got the same thing, current flows out of the input pin and into the 0V output of the device which causes the ESP32 input to go low. Or that output connects to +24V and can drive current out, but it doesn’t go anywhere because the diode array is reverse biased and so the pull-up pulls the ESP32 line high.

Nothing here needs to be ‘grounded’, as such, it’s just voltages. Again, maybe a bit nit-picky, but it can help avoid some traps with things like assuming all ‘ground’ connections are the same, when they may not be.

Not with that TVS on there, they’re not. A connection to 24V will cause that TVS to conduct as if it’s a voltage-limited short circuit. A very short touch might be ok, depending on what the 24V is coming from, but miswiring WILL kill that TVS because it’ll be trying to conduct 10s of amps through it and will fry. The 400W rating is for milliseconds, not longer term usage so it’ll overheat and pop under that condition, assuming what it’s connected to doesn’t die first.

:+1:

This I understand but if a mosfet is getting added externally just use a 3.3v one?

I had to look that up.

So, I really don’t think there are any use cases for our inputs other than switches that are not going to have external circuits with them. So I think worse case is someone would accidentally use a 5V logic powered switch or sensor and we are 5V safe, right, the bat54s and the pull up will clip anything over 3.3v and the TVS is definitely 5v safe. Am I thinking of this correctly?

I am just assuming (yikes) that no one is using anything more than 5V logic.

Understood. I definitely meant for more of a "whoops I slipped and the fan wire touched the pin " type of deal.