Proximity Switch, inductive
For reading out a water counter in the house, I needed a sensor to detect the flow of water.
The counter is the type Sensus 620. It has a rotating pointer with a resolution of 1 liter per turn.
The rotating pointer (liter wheel) has a diameter of about 1 cm, half size made of an aluminum (? non magnetic) plate. I first tried to use an optic reflex sensor, but this did not work.
Next try was with an inductive sensor. In order to keep the cost low, and know about the internal data, I build my own one. That was not so easy as it looks like. Special integrated circuits like TCA205 (Siemens) or TCA505 (Infineon) are no longer in production. A chip A301D is mentioned as a TCA205 replacement, but is not pin compatible.
After finishing a prototype, the next step was to build 2 units with components you can actually buy on the market.
First question is about the inductive sensor. From an application note of the TCA205 it could be seen, that usually one half of a pot core is used.
The circuit is a Colpitts oscillator with rectifier and Schmitt-Trigger. For more efficient rectifying a PNP transistor is used.
First I tried the Collpitts oscillator on a breadboard, but I got no oscillation.
I thought it is easier to simulate the circuit with a simulator, e.g. LTSpice. For the download of LTSpice 4, look at the Links.
Look at the picture to the right for the final circuit diagram.
A simulation of the circuit showed a perfect oscillation. So, the problem could be the coil only, core N28, 14 mm diameter.
The coil resistance was measured with 0.5 Ohm, I put that in the simulation. Bingo, the oscillation stopped in the simulation. The solution was to increase feed back capacitor C1 to 330 pF. Now the oscillation started again.
Next step was to build up this circuit on a breadboard.
See the picture on the right for the breadboard setup (click on the picture to enlarge it).
Yes, it oscillates, but very weak. It must be again the coil.
The DC resistor was 0.5 Ohm. There is also a loss resistance, simulated by a parallel resistor (3k3). Again, the oscillation stops in the simulation.
The solution was to decrease the Emitter resistance to 1 KOhm, and increase the feed back capacitor to 680 pF. But the detection sensitivity was very poor.
Fortunately I got a better core from a friend, material N22, diameter 11 mm, 47 uH. The series resistor increased to 3R7, but the parallel loss resistor increased to 15K (better quality). That allowed to decrease the feed back capacitor to 120pF, in order to get a collector amplitude of about 5Vpp.
The quality of the parallel resonant circuit is calculated (see at the Links) with the formula:
- Q = Rp * SQRT(C / L)
- Quality Q of the N28 D14 resonant circuit = 3300 * SQRT(1E-9 / 68E-6) = 13
- Quality Q of the N22 D9 resonant circuit = 15000 * SQRT(1E-9 / 47E-6) = 69
Now the simulation looks very similar to the reality. On the left picture below you see the simulated timing diagram.
The green curve is the amplitude at the Collector. The blue curve is the voltage after the rectifier.
On the right picture you see the calculated Fast Fourier Transform (FFT) of the time signal. The frequency is about 710 KHz.
Sensor mounting
On the picture on the left, you see the mounting of the proximity sensor. It is glued with hot glue to the meter housing. The pot core with the coil is underneath of the board. In order to optimize the position, connect a voltmeter after the last rectifier diode and tune the position of the pot core over the liter-wheel to a minimum, usually 0 V. If the coil is free in the air, the voltage is about 6 V.
In order to get a good digital signal for the AVR NET-IO unit, a CMOS Schmitt-Trigger circuit (CD4093B) is connected after the rectifier (lower trace). See the picture on the right (click to enlarge) for the details. The Schmitt-Trigger switches ON at about 2.9V, and OFF at about 2.4V. The diagram has 0.5 second per division in the X axis.
For a function control the LED lights when the coil is free in the air.
Water flow control
In order to proof the good function of the sensor, an hour of recording was selected in the web view, see the picture on the right. Next, the suitable timestamps are exported (CSV format) from the data base via phpmyadmin. This file was imported into Libre office, converted to the time, and the time difference between the single events (1 Liter) calculated, see spreadsheet file. You can see in the table below, there is a maximum water flow rate of 1 liter in 6 seconds.
07:10:35 |
|
07:12:49 |
00:02:14 |
07:12:55 |
00:00:06 |
07:13:01 |
00:00:06 |
07:13:07 |
00:00:06 |
07:13:13 |
00:00:06 |
07:13:19 |
00:00:06 |
07:13:25 |
00:00:06 |
07:13:39 |
00:00:14 |
07:13:51 |
00:00:12 |
07:15:48 |
00:01:57 |
07:17:56 |
00:02:08 |
07:24:45 |
00:06:49 |
07:24:51 |
00:00:06 |
07:24:58 |
00:00:07 |
07:25:04 |
00:00:06 |
07:25:10 |
00:00:06 |
07:25:17 |
00:00:07 |
07:25:32 |
00:00:15 |
07:25:39 |
00:00:07 |
07:25:45 |
00:00:06 |
07:25:54 |
00:00:09 |
07:26:01 |
00:00:07 |
07:26:07 |
00:00:06 |
07:26:14 |
00:00:07 |
Printed Circuit Board
After testing the prototype, I designed with Eagle 6.5 a Printed Circuit Board (PCB), and build up 2 boards. This time a pot core half of 9 mm diameter with ferrite M33 was used, which is usable in a frequency range from 300 KHz to 2 MHz.
There are some specialties in the schematic:
- Capacitor C3, 1 nF must be of type Styroflex, because of the quality.
Capacitor C4 is the feedback capacitor, value 62 - 100 pF ceramic, must be adjusted to give an amplitude at the collector of about 11 Vpp, see the sine wave in diagram (62 pF) below on the left, and the clipped sine wave on the diagram (100 pF) below on the right. How higher the capacitor value, how higher the amplitude. If the sine wave is clipped, the sensitivity of the sensor is poor.
The pod core is from company Epcos, and is not easy to buy (http://www.distrelec.com). For the details, please see at the schematic.
- All parts, except the previous mentioned, are of type SMD in order to fit the layout.
For easier duplicating the board, the Eagle 6.5 files can be downloaded:
Schematic ProximitySwitch.sch
Schematic for printing ProximitySwitch_sch.pdf
Board ProximitySwitch.brd
Board for printing on film ProximitySwitch.eps
Links
List of pages in this category:
-- RudolfReuter 2014-05-12 04:17:37
Go back to CategoryVolkszaehler or FrontPage ; KontaktEmail (contact email)