Thermistor circuit on PCB

Hi all,

Please let me know if this should be in general electronics section.

I have a simple thermistor circuit, the code is tested on a breadboard and works fine. 10K thermistor with 92K bias resistor.

I am finding A0 is always reading INV/0 when controller is in attached PCB with thermistor connected. Connecting A0 to 5V, I do get 1023.

Can anyone suggest a possible cause for this or what I can try next?

The controller is working as the other features of the PCB are operational and the coloured terminals have been checked when assembled.

Multiple controllers swapped back and forth with UNO so not ADC. For testing, the PCB is being supplied with 5V (not 3V6).

Thanks,
Ben

Did you check that the point you marked in red is providing 5V? Did you check if the 92k resistor really has that value?

Yes, 5V at red and 92K resistor checked. GND also checked.

And what voltage do you read with the multimeter at any white marked point? Do you have schematics used for that board?

About 0.5V. Definitely my board that is at fault. Image attached. Thanks!

(PCB allows command to be sent to tag from server, operate solenoid valves in sequence, and measure temperature to send back to server)

What temperature range are you measuring? If it's between -55C and +125C, you can use a digital sensor like a DS18B20. Change the bias resistor to 4.7K (or anything between 3K and 10K) and wire the 'power' pin of the DS18B20 to ground to put it in 'parasite power mode'.

Are you sure the sensor wiring is good? Nothing shorted?

You're driving a 91Ω relay coil (39 mA @ 3.6V from pin PB1 with no kickback diode? Please explain the TIP120 circuit (T_GND), I don't get it. :confused: TNX

Hi,
Can you post a jpg image exported from your PCB CAD application, so we can see your PCB pattern?

What is the application and why the latching relays.

Can you explain the use of the two TIP120 transistors please?

Thanks.. Tom.. :slight_smile:

Thanks for replies.

The 2 latching relays are used to switch the polarity of the 6V that is supplied to the solenoid valves to operate.

Solenoid circuit closed by transistor on arduino pin 8.

The smaller relay is used to reset the tag/radio on arduino pin 9.

The other transistor is used for the tag/radio to turn on controller (high state to close controller circuit).

Schematic export is attached above. Board images attached.

In case this is what you meant..

BoardExport.png

A simplified version of the circuit works (controller circuit closed with soldered bridge). Image attached. The temperature readings are accurate.

Without the essential free-wheel diodes across each relay coil you are destroying all your Arduino pins
driving them.

Thus the relays will no longer switch and you don't get a supply to your thermistor circuit.

The standard relay drive circuit uses a transistor, as most relays take more current than an
Arduino pin can safely supply. If you are driving several relays then use an ULN2003 or UN2803
which can drive 7 (or 8) relays with no extra components as it has all the resistors, transistors and
diodes built in.

Thanks.

The controller and thermistor circuits had supply during test but will add the diodes to back of board once the relays go in and try the ULN2003 in the next version.

Correct me if I'm wrong but the ATmega is not grounded. So it cannot measure a voltage.

Maybe the T_MEGAPWR is meant to ground the ATmega but you won't have a direct ground connection and in that case T_GND should be the base GND for the rest of the circuit.

Hi,
Thanks for the images.

Please explain why you have a 3.6V and a 6V supply?

Where is the common ground connections between them?
I see the 6V snake around the schematic and finally get to the relays where it is switched, but;
What does R V- an R V+ resistors do?
What and how do the two TIP120 transistors operate?
Especially when one one of them has its collector to gnd?

PLEASE explain what your application is, read back over the information you have supplied?
Does it have an RF module?
What do the latching relays control?
What does the thermistor measure and how does it influence the operation of the latching relays.
What is the aim of this controller?

Thanks.. Tom.. :slight_smile:

Hi Tom,

The MoQ for a 3V version of the solenoid is 5000/off. The 6V version is off the shelf. Tag accepts 3-6.5V but I was worried about blowing the controller at 6V.

I have not connected the grounds of the 6V & 3V circuits.

The tag sends it's own voltage with each blink/transmission but we need to monitor the 6V cellpack too so RV+ and RV- are the resistors for simple volt monitor.

I used the transistors to avoid pulling too much current on controller/tag output pins.

Transistor 1 (T_SVPWR) completes 6V circuit to apply momentary supply to solenoids (open/close)
Transistor 2 (T_MEGAPWR) is suposed to supply power to controller when the tag output pin goes high.

The grounded collector is likely a mistake by me.

Requirement: receive command from server > start flush sequence > open valve 1 > wait 2 min > record temperature and send to server > close valve 1 & open valve 2 > wait 2 min > record temperature and send > close valves > reboot tag for reset

'Tag' refers to RF module (433MHz)

Latching relays are used to configure solenoids, ie switch polarity so when current supplied, they make desired movement.

Thermistor reading sent to tag by serial, no logic applied to result.

Controller is supposed to manage this operation.

This afternoon I have got the thermistor working, well changed the thermistor & bias resistor from 100K to 10K, changed code to deal with negative temp coefficient, and have good readings. Ditched the R lookup table too. This is with all components in place.

Useful comments below guide:
http://www.circuitbasics.com/arduino-thermistor-temperature-sensor-tutorial/

I am still concerned that my lack of knowledge has led to a few no-no's so advice is really appreciated.

This may make the valve operation plan clearer..

hackysack:
I have not connected the grounds of the 6V & 3V circuits.

The tag sends it's own voltage with each blink/transmission but we need to monitor the 6V cellpack too so RV+ and RV- are the resistors for simple volt monitor.

Transistor 1 (T_SVPWR) completes 6V circuit to apply momentary supply to solenoids (open/close)
Transistor 2 (T_MEGAPWR) is suposed to supply power to controller when the tag output pin goes high.

The grounded collector is likely a mistake by me.

Requirement: receive command from server > start flush sequence > open valve 1 > wait 2 min > record temperature and send to server > close valve 1 & open valve 2 > wait 2 min > record temperature and send > close valves > reboot tag for reset

'Tag' refers to RF module (433MHz)

Latching relays are used to configure solenoids, ie switch polarity so when current supplied, they make desired movement.

Thermistor reading sent to tag by serial, no logic applied to result.

Controller is supposed to manage this operation.

How do you measure the 6V if it is not referenced to the 328 gnd?
Gnd switching the 328 to turn it ON and OFF is not recommended because of leakage through the 328 I/O pins, it may not switch OFF.
The TIP120 on your PCB also connected C to gnd and E 328 gnd pin. Wrong way around.
With the circuit active, measure the voltage between gnd plane and gnd pin of the 328.
This means the 328 gnd is not at the gnd that the rest of the circuit is at, including the thermistor gnd.
This is possibly where your thermistor readings are in error.

You need to HIGH side switch.
What are your power sources, and why do you want to turn the controller OFF?
Put the 328 to sleep if you need to save power, that way it will respond quicker.
If power supply is no problem,
Use normal relays.
Wire the output of the relays to make it fail safe, that is if the supply to the controller fails the relays will drop out and the valves in a go to a safe position.
At the moment, if your controller PCB fails the latching relays will keep what ever valves are open or closed, and not go to a safe condition.
Power the entire system continuously.

Tom... :slight_smile:
PS. Sorry I design and repair industrial control systems, and power fail is along side safety, a big consideration when getting a system going.

Thanks Tom, will go through in detail.

hackysack:
Using a Thermistor | Thermistor | Adafruit Learning System

I followed the same example but with input at ADC5 ie A5 not A0 and it works.
Also the other resistor in series is 10 K not 92 K. with 92 K the sampled voltage at ADC pin is I/10 which is close to the floor.
I am using a thermistor taken out from the BMS of my MacBook pro spent battery.