Electronic switch what are my options?

Thread Starter

trav333

Joined Mar 7, 2022
44
Hey Guys,

I am looking for some direction in implementing an electronic switch but am not sure if I should use a solid-state relay, a MOSFET or a MOSFET switch.

I will be using an ESP32 powered by a battery so it needs to be efficient and that the output the voltage signal to operate it. There is no load as it just needs to close the circuit if that makes sense.

Beginner here just looking for some direction on what the best option would be as overwhelmed by the options.

I am leaning towards something like this https://www.digikey.com.au/en/products/detail/panasonic-electric-works/AQY282SZ/646354 but thinking it is overkill?

Thanks in advance.
 

Thread Starter

trav333

Joined Mar 7, 2022
44
Thinking about this could I simply use a LED or diode connected to a GPIO and the switch traces to both sides of the led then when the power goes to it it will close the circuit? or could I just use a resistor for this purpose. There is only a very small load on the circuit.

It is like I need to mechanically close the circuit so I know a mechanical relay would work but I think there are better options.

I cannot get my head around this but I know it is simple!
 

Thread Starter

trav333

Joined Mar 7, 2022
44
Hey Eric you're a legend around here! The more I think about this the dumber I am feeling! haha

Tomorrow I will check the load but I think it is only very small let's say 15mA for now. The purpose is to send a signal to a control board to turn a machine on. This works from the hall effect sensor I am using with the opamp circuit that is working a treat by the way! When the voltage gets to 1V it needs to output the signal to turn the machine on.

What's got me confused is if there is a small current in the circuit then I think I cannot connect this directly to the GPIO and ground as I am thinking this current should not flow through the ESP32. Now I type that it does not seem like a good idea!

So that tells me I need to use some type of electronic switch to close that circuit so the small amount of current can flow through it and close the circuit. Then when the signal stops it opens the circuit.

Just confused with all the options I think. Maybe I could just use a small transistor or mosfet?
 

Thread Starter

trav333

Joined Mar 7, 2022
44
The machine originally turned on with a momentary push-button switch so now I want to use the ESP32 to do the same thing but from the output of the ESP32. If that makes it clearer.
 

ericgibbs

Joined Jan 29, 2010
18,766
hi trav,
If you don't know how the existing momentary switch is wired in the remote unit, then isolated contacts would be the way to go, say a signal relay, with contacts wired across the existing momentary switch.

Update: added image, example.
Contacts wired to remote momentary switch
EG 1594.gif
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,766
hi trav,
I guess you know you cannot get more than about 20mA from an IO pin, so the relay which takes 47mA, will need a low cost transistor drive, as per the image.
E
 

Thread Starter

trav333

Joined Mar 7, 2022
44
I did not think about that but now I know which is good. I think I am learning fast haha this project sure is working my brain! Once again thanks heaps Eric. Cheers

Edit

I am now on the right track you are a legend! :)

One last thing E will this opamp be suitable https://ww1.microchip.com/downloads...put-Drive-Rail-to-Rail-Op-Amp-DS20006305A.pdf

The other one does work but I would like to get 0 - 10V out of it as originally planned looking at the data sheet seems it will work.
 
Last edited:

Thread Starter

trav333

Joined Mar 7, 2022
44
Hey Eric I found the solution for this I used an Octocoupler as the switch which isolates and it is working great. Learning more every day!
 

BobTPH

Joined Jun 5, 2013
8,813
What kind of machine? Have you thought about the safety ramifications of electronically overriding a push button?

Bib
 
Top