NTC temperature sensor simulation with digipots

Hello everyone.
I am new to the forum and starting my experience with Arduino.
I had the Arduino Uno test board in my office and I decided to see if I could use the Arduino board to create a simulation kit for our equipment.

In our office lab we get various controllers that we need to test with our BMS system. These controllers have all sort of inputs, from 0-10V to 4-20mA, from NTC to PT1000 for passive temperature sensors.
If we wanted to hang a controller like this to our BMS and simulate the sensors to see the controller "working", we could easily send a 0-10V or 4-20mA signal using our dedicated I/O controller and that would sort out these active inputs, but it is a lot more difficult to simulate a passive temperature sensor... We currently do that using a manual multi turn potentiometer, but with this solution we can't create any simulation automation (for example, the controller is running a heater and the temperature starts to increase).

The idea I had was to use an Arduino to do that.
Connecting the Arduino over Modbus 485 to our lab PC so we can send a modulating "temperature" value, transpated into steps for a digital potentiometer. The digital potentiometer driven then on SPI protocol by the Arduino.

I started the prototype to simulate an NTC 10Kohm sensor.

I've used a MAX485 integrated circuit to access the Arduino from our computer and dynamically change the desired resistor position.

I could have used only a 100K pot to have the full range of the NTC sensor, but to gain the desired resolution I've used 2 digipots, a 10K AD8400ARZ10 and a 100K AD8400ARZ100 with the wiper of the 100K going in series to the B connector of the 10K and the wiper of the 10K then being the resistor output.

On the Arduino I've coded so I step the 10K first, and every 10 steps on the 10K I provide a step on the 100K and restart using the 10K from 0.

I got the circuit working perfectly fine, using an external multimeter I can read the resistance value changing as I would expect and I can drive it correctly using Modscan from my lab computer, very exciting!

I then got a controller and connected one of its NTC input to the digipot (like I did before with the multimeter) to see what I would read from it... It didn't work, the resistance measured is not correct, it is floating and far off the value that I measure with the multimeter.
I've tried 2 different controllers and got 2 different situations, both wrong.

I read a bit over the internet, and it seems it might be related to a different ground issue, as the digipot is powered by the Arduino and the controller is powered by its own psu.

How can I solve the problem?
Sorry if I might have made some electronic beginner mistakes there, but I really would like to learn and get it to work, it seems so close...

thanks for the kind help!

nobody? :frowning:

Hi,
Have you tried connecting both gnds together?
I haven't used digipots but I don't think their outputs are isolated from the arduino.

Tom.... :slight_smile:

All the terminals of the pot have to be within the voltage range of the chip.
Leo..

Thanks everyone, the voltage is good, it was the ground as pointed out!

You have to make sure the instruments are all at the same reference basically.

It works now, so if anyone else is going to try the same experiment just make sure you take care of the grounds :slight_smile:

How big is this battery that you're using? Like, 100V or greater? If so, then you want to keep it isolated for safety reasons.

Opto-couplers would be the right way to have an Arduino interface with a digital pot that is referenced to your battery. You will need VDD for the digital pot that is referenced from the battery. If you don't have that available, there are things you can buy that will both opto-isolate the communication lines while generating the isolated 3.3V for VDD

Ramses82:
Thanks everyone, the voltage is good, it was the ground as pointed out!

You have to make sure the instruments are all at the same reference basically.

It works now, so if anyone else is going to try the same experiment just make sure you take care of the grounds :slight_smile:

I'm sorry but this is bringing up memories of when I worked at a Li-Ion battery company and a firmware guy set his laptop on fire.

Unless your BMS is at a low voltage, use isolation between it and your Ardunio. Here's a demo board that will do it -> LTM2883

Large batteries are isolated so that you aren't one fault away from a disaster. If you connect your ground to it, you lost that isolation. It will work as long as you don't have any other faults, but as soon as you get one you'll blow things up.