Which relay and how to connect

Hi,

I have a circuit that evaluates a NTC thermistor. Now I want to add an optocoupler controlled by an PWM of an Arduino to have the opportunity to simulate some NTC values. I want to connect the optocoupler via a relay (or are there better solutions?) in order to have the possibility to switch between the real ntc and the optocoupler. And In the case that the Arduino has no power the NTC should be switched on.

My questions are:
What relay do I need and how do I have to connect it? It would be really helpful if you can name me a specific product :slight_smile:
Do I need any other parts?

Thank you very much

best,
math

Well your drawing is a mess. You have the thermistor and it's resistors wired wrong such as the arduino analog input pin will always and only see +5vdc applied to it.

As far a your need to simulate a thermistor signal you don't need a opto isolator or a relay. What you have to do is to wire a low pass filter on the arduino PWM output signal and then wire that then true analog output voltage to a different arduino analog input pin. Then in your sketch you can switch to reading the thermistor value or your simulated value any time you wish.

Lefty

Thank you Lefty for your comment.

Sorry for the mess. I'm very new to electronics. The upper ADC is not from an Arduino, but part of a different system which evaluates the NTC and I can't alter it. But it seems I got it wrong. The L,R,C parts should somehow be organized in order to filter the signal because the NTC is connected via a long wire :slight_smile:

I hope it is getting clearer why I want to use an optocoupler and a relay. It's because I can only connect to the system directly at the NTC and I want a galvanic separation of the arduino and the other system.

any more help? :sweat_smile:

Any small signal reed relay which switches at 5V would do this job fine. You're not working with any big currents or voltages here.

In general a relay should be controlled via a transistor (typically NPN, plus base current limiting resistor) from the microcontroller as they usually require more current to drive them than the microcontroller can provide. A flyback diode across the relay coil is also needed to stop any back-emf from blowing the semiconductors up when the relay switches on/off.

=M=