Controlling coil power supply for cat water fountain - Page 1
Forum section: electronics / beginners

author: symbianas
author_rank: Regular Contributor
timestamp: July 06, 2024, 03:14:23 pm
content: Hi, I have bought cat water fountain which has wireless powered water pump. It is not very "Smart" fountain, just plugs into USB and it is ON forever. However it somehow gets the state of the "water empty" from the pump, maybe it measures coil power draw?.. I would like to make this fountain "Smarter" by attaching ESP32 or STM32 and controlling its ON/OFF by motion sensor.I thought I could attach transistor to one of the coil wires and it should trigger coil ON/OFF if I power transistors Base? I had 2N5551 transistor + 240ohm resistor available so I have attached it and powered Base with 3.3v, but pump does not power on and indicator blinks Blue indicating "water empty". Its the same if I cut one of the coil wires, I get Blue light blinking indicating "water empty". I have attached water and its not empty - so It does not work...Is it OK, to use transistor for this? Or should I use something else? Why it does not work with transistor? Any help?Thanks.

author: Manul
author_rank: Super Contributor
timestamp: July 06, 2024, 03:58:43 pm
content: Why switch the coil in the first place? Why not simply switch 5V supply to the entire circuit board which controls the coil? Seems like more straightforward approach. In that case you can be sure, that you can use ground as a reference point for your control signal, which is convenient. Cause coil output might not be referenced to ground and if it's not, that's an issue. Furthermore you won't potentially disturb coil sensing.

author: symbianas
author_rank: Regular Contributor
timestamp: July 06, 2024, 04:40:11 pm
content: Quote from: Manul on July 06, 2024, 03:58:43 pmIts an option, but sadly on startup it switches coil on and off several times for some reason, wanted to avoid that, so decided to control coil instead. Is there any other way? Maybe a relay would work instead of transistor?

author: Manul
author_rank: Super Contributor
timestamp: July 06, 2024, 04:49:09 pm
content: Is one of the two coil output points directly connected to either gnd or +5?

author: symbianas
author_rank: Regular Contributor
timestamp: July 06, 2024, 05:12:10 pm
content: Quote from: Manul on July 06, 2024, 04:49:09 pmNo, it does not seem to be connected directly to gnd or +5v. It seems to be connected to first chip and capacitors. maybe somewhere else too. So I guess transistor wont work, yes? how about relay then? Is optocoupler an option?

author: Manul
author_rank: Super Contributor
timestamp: July 06, 2024, 07:50:05 pm
content: Optocoupler is not an option. Small SSR - maybe. Try with a simple electromechanical relay. Also you might be able to tap somewhere into the existing circuit and control it, but that requires reverse engineering and some expertise. The PCB looks like conformal coated, so it's not very inviting to mess with. Just try a relay.

author: Kim Christensen
author_rank: Super Contributor
timestamp: July 06, 2024, 08:13:38 pm
content: I suspect that the coil is driven with an H-bridge, or similar configuration, which means that it has AC current flow through it. Hence, a simple bipolar transistor switch isn't going to work.Probably the easiest thing to do would be to scope the drive signal to the coil and then recreate this signal with your own circuitry.What's the part numbers on the 2 ICs on the original PCB?

author: symbianas
author_rank: Regular Contributor
timestamp: July 06, 2024, 09:33:19 pm
content: Quote from: Kim Christensen on July 06, 2024, 08:13:38 pmI was interested to see those number too, but it seems that those 2 8 leg chips are without naming/numbers.I was gooling how to power the pump but it no luck. I found some documentation about pump, but maybe thats not much:https://device.report/manual/6938016From documentation it seems that input is 5V DC?

author: Kim Christensen
author_rank: Super Contributor
timestamp: July 06, 2024, 10:00:16 pm
content: The 5v spec is for what feeds the little PCB that you see.Looks to be something similar to a wireless charging coil for a smartphone. Except the energy ends up running a pump motor rather than charging a battery in a phone.So yes, simply putting an oscilloscope across the coil (When it's connected in it's original configuration) and measuring the waveform there, when the pump is running, would tell you how to drive the coil directly.

author: symbianas
author_rank: Regular Contributor
timestamp: July 07, 2024, 08:26:47 am
content: Quote from: Kim Christensen on July 06, 2024, 10:00:16 pmSadly I don't have oscilloscope. What would be the cheapest and decent Oscilloscope?Do you think a SSL relay would work? I need to buy DC-AC relay?

author: Kim Christensen
author_rank: Super Contributor
timestamp: July 07, 2024, 03:49:10 pm
content: A solid state relaymightwork. The problem is we don't know the frequency at which the coil is pulsed but a typical frequency range is 110-205Khz for wireless charging. A solid state relay will have an upper frequency limit, so you'd need to make sure that the one you select will work.Or you could use a mechanical relay.

author: symbianas
author_rank: Regular Contributor
timestamp: July 08, 2024, 05:32:55 pm
content: It works with relay! But it works exactly the same as on regular startups (it switches coil on and off several times). So there is no relason to cut it at the coil, its the same as cutting initial power 5V at beginning with transistor... I hop cat will get used to it and wont be scared.

author: symbianas
author_rank: Regular Contributor
timestamp: July 08, 2024, 06:28:44 pm
content: would be nice to learn to drive that coil. Also would need to get the status if water is empty...

author: symbianas
author_rank: Regular Contributor
timestamp: July 10, 2024, 11:54:36 am
content: Quote from: Kim Christensen on July 06, 2024, 10:00:16 pmWould this be possible with logic analizer? I have: Kingst LA1010 - Input voltage range: -50 ~ +50 VI guess I could build oscilloscope from STM32 is input values are <5V?

author: Kim Christensen
author_rank: Super Contributor
timestamp: July 10, 2024, 03:19:44 pm
content: No, a logic analyzer won't help you here.It would be better for you to buy one of those cheap MCU based scopes rather than trying to make your own.But if you're planning on doing more sophisticated work in the future, spending money on a more capable scope would be worth it.Not a recommendation, but here is an example of a cheap handheld scope reviewed by our host:

author: symbianas
author_rank: Regular Contributor
timestamp: December 01, 2024, 09:08:29 pm
content: Hi so I decided to use transistor and to switch power at the USB 5V source even though it will have that annoying initiation sequence, but should be easier to make it work (or so I thought).Cat water fountain should consume 5V 2W which is 400mA. So 2N5551 transistor should do it as it can be used up to 600mA.So I connected 2N5551:Base to resistor 280ohm and to 3.3v of MCU.Emitter to GNDCollector to "GND" of water fountain.Water fountain power to 5V.Once powered Water fountain kind of working but blinking its indicator green, which means "power supply issue". Does my resistor calculation not good or where could be the issue?

author: Kim Christensen
author_rank: Super Contributor
timestamp: December 02, 2024, 03:21:56 am
content: QuoteI'd use a beefier transistor or a logic level MOSFET. The 2N5551's hfe drops off rapidly above 30mA. C-E saturation voltage is above 1V when Ic is above 150mA.QuoteThe MCU isn't going to source 3.3V at 10mA... It'll be lower. Therefore the base current will be less than you expect.Measure the voltage drop across the 2n5551's emitter-collector when it's on. It won't be zero, thus your fountain won't be getting 5V... More like 3 or 4V.

author: symbianas
author_rank: Regular Contributor
timestamp: December 02, 2024, 11:04:39 am
content: Quote from: Kim Christensen on December 02, 2024, 03:21:56 amCould you specify transistor and logic level MOSFET models and resistor value?

author: symbianas
author_rank: Regular Contributor
timestamp: December 02, 2024, 07:33:45 pm
content: I have found some china RGB Led controller boards and ended up using their transistor or something named A2SHB seems to be "20V, 2.5A, MOSFET, SOT-23". Will it be able to drive 5V 400mA?Added some LEDs and motion sensor for MCU. Sadly motion sensor seems to be blocked by water tank.

author: Kim Christensen
author_rank: Super Contributor
timestamp: December 03, 2024, 12:03:43 am
content: Quote from: symbianas on December 02, 2024, 07:33:45 pmThat should work OK assuming it's the sameas this onewhich it seems to be.

author: symbianas
author_rank: Regular Contributor
timestamp: December 04, 2024, 04:41:06 pm
content: Quote from: Kim Christensen on July 06, 2024, 08:13:38 pmWell now I am contemplating the idea to drive coil by MCU.Current coil driver supplies these parameters:AC ~0.015V (DC ~0.005V?) ~130kHZHow could I replicate these signals with MCU? Is it a simple PWM signal? Or I need additional electronic components?

author: symbianas
author_rank: Regular Contributor
timestamp: December 05, 2024, 03:23:51 pm
content: I have madeDIY oscilloscope from STM32and hoked it up to the coil.Does this oscilloscope help to see the signal?How could I recreate such signal?31.2uS6.6V 1/3 * 0.0000312sec0.0V 2/3 * 0.0000312sec?Shouldnt I see in multimeter 6.6*1/3=2.2V? But I see AC ~0.015V (DC ~0.005V?) ~130kHZ?I can generate square wave with micro controller but not at 6.6V, how do I do that at 6.6V?QuoteI guess this is the limitation of scope and I need to add voltage divider somehow, or found another scope schematics.

author: symbianas
author_rank: Regular Contributor
timestamp: January 12, 2025, 12:44:07 pm
content: So I have updates! I have managed to look into the chip which controls coil and its XKT-511 chip! now the question is how do I control it!I found some documentation for it but it is china chip:https://leap.tardate.com/electronics101/power/wirelessledmodule/http://www.pdmcu.com/uploadfile/pdf/XKT/XKT-511_datasheet_v1.0.pdfI have tested and its connected as in documentation the only difference seems to be that "NF - on/off pin is controlled by another unnamed chip". So if I keep this pin always 5V It coil should work always!The question is how does another chip knows the status of water empty from coil pump? I guess it must be measuring power consumption or voltage of the coil itself?