Soft-latch switch single button ON/OFF & reset for Vedder anti spark : BOM?

Actually the LM2596S are a great part for this but they are $5 each (10S max)

Ok I added it to the BOM. I just ordered irf510 mosfets to complete the circuit, pretty cheap too!

It’d be awesome if we could find something just like LM2596S except that works on 14S … also the DC-DC converters already built are cheaper than the chip itself

How do you want to use the LM2596S?

If as boost voltage for the “C” pin, 20/25V should be enough from what @goldenHusky said.

As a DC-DC converter with a little 100mH inductor

@Vanarian Also use a 1MOhm resistor in series with the “C” pin to limit the current. So it’s basicially a voltage divider with R1 = 1MOhm and the 12V Zener as R2 and as supply voltage the 20/25V. Have a look at the schematic on vedders github. Also some kind of latching relay between the 1NO and C pin works.

1 Like

Thanks for the tip :smile: I updated the BOM again ! Btw just realized that we also need only one SN74 NAND chip because it is built with at least 4 NAND gates inside (we only need 2).

I still need to determine the correct pins and we’ll get something good !

Bit of update on the BOM, I still require a NAND (my chips at home are octo buffer drivers not NAND gates so ordered a batch) and we’ll be starting assembly and tests !

Up ! I need some insight from more competent people than me :sweat_smile:

I tried a first version of the soft-latch itself trying to comprehend how to plug everything from regulator output pin till mosfet.

I replaced regulator with direct 5v source to “simulate” it. Mosfet outputs are 1x to ground, other to a LED diode. Goal is : if the LED diode follows press = ON, hold = OFF, it works.

I use cd4011be NAND and irf510 mosfet.

Here is my actual plugs, which doesn’t work yet. Can you guys point me out where I went wrong ?

1 Like

Do you power red LED directly with 5V ? (I can see its resistor) Anyway, it’s hard to tell just looking at theses pictures :grin: Do you have the schematics ? And dumb question : are your wires reliable ? (no false contact)

True it looks like a mess, I’ll split the whole schematic into separate schematics and post according breadboard pics, should be easier to troubleshoot. I also had 2x hazardous wires in the lot, which doesn’t help !

1 Like

I’m back :smile: I’ve split everything in five smaller sections to check all the wiring. I temporarily replaced the anti-spark module pins by a simple LED so it is easier to read.

So first, the BOM used for schematic (simplified to minimum) :

  • 1x L7805CV linear regulator (5V 1.5A fixed output, max 8S input - can be replaced by LM317HVT + couple resistors for higher voltage)
  • 2x 100kOhm resistors
  • 1x 5mOhm resistor
  • 2x 1uF capacitor
  • 2x NAND gates (5v) in 1x combo CD4011be chip (up to 4x gates inside)
  • 1x irf510 mosfet
  • 1x momentary switch

Next, the overall schematic :

Part 1 & 2 :

Part 3 :

Part 4 & 5 :

Do you see anything wrong within the small sections ? Or does everything match correctly ? Another question that occured to me is : does placing the 1uF caps in one direction or other changes anything in the circuit ? Cause this was not precised in radical-creation’s schematics.

@Holyman92 @b264 @goldenHusky Guys I tag you so we can brainstorm that thing :beers:

2 Likes

The first thing right away is the FET isn’t driving the LED so if it is or isn’t working you won’t even know without a 'scope

see my changes to the LED current path below

So if you do that and connect gate to +5V it should come on, right? If you connect gate to ground it should go off, right?

Also I’m assuming

means 1x 5MOhm resistor and if so, then I’d have to question why so big - I’d increase a capacitor before I used a resistor that high because that can lead to stray noise

1 Like

I’m not sure about the MOSFET not driving the LED : maybe I’m wrong but when (G) goes HIGH, it feeds current from (S) to (D) and it doesn’t allow to flow from (D) to (S) no? When (G) is LOW, it should be a closed loop. The LED I use does only let current flow one way too.

If that’s the case plugging the LED this way wouldn’t short the circuit?

I assumed that current flows kinda this way through the circuit (red is “permanent current”, yellow is “excited current”, pink is virtual “closed loop”) :

Edit : BTW I’m not aware of the use of the 5Mohm resistor, I supposed it is to limit current sent on NAND gates (when the switch connects it bypass the resistor and raise current to excitation level)? What would you advise to improve this / get rid of the resistor?

current flows from positive to negative electrons flow from negative to positive

Think of the mosfet leads as “source of electrons”, “drain where they go out” and “gate controller”, so if you steal electrons from the gate controller it dumps more into the drain, all from the source.

No current can flow through the LED because it’s being driven from ground, into ground. It’s like connecting the two leads together with a wire. Did you try what I suggested?

I suggested not to use a 5MΩ resistor because values that high start to approach the resistance of insulators – like human fingers, plastic cases, PCB, and humid air. Inside a skateboard, if moisture gets inside, you want the strength of the signals to be stronger than noise caused by moist air

1 Like

Thank you for the explanation, I need to try this out and report :beer: gonna correct the schematic too

How about replacing the 5Mohm by 1Mohm ?

Bump, I got fun with a simulator with the NAND gates logic and schematic is working in simulator :man_factory_worker:t5: See here : https://academo.org/demos/logic-gate-simulator/

And the results (I emulated NAND “A” output Low/High to NAND “B” by adding a third input) are following !

So what’s left to determine is capacitor and resistor values (the ones closest to the momentary push button) to charge HIGH and drain LOW the NAND B.

Hello everyone, I just saw this thread for the first time. I have recently been working on implementing a similar system into a dual custom VESC design but I could look into doing a standalone anti-spark PCB. I threw that original breadboard circuit together with some electronic scraps in the lab I work at so I don’t remember exactly what parts I used. If you guys are interested in pursuing this more, I can whip together a PCB design and start on some prototypes. Cheers, Josh

3 Likes

Hi Josh, nice to see you here ! Actually this project has progressed thanks to your work :wink:

I’m slowly troubleshooting on the breadboard & learnt a lot along the way. Would really appreciate your input to finish checking the wiring about the NAND and the MOSFET, and same for a PCB design to get the soft-latch plug and play.

I have a question : why use specifically a 2xNAND loop instead of a single AND gate ?

Btw I replaced the original 5M resistor with a 2M instead to shorten the duration of “Hold” toward 2 seconds.

Best Chris

Hey, curious to hear more about the custom dual vesc :blush: