• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Converting low side switch to high side with voltage level converson


Active Member
Hello all,

Its been a while since I have screwed around with circuit design and and have trouble getting my head around something.

The control board in my water softener went bad. Its old enough I didn't want to buy a new board. I have a cheap PLC running some other stuff at home so I just added the softener regen cycle to that. That works fine but I have to manually tell it when to regen since it no longer keeps track of water usage. To keep track of water flow it has an impeller with a magnet on it that spins when water flows. There is a hall effect type IC that picks up the passing magnet and generates pulses. This is packaged in a way that doesn't allow me to see if it has any numbers on it to pull up a data sheet but I have screwed around with it enough to figure out it works like a low side switch.

I want to run this at the original 12 volts like the original control board supplied it. I need to convert the low side 12v switching to switching the PLC 24v supply high side.

Is there a way I can do this with a simple PNP or NPN transistor? I have been pondering this for a bit and can't figure out how to change voltage levels.

One thought is to use a transistor type optocoupler. Sadly all I have on hand are triac types and I don't belive those would work?

Is there a simple solution I am overlooking?


Active Member
I thought about that. Wouldn't I have to subject the hall effect IC to my 24 volt supply though? I am worried about wrecking it since I have no datasheet to tell me what its rated for.


Well-Known Member
Most Helpful Member
If you use a pullup to the 12v supply then you'll have a 12v sqarewave which should trigger the input of the PLC.



Well-Known Member
Most Helpful Member
To give a full 24V signal, you need either a two transistor circuit, or you can just use a darlington optocoupler - we use those to provide floating signals for PLC inputs.

A 4N32 is suitable; use the existing hall signal to switch the LED, with a resistor in series to set the current.
Then connect the output transistor between 24V and a PLC input.

That device has a high current gain, a minimum of 5x, and the output transistor is rated up to 100mA and 30V.
I'd aim for around a LED current around a third of the maximum PLC input current to ensure the transistor is saturating.


If you wanted to use transistors:
Use an NPN transistor with base connected to 12V, a 10K resistor from emitter to the hall sensor output and another from emitter to 12V.

Then a PNP transistor, emitter to 24V, with 10K resistors base - emitter and base to the collector of the first transistor.

The collector of that goes to a PLC input.


Well-Known Member
Most Helpful Member
Most of these which I have seen are an NPN Open Collector output. I would try just tying a 10K resistor between Vout and Vcc and see what you get. The next problem is knowing what is commonly called a "K" factor which is how many pulses per unit of measure, for example pulses / Liter or pulses / Gallon. This can be figured if you can count the pulses while opening for example a ball valve and filling a known container stopping at full.

Flow is normally measured as a Rate or Totalizer function and you want a totalizer.

That's My Guess

Nigel Goodwin

Super Moderator
Most Helpful Member
It's difficult to know exactly what this unit uses?, but most commercial water meters (and all the associated units) simply use open-collector, open-drain, or simply reed relay contacts - all are simple pull downs to earth/chassis, and work identically.

Assuming this unit does the same?, it's dead simple to feed a PLC - you simply connect it to the input, and chassis and either enable an internal pull-up., or add an external one - job dine.

Our core business is making splitters for the water industry, either passive or active, and the continuing trend to want water meters connecting to PLC based BMS's (Business Management System's) has required the design of a new type to be compatible (neither the existing active or passive ones worked). The new ones use an open-drain FET with 100 ohm series resistor (for current limiting), exactly as many water meter adaptors do, and work perfectly with PLC's.

So it could very likely be extremely simple - you just need to confirm if it's an open-drain etc. connection to ground - if so you only need one resistor, if that. You don't need to create a high level switch.

Latest threads

EE World Online Articles