My apologies for asking what could be considered a very basic question... but my knowledge of Arduino is very fundamental...
I need to simulate an SPST switch with an Arduino just open and close a circuit to "ground".
Here is the scenario: I already have a setup where based on analog data received from a Yo-yo potentiometer an LED is lit depending on the value received. Currently, I have a physical switch that just closes a circuit to "ground" so an instrument can detect that the switch has closed. I'd like to replace that switch (SPST) with an Arduino function.
I haven't found any examples but those that use Arduino to close a circuit to send power to LEDs and others.. on those there are recommendations for the usage of relays... I guess I could do something similar but I wondered if there is a simpler solution...
If the arduino and the instrument can share the same ground AND the input on the instrument is not connected to anything above 5V, then you can do this with a digital output. If one or both of these is not true, then an optoisolator is probably the simplest option.
You can get a relay module rated at 10A 250V for under a buck from some china suppliers. They are designed to work with the Arduino and have an onboard transistor to drive the relay. Try this link: Arduino - Relay | Arduino Tutorial
Please explain why they are the same. To to me a relay is a mechanical device that does not care if it is AC or DC being controlled. A FET is an electronic device that only does DC. If you check the link the transistor/fet driver for the relay is on the module which was designed for logic level inputs.
you can't simply connect relay to arduino, you need current amplifier and not forget a flyback diode, so i mean if a transistor is anyway there, then it is simplier to use this one transistor
Thanks everybody for all your ideas. I spent time measuring voltages everywhere in my circuit and it is so low that my meter couldn't tell. However, to stay on the safe side, I relatively small relay board ($9 from Amazon) and that did the trick.
Again I want to thank all of you for your invaluable input!
Very best regards
Enrique
I think that for a lesson, led13 could indicate the switch state.
Then, every Arduino with a led13 would be enough.
A kit of sensor 'switches' and electronic switches could make many lessons.