Hi, and thanks in advance.
I have bought the following as recommended by the AI Bot
- SEN0368 NON-CONTACT CAPACITIVE LIQUID LEVEL SENSOR
- CE05137 5V SINGLE CHANNEL RELAY MODULE 10A
I want to connect the CONTACT CAPACITIVE LIQUID LEVEL SENSOR (SEN0368) to a relay (CE05137) so that when the water rises in the pipe, the sensor turns the relay on, and this in turn sends 12v to a buzzer/light combo I have.
This is to be installed in a car, so it needs to run on 12v input.
I have seen the online wiring for the sensor and the relay, not 100% clear to me, and with my very limited knowledge, I can’t see how the sensor/relay gets power in - i.e., where do I connect 12v power into the system?
So I don’t mess this up, is anyone able to describe or better sketch a diagram, and do I need some sort of regulated power input to the sensor?
Thanks
Hi Keith
Firstly welcome.
I am not sure you can get too much meaningful response without more information from the device vendors. I have had quite a bit to say about this in the past. Sometimes there is so little provided that it is almost impossible to ascertain fit for purpose without purchasing and finding out by trial and error. This is something I personally am not prepared to do. So I go elsewhere.
Just what is this “AI Bot”.
How is it that you start with 12V and this whatever it is recommends a 5V relay module. Although this is not really a bad thing as the 12V in car can be VERY “dirty” and is probably some 14 V or so while the engine is running and battery is charging
These modules are available in 12V variety and while the relay itself probably handle any hash on the supply the electronics may not. Without more details I would not make any comment re this. It is an unfortunate fact of life that all info is not forthcoming, even for Core designed and built modules. Maybe these vendors are frightened that hobbyists are going to roll their own but when you look at the price of a ready made module compared to the cost of components and the fact you have to build it I don’t think the ready made device has anything to be concerned about.
So the first thing to think about would be converting your “dirty” 12V supply into a “clean” 5V.
This could be done with a buck converter that will take a range of voltages such as seen in a car as input and produce a clean 5V output. Or if the current requirement is not too great (up to about 500 or 600mA) a simple linear LM7805 regulator would do. 5V would be on the bottom side of sensor limits but there is generally some head room here and should be OK. Or if you are concerned a LM7806 could be used which would give you 6V output. If you need to interface an Arduino a 7805 would be best. You should not go below 5V I don’t think.
To make any decisions on interfacing the sensor (with its add on board) to the relay module you would nearly have to know the sink/source current capability of the resultant signal path which I have been unable to find.
If this is enough it might be possible to interface directly with the relay module but due to the absence of this sort of info for either of these devices that is about as far as I am prepared to go.
I think someone reversed engineered one of these relay modules some time ago and came up with a schematic but if Core don’t see fit to provide this on their product page I just don’t consider making any decisions appropriate.
One thing I DO remember is that relay operate indicator LED just says the an operating request has been made and voltage has been applied to the coil. IT DOES NOT indicate that the relay has ACTUALLY OPERATED. I am afraid this is fairly common with most modules of this type. But I suppose it looks impressive and tells half the story.
Regarding powering the sensor. Pretty straight forward. If you disregard the Arduino in that Fritzing diagram you would connect the sensor to that supplied interface board as shown then connect “VIN” and Gnd on the right hand connector to Gnd and +5V. Whether an Arduino or some other simple interface is required between here and the relay would depend on the outcome of the signal source link/ source current information I mentioned above.
The Pull Up/ Pull Down link positions would depend on what the in/out schematics look like, direction of Signals (High/Low) required and if the link is required at all. All this depends on other things which could be pretty well explained if all the other info mentioned above was available,
Cheers Bob
1 Like
Hi Keith
Well I am breaking my rule here and indulging in a bit of guesswork. I would not normally go this far with the info available for your 2 devices but with what I can extract and some assumptions and guessing this is what I THINK would work. You are the one with all the bits so you will have to do your own experimenting but I think this should work.
Start with power. You need to reduce the 12V to 5 or 6V using either of the methods above. The aim is to get rid of most of the rubbish normally in an automotive system. Although with 3 phase alternators and the presence of lots of electronics these days this might not be too bad.
I think the relay module will look something like I have shown. It is stated to be active low so won’t be far off the mark but absolute values are not known.
IO1 is a means to set the mode. To drive this relay module you need a LOW (or 0) output from the sensor interface in the presence of liquid at the sensor. I think this is what you want. This is done with the IO1 link marked in red on the Fritzing schematic so leave the IO1 link as it is. This should connect a pull down resistor to this connection. If this is not enough connect the IO1 input direct to ground AT THE RIGHT HAND INPUT TO THIS BOARD ie; the 4 way connector point. The value of this pull down resistor is carefully not shown but should be OK. As this is a permanent situation no external connection is required.
The signal is IO2 and to operate the relay needs to be switched LOW. The mode (IO1) above sets this the right way around. Switching this line to (IO2) LOW switch the Opto coupler in the relay module and will (should) operate the relay. To make sure this LED is OFF I think it should not hurt to connect the pull up resistor by moving that upper red link across to the right to achieve this. This connects this effectively in parallel with the optocoupler LED and its limiting resistor but should not affect this operation. just makes sure that LED is OFF when it is meant to be.
As you are the one with all the bits you are going to be the one to build this up and try it.
If all goes your way it should work OK straight “out of the box” as they say..
Most of any success depends on whether the interface board will sink the current required to operate the opto coupler LED. I think it should as there should only be a few mA involved.
As mentioned above the sink capability the interface is unknown as is the LED current requirement. If the optocoupler type was known and the resistor value this could be calculated but alas this is not forthcoming.
On that note all I am prepared to say is if all things go your way that schematic I THINK should work OK. But unless someone can find some numbers I am not prepared to commit. Try it and see
Cheers Bob