Understanding how to 'inject' current

I feel I should know this.... but I don't.

I found some old PIR PCBs with a thermistor onboard while clearing out a friends workshop.
They are fully populated, but not calibrated.

I found a piece of paper in the box that says the following:

If you inject 250mV into the board in place of the temp sensor, then that represents 25.0 ⁰C

How do you inject 250mA? I am assuming using a resistor.

I believe these particular PCBs are 24v DC. I am trying to draw out the schematic circuit now.

So is that as simple as 24/250mA = 96R?

Sometimes, I just wish I could get my head around this stuff.

You are mixing up mA and mV

1 Like

Oh yea! Ha.... been a loooong day

250mV.... blimey. My ropey old PSU is going to struggle with that

To answer the question you asked: with a constant current source.
To answer the question you intended to ask: with a voltage source at the voltage you want.

Yes...

I'll file that one under 'stupid question'

1 Like

Not really. The term "inject" does kind of imply a current and not a voltage.

2 Likes

Well hello

OK... Been tinkering with these odd boards...

They have a PIR onboard.
No idea of the voltage. From the chip that the power goes into, it looks like it supports something like 9-36v. There is only a 2 terminal connection to the PCB.

The output on the PCB says 4-20mA dependant on temperature? Eh?

How do you test a 4-20mA output?

I don't have a schematic, but from what I can deduce, it looks like there is a thermistor/temp sensor that is outputting the 4-20mA signal (via a PIC).

Not sure what the PIR does to that output. Possibly short it or move that 4-20mA outside of that range.

But, my question is basically how do I test this?
Is it as simple as applying voltage with an ammeter in line and reading the current?
Surely that output would fluctuate depending on the leds + PIR operating on the board?

Me no understandy. But... I'll never learn unless fry one

Just found this...
If it helps at all...... One of the PCBs has a piece of paper taped to it

With test jig connected to J3,
*set RV2 to read 6mA with 100mV injected *
Test for 18mA with 300mV injected.

Place link between 2 & 3 when complete.

I don't have the 'test rig' obviously. How do you 'inject' voltage like that and read the current? Don't think my bench PSU will pump out 100mV.

I think I need to understand this so I can design a test rig. Interesting project.

PIR , Passive Infra Red is used for Alarms (Human detection).

Post a Photo of the PCB.

I found these PCBs at a car boot (whole box of random PCBs for £5)
I think they were made by someone.... certainly not professional, as they have nothing written on them.

After some more investigation, I think these are something to do with a heating system or building management.

I think the module reads temperature over some kind of 4-20mA bus (which apparently after a Google is a thing).
I believe the PIR does something to that signal to indicate presence.

The output of the PIR chip goes to the PIC, as does the temp sensor.

I'll take some pics tonight

So I have been reading up on 4-20mA sensor systems and I think that is what this was used on.

With a supply of 24v and a 250R resistor in the circuit, I understand that outputs the 4-20mA signal.

So I should be able to read the analog in with an arduino.

Oh my God

How horrible is MPlab X IDE. Thought I would tinker with the PIC, but I just cannot get the PC software to install correctly.

Forget that idea

Sorry. Not had a chance to get this PCB photographed and the schematic drawn yet.
Must do that tonight.

But, this clearly works as a 4-20mA sensor.

Trouble is... I am thick as white bread and STILL cannot get my head around how this type of system works.

The sensor has 24v DC written on it. I have been looking at how this is supposed to work and I just don't understand the current/voltage relationships going on here.

For instance, I found this 24v 4-20mA source diagram:

So this is reading the analogue output of the loop into the Arduino (don't remove the resistor!)
That is then V= mA x 250R. So for example if the sensor is outputting 12mA, then the Arduino should be seeing 12x250 = 3V.

This image says the supply voltage is 24v 20mA.
instrumentationtools.com_how-a-4-20ma-transmitter-works

How is that supply 20mA? I assume the sensor takes 20mA as a steady load and then spits out the adjusted mA signal?

Oh I wish my brain worked

I'm not clear what you don't get. The supply is 24V. The sensor has circuitry in it that uses the 24V supply to generate a constant current output in the range of 4mA to 20mA.

To put it differently, the sensor circuitry adjusts the voltage dropped across itself such that the 250Ohm resistor has the right voltage across it such that, according to Ohms Law (which you seem to understand), the resistor draws the current that the sensor intends it to draw for the output it is signalling.

EDIT:
This:

Suggests to me that you don't understand

Particularly his law about current. If you don't understand it then please learn it, if (when) you do understand it then apply it to the circuit, taking into account your comment above.

Electricity is somehow similar to water in a pipe. To have water flow, you need water pressure : no pressure, no flow. Electricity pressure is voltage. Lets say 24 PSI is the same as 24V. Now, if the water tap is closed, despite the pressure, you have no flow and the more you open it, the more the flow, you're decreasing the resistance to flow. The flow of water is measured in liter/sec as the flow of electricity (we call it the current) is measured in Coulomb/sec or Ampere (or milliAmpere here). Let say 4 ml/s is 4 mC/s or 4mA.

Your 24V DC power supply in the drawing called "How a 4-20mA transmitter works" has a capacity of up to 20mA but won't deliver it if you don't require it. It provides a "pressure" of 24V whatever the flow as long as it is below the limit.

The transmitter below is an "automatic tap" that will automatically open and close so that the current (water flow) at its output is representative of the information it want to transmit.

If your temp sensor can measure between 0°C and 50°C, your transmitter will send 4mA to indicate 0°C and 20mA for 50°C and any value in between proportionally to the temp.

The easiest way for the receiver to read that current is to send it through a resistor.
As U=R.I, a 250Ω resistor will have 5V across it for 20mA and 1V if 4mA. You just need to read the voltage to know the temp. If it read 0V, you know there's something wrong with the circuit.

If you don't have a 250Ω (four 1kΩ resistors in parallel is 250Ω), you can use a 220Ω with a 0.88V to 4.4V voltage span.

I am clearly not getting this.

Trying to calibrate this sensor, Don't know why, I don't need it.... but I hate being beaten.

After looking into all the parts, this is a PIR sensor that is controlled by a PIC.
There is an XTR117 4-20mA generator that is connected to both the PIC and an LM35-LP temp sensor.

From what I can deduce, the temp sensor output alters the output of the 4-20mA IC depending on the temp. Fine. That all actually seems to work.

The PIR via the PIC seems to short this input out high, therefore I presume to hold the XTR117 output at 20mA.

So, on the PCB, it has a 3 pin connector (J3) that is the calibration point.
This consists of 3 pins:
A: GND
B: The output of the sensor
C: The input to the XTR117 IC.

RV2 is a multi-turn 500k pot on the input to the XTR117 IC.

In normal operation, B&C are shorted. If I short these terminals, the mA reading on the 4-20mA output appears to change as expected with temperature (but un-calibrated).

SO.. on the back of the PCB is written:

With test jig connected to J3,
set RV2 to read 6mA with 100mV
injected.Test for 18mA with 300mV injected.

Place link between B & C when complete.

So, this is where I am clearly going wrong.
I made a simple voltage divider on a 5v supply that produces 100mV and 300mV (approx).

I inject 100mV across pins A and C and get zip. The output of the 4-20mA IC doesn't change at all with the alteration of RV3.

What am I doing wrong? Is it my janky 100mV/300mV injection circuit?
Think I may have to admit defeat here!

You managed to reverse that circuit. Nice job. The pot is probably for calibration, so just use it to get output you want.
Since you don't have "test jig", why to bother your brain with that note...

Reverse it? I assume you mean reverse engineered and not reverse wired it!

Just would be nice to understand why I can't get the calibration bit to work

reverse engineer :wink:

Pot is not changing output?
Then it's for PIR.

Not it not for the PIR.
I have reverse engineered the PIR circuit and the associated sensitivity pot for that (plus there is a a second pot called 'Sense').

The pot it called 'Calib' on the PCB.

Looking at the XTR117 datasheet, it doesn't recommend inputs of less than a volt.
I am wondering whether the 100mV should be a volt? Worth a try #smokeypcb