Thermistor Project Problem - I don't know how to progress on the final stage of my work

Thread Starter

jonaas18

Joined Apr 4, 2019
67
The general idea of my project is to create a circuit which reads the temperature from a NTC sensor and displays it on the computer screen. I created a thread a few months back as I needed help to start my thermistor project (https://forum.allaboutcircuits.com/...ridge-instrumentation-amplifier-stuck.158439/). I am now stuck as I have no idea how to progress, so here's where I'm at:

  1. As you can see from picture nº1, I've successfully built a Wheatstone Bridge + Instrumentation Amp. circuit and the outputs are correct (for a 55ºC - 150ºC temperature gap, I successfully achieve the [0 ... 5]V gap required).
  2. Picture nº2 shows both the Bridge and the I.A. output voltages depending on the current temperature, everything fine!
  3. I then proceeded to build 2 signal conditioning circuits (as shown in picture nº3) as I was required to break my I.A. output in 2 parts (this was made so that 1 part would be more accurate (55ºC - 95ºC to a [0...5]V gap) than the other (95ºC - 150ºC to a [0...5]V gap). My commutation point is 95ºC, 3.25V ).
  4. Picture nº4/5 shows both outputs according to their respective temperature gaps. As you can see, the graph in picture 4 is way more linear than the other, making it easier to read small temperature changes.
  5. Given that I'm choosing one of the two signal conditioning circuits, I had to build a non-inverting voltage comparator with hysteresis (picture nº6) in order to compare my commutation point voltage (3.25V) with another voltage (after following my teacher's explanation + calcs, I figured out that the other voltage was 3.25V ± 55mV). Can attach my calcs later if needed.
With this, I'm having a lot of trouble explaining what I did on point 5 as I have no idea if the explanation I gave (about comparing the 2 voltages) is right.
Besides that, I also have no idea how to connect all of this to a multiplexer as I'm required to do in order to manually (????) switch between the 2 signal conditioning circuits. AFTER THAT I'm even more confused as I have no idea how to connect all of this to my arduino / arduino's ad converter (even though that's the least as I have made lots of research on that topic and I am used to code arduinos in other subjects).

I am sorry if something is hard to understand but I'm up to explain things better in order to learn and get the best out of this project on my evaluation day.
 

Attachments

wayneh

Joined Sep 9, 2010
17,496
Besides that, I also have no idea how to connect all of this to a multiplexer as I'm required to do in order to manually (????) switch between the 2 signal conditioning circuits. AFTER THAT I'm even more confused as I have no idea how to connect all of this to my arduino / arduino's ad converter
Why not connect both to the Arduino and then decide in code which signal to use? Surely the Arduino has more than one analog input? Sorry if I've misunderstood your predicament.
 

Thread Starter

jonaas18

Joined Apr 4, 2019
67
That's an idea aswell. I'm the one who has to apologize as it's the first time I'm making something like this and I'm not sure what's the expected outcome. What you mean is, I can connect both outputs to my arduino and code it so it decides which one to use? Do I need the voltage comparator then or is it useless? (I am required to use my voltage comparator circuit)
 

ericgibbs

Joined Jan 29, 2010
18,766
  1. Given that I'm choosing one of the two signal conditioning circuits, I had to build a non-inverting voltage comparator with hysteresis (picture nº6) in order to compare my commutation point voltage (3.25V) with another voltage (after following my teacher's explanation + calcs, I figured out that the other voltage was 3.25V ± 55mV). Can attach my calcs later if needed.
hi j,
This clip from your circuit is incorrect, there is no 'positive feedback' hysteresis on the Comparator.??
Check the R12 and R13 'hysteresis' resistors.???

E
 

Attachments

Thread Starter

jonaas18

Joined Apr 4, 2019
67
hi j,
This clip from your circuit is incorrect, there is no 'positive feedback' hysteresis on the Comparator.??
Check the R12 and R13 'hysteresis' resistors.???

E
That's not the comparator. The comparator is the circuit down below with the Vin ac source. Those 2 circuits are the signal conditioning circuits. The upper one is for the 55°C - 95°C range and the other for the 95°C - 150°C gap.
 
Last edited:

Thread Starter

jonaas18

Joined Apr 4, 2019
67
hi j,
This is your circuit in LTSpice, please check it for accuracy, we then can compare our results.
E
Circuit is the same AFAIK, tho I have no idea what are those output values of Vo, tp1, tp2 and tp3. I never got anything like that. I've been simulating my project regarding temperature changes by replacing your R3 value with my sensor's expression: {R0*exp(B*(1/(T+273.15)-1/(T0+273.15)))}, beeing R0 = 10K, T0 = 25 and T the changing variable. While you're simulating for a specific resistance value (2989, which means 55ºC only). Anyways, the circuit is the same.

I've talked to my professor and I figured out that both my signal conditioning outputs are correct. Also, I'm supposed to replace that VSin source (the ac voltage source on the comparator) with the A.I. output so it can compare with the reference voltage I created on that same circuit (with the voltage divider). What I need to do now, apparently, is to connect both the signal conditioning outputs to a MUX or an analog switch, aswell as the comparator output and then code it (????????) so that, if the voltage on the comparator is X it automatically switches to signal conditioning circuit 1 and if the voltage is Y, it automatically switches to signal conditioning circuit 2. I'm not sure if that's what he meant and I keep getting more and more confuse each time I open the project lol.

Thanks a lot for the reply, means the world to me that someone takes the time to help with simple things like this.
 

Thread Starter

jonaas18

Joined Apr 4, 2019
67
OK. Are you also required (or allowed) to use a multiplexing IC? You could even use a simple relay since there are only two choices.
Hi!

I'm sorry, but by "multiplexing IC" you mean something like the 74HC4051 component? If so, yes I'm allowed to use it. It's really up to me to use what I need to in order to get my program to work tho I am required to follow my professor's orders. For example, I'm using a voltage regulator instead of manually dividing the voltage with resistances and so on and so on.

What is a simple relay?

I created an analog switch with the help of some PDFs my professor gave, but it's giving me errors. As you can see down below, the output is fine but when at 95ºC, the voltage isn't reaching 0V but instead it only goes to 1V before moving back up to the 5V. It's supposed to reach 5V at 95ºC, lower itself to 0V (with a small temperature change: 5ºC or so) and then reach 5V again when at 150ºC.
 

Attachments

wayneh

Joined Sep 9, 2010
17,496
What is a simple relay?
Exactly that, a small relay. The coil current could be controlled by a comparator (with a transistor to increase the output current if necessary) and the relay would switch between the two sources.
Kind of like this, where R2 is the relay coil. (LT1017 was just a handy comparator to choose in LTspice. I usually use LM339.)

Screen Shot 2019-05-31 at 3.02.39 PM.png

 

Thread Starter

jonaas18

Joined Apr 4, 2019
67
Exactly that, a small relay. The coil current could be controlled by a comparator (with a transistor to increase the output current if necessary) and the relay would switch between the two sources.
Kind of like this, where R2 is the relay coil. (LT1017 was just a handy comparator to choose in LTspice. I usually use LM339.)

View attachment 178648
Hmm got it, but how would I connect it to my 3 outputs (2 signal conditioning circuits + comparator)?
 

Thread Starter

jonaas18

Joined Apr 4, 2019
67
I added a diagram of the relay. Does it make sense now? B & C are the two signals, A goes to the Arduino. R2 is the coil of the relay.
Hugh yes and no.. I kinda understand the diagram but how do I picture the coil and the "switch" of the diagram on the first picture?? Like, how do I connect the 2 signals + the comparator output when all there's left to connect on the first picture is the - / + inputs of the opamp?

Sorry :(
 

wayneh

Joined Sep 9, 2010
17,496
Hugh yes and no.. I kinda understand the diagram but how do I picture the coil and the "switch" of the diagram on the first picture?? Like, how do I connect the 2 signals + the comparator output when all there's left to connect on the first picture is the - / + inputs of the opamp?

Sorry :(
The idea is very much like what you have in 1.png in #9, with a couple changes: 1) The op-amp comparator is replaced by a genuine comparator. This is not essential but a comparator is designed for this exact purpose. 2) The relay replaces the two FETs. I'm not sure what the voltage drop across the FET might be, but the relay should be even less. If the ∆V of the FET is acceptable, it's a toss-up.
 

Thread Starter

jonaas18

Joined Apr 4, 2019
67
The idea is very much like what you have in 1.png in #9, with a couple changes: 1) The op-amp comparator is replaced by a genuine comparator. This is not essential but a comparator is designed for this exact purpose. 2) The relay replaces the two FETs. I'm not sure what the voltage drop across the FET might be, but the relay should be even less. If the ∆V of the FET is acceptable, it's a toss-up.
Got it. However, I'm afraid that I can't replace my comparator with an actuall comparator (this is one of the things I was required to do manually)
 

wayneh

Joined Sep 9, 2010
17,496
Got it. However, I'm afraid that I can't replace my comparator with an actuall comparator (this is one of the things I was required to do manually)
Not a problem, an op-amp can do the job. However if you do decide to use a relay, you would want it to energize the coil in only one polarity - so use a diode in series with the coil and another antiparallel to the coil, to absorb the inductive spike when current is removed. The relay will have a spring to pull back the moving part, so you don't have to do that with reverse current in the coil.
 

Thread Starter

jonaas18

Joined Apr 4, 2019
67
B & C are the two signals, A goes to the Arduino. R2 is the coil of the relay.
So, if I understood it right, it would be something like picture 1? I'm not really sure how to connect R2 because I'm really not understanding what "coil" means in my language. I've been searching for it for ages on google but the direct translation of coil is an inductor, which isn't what I want.

Also, I have lots of relays here. I'm using a SPDT one but I have no idea if it should have bouncing or not.

Would it be easier to simple use a MUX like the 74HC4051 one?
 

Attachments

wayneh

Joined Sep 9, 2010
17,496
So, if I understood it right, it would be something like picture 1?
Yes, that's right. Now you just need to power the coil.
I'm not really sure how to connect R2 because I'm really not understanding what "coil" means in my language. I've been searching for it for ages on google but the direct translation of coil is an inductor, which isn't what I want.
The coil of a relay is indeed an inductor. It's an electromagnet that moves the switching parts in response to current in the coil. Every relay is designed for a particular voltage at which it will switch reliably. At that voltage it will draw a current depending on its DC resistance. If you have a really that can be driven directly by the op-amp, that would save adding a transistor. But that's unlikely and I think you'll need a small transistor to drive the relay coil current.

Also, I have lots of relays here. I'm using a SPDT one but I have no idea if it should have bouncing or not.
Do you mean debouncing? This should be taken care of by your comparator - it needs a little bit of hysteresis to avoid chatter (bouncing) of the relay.
Would it be easier to simple use a MUX like the 74HC4051 one?
Maybe! I've never tried one. The issue you have is that you are handling an analog voltage and mVs matter. You want to be sure it isn't altered by whatever switch you use. If that part can do the job, go for it.
 

Thread Starter

jonaas18

Joined Apr 4, 2019
67
Yes, that's right. Now you just need to power the coil.
The coil of a relay is indeed an inductor. It's an electromagnet that moves the switching parts in response to current in the coil. Every relay is designed for a particular voltage at which it will switch reliably. At that voltage it will draw a current depending on its DC resistance. If you have a really that can be driven directly by the op-amp, that would save adding a transistor. But that's unlikely and I think you'll need a small transistor to drive the relay coil current.

Do you mean debouncing? This should be taken care of by your comparator - it needs a little bit of hysteresis to avoid chatter (bouncing) of the relay.
Maybe! I've never tried one. The issue you have is that you are handling an analog voltage and mVs matter. You want to be sure it isn't altered by whatever switch you use. If that part can do the job, go for it.
Yea I got it. I'm trying to use the multiplexer while reading through some articles online but nothing really explains it in detail. I'll keep trying and simulating till I find some solution
 

Thread Starter

jonaas18

Joined Apr 4, 2019
67
Went back to my original idea about doing the analog switch. I found out that not achieving 0V on my commutation point (at 95ºC) has something to do with voltage / current on the branch indicated down below. Any idea why that messes up my circuit? Reviewed my calcs and they're correct, exactly like my professor explained.

Also, by changing the components (fets) the output changes aswell, so it might be these components fault (???)
 

Attachments

Top