Power problem, need 5V just for an instant, on stand by

Alec_t

Joined Sep 17, 2013
14,280
As far as I know, all those rotary vane flow-meters have a permanent magnet in/on the turbine. The magnet orientation may not be the same from one brand to another, though, so it could be that the pole nearest the Hall IC dominates and is the only one the IC 'sees'. A compass brought up against the turbine would resolve any ambiguity.
I assume you are in the UK
The last time I checked, Wales was definitely in the UK. I don't think the Brexit deal proposes removing Wales from the UK :).
 

Thread Starter

mmcginty

Joined Feb 4, 2010
57
How about this one?
You would need to find out whether the IC has to be S-pole or N-pole sensitive.
Correction, the ring is not a composite, just a ring magnet, half north, half south. (That makes tons more sense.) I'm not sure the polarity of the sensor matters, but I can't determine whether the last component you suggested is x-axis or z-axis sensitive, its part number is not in the data sheet. And its supply current is 4.5 mA.

This one looks pretty good, supply current is 10µA.

I can't calculate max sensing distance from Mt without tech specs of the magnet... the actual distance I'm working with is impossible to measure accurately, it's something between 3-6mm
As far as I know, all those rotary vane flow-meters have a permanent magnet in/on the turbine. The magnet orientation may not be the same from one brand to another, though, so it could be that the pole nearest the Hall IC dominates and is the only one the IC 'sees'. A compass brought up against the turbine would resolve any ambiguity.

The last time I checked, Wales was definitely in the UK. I don't think the Brexit deal proposes removing Wales from the UK :).
I have the sensor all apart, magnet removed, orientation of the sensor is crystal clear, and by rotating it by hand near another magnet I can feel the poles, I'll get some filings today and post a picture. But regardless I ordered that part from digikey, it should be here Tuesday or Wednesday, then I'll put it in the flow sensor, hook up my scope and spin that thing up. If it seems reasonable I'll connect it to my device and a garden hose and see if it's in the ballpark. (They all read slightly differently from the factory, I had planned to add a calibration feature to the next version. It already has diags that allow for manual accuracy checks. I assume the discrepancy is some combination of friction, turbine inconsistency and/or jitter.)
 

Alec_t

Joined Sep 17, 2013
14,280
Yes, that Hall IC looks good. Same pinout as your original so would be a direct replacement (hopefully the existing resistor value is suitable). Since your ring magnet presents 1 x N and 1 x S pole alternately the IC should be happy. I'm reading the supply current as 2mA when enabled. The 10uA average would presumably be obtained if the IC were energised intermittently with a low duty cycle.
 

AnalogKid

Joined Aug 1, 2013
10,986
I'm thinking about putting a couple of 3V coin batteries in there to supply standby voltage, then isolate them with a JFET when the MCU wakes. If the batteries lasted a year it would probably be ok... seems cheesy as hell though.
Not cheesy at all. And, it could be only one coin cell, added to the 18650 to create a second, higher output voltage

Separate from that, what is the PV output before the battery? Is it high enough to charge a second, smaller battery just for the sensor?

ak
 

Thread Starter

mmcginty

Joined Feb 4, 2010
57
Not cheesy at all. And, it could be only one coin cell, added to the 18650 to create a second, higher output voltage

Separate from that, what is the PV output before the battery? Is it high enough to charge a second, smaller battery just for the sensor?

ak
No, the PV is matched to the battery. But we came up with a more elegant solution, there are a plethora of Hall sensors out there that work on 3.3V they just can't be found in cheap flow sensors, so I'm going to change the Hall component in the flow sensors.
 

wa3tfs

Joined Mar 14, 2017
9
You said you already have a 5 volt source available. Why don't you charge a super cap via a high value resistor and use that to bias the hall sensors?
The cap will be available like a 5 volt battery when needed. If necessary, the power from the super cap could supply a simple 555 timer circuit to generate pulses as necessary.
 

AnalogKid

Joined Aug 1, 2013
10,986
The cap will be available like a 5 volt battery when needed.
True, but it is needed constantly. My read is that the sensor generates the signal to awaken the rest of the system, so it needs constant power while everything else is sleeping. If we knew the absolute maximum time between events and the power requirements of the sensor, we could calculate a capacitor size. I suspect it would be very large.

ak
 

Thread Starter

mmcginty

Joined Feb 4, 2010
57
Yes, that Hall IC looks good. Same pinout as your original so would be a direct replacement (hopefully the existing resistor value is suitable). Since your ring magnet presents 1 x N and 1 x S pole alternately the IC should be happy. I'm reading the supply current as 2mA when enabled. The 10uA average would presumably be obtained if the IC were energised intermittently with a low duty cycle.
I got my part, when I blow into the inlet (to simulate water flow) I get a nice 3.3V square wave! At a certain speed it starts missing transitions, not certain whether the speed at which that occurs is outside of the flow sensor's original range or not... But I suspect it is not [out of range]. If that is the case, then it means the Hall sensor is too sensitive for the magnets it's being paired with?
 

Thread Starter

mmcginty

Joined Feb 4, 2010
57
Sooo... first I had a firmware problem, I had to figure out how to disconnect the wake-up pins from pulse counting, otherwise it woke immediately even if the sensor was not plugged in.

After fixing that I found out that a pullup is integral to the sensor, it doesn't work with a pulldown. Problem is the only option I have for transition option to wake from deep sleep from multiple inputs, and that is low to high. Also when the sensor line is high while the sensor is at rest (which is the case most of the time,) it immediately exits sleep. So I'm going to try a logic inverter/schmitt trigger.

The pulse counter is much more flexible about transitions it will count. So I'm optimistic about this solution.

As for the hall sensor it is definitely mismatched to the magnet... one thing at a time... the Hall sensors are cheap enough to go shotgun, trial and error. If the logic inverter works, I'll dive in.
 

Thread Starter

mmcginty

Joined Feb 4, 2010
57
True, but it is needed constantly. My read is that the sensor generates the signal to awaken the rest of the system, so it needs constant power while everything else is sleeping. If we knew the absolute maximum time between events and the power requirements of the sensor, we could calculate a capacitor size. I suspect it would be very large.

ak
It only deep sleeps for 77 minutes at a time... but it makes sooooo much more sense using a 3 volt Hall sensor, in terms of circuit and code complexity, parts cost and most importantly, power consumption. But good to know my first plan was viable!
 

Thread Starter

mmcginty

Joined Feb 4, 2010
57
More info about the magnet in the sensor. Using the fluxgate compass in my iPhone I pointed it south, then I placed the magnet on its spindle in front of the phone and rotated the magnet slowly. Through each 90 degrees of rotation it goes from not deviating the compass at all, to deviating it significantly, then back to none. Each part with none is only about 5-8 degrees max
To the sensor is not being pushed and pulled, just pulled and then uninfluenced.

So it seems to me that I don't want one that that takes equal amounts of magnetism to make it latch and release, e.g., 2.7 mT to trip, -2.7 mT to release, or 11 mT to trip, -11 mT to release. The first one I tried was 6 mT to trip, 1 mT to release. It seems to me that it doesn't always release at higher speeds. So I think I need it to trip at a lower number, and release at just a little below trip... or is my thinking backwards? (I ordered 4 more Hall sensors today, tenacity, persistence and wasted parts will have to suffice, in lieu of actual knowledge and wisdom.)
 

Alec_t

Joined Sep 17, 2013
14,280
I'm no expert on Hall sensors but it seems to me that, given your ring-magnet's pole configuration, you don't want a latching type. I could be wrong, but I think that type needs to see N and S poles alternately in order to latch and unlatch.
Perhaps some other member here could advise on the best type. There's a wide choice. Here are options shown in Digikey's filters, for example :-
HallTypes.PNG
If your present sensor is tripping, but failing to release, perhaps just bending its legs to move it slightly further from the magnet might solve the problem.
 
Last edited:

Thread Starter

mmcginty

Joined Feb 4, 2010
57
I'm no expert on Hall sensors but it seems to me that, given your ring-magnet's pole configuration, you don't want a latching type. I could be wrong, but I think that type needs to see N and S poles alternately in order to latch and unlatch.
Perhaps some other member here could advise on the best type. There's a wide choice. Here are options shown in Digikey's filters, for example :-
View attachment 169137
If your present sensor is tripping, but failing to release, perhaps just bending its legs to move it slightly further from the magnet might solve the problem.
It fits into a plastic housing that the board mounts onto component side down, very little room for lateral adjustment. Latch was a poor choice of words, I agree that is not the type I need. (I really wish I was able to lookup the original one.) These are the ones I ordered:
https://www.digikey.com/product-detail/en/diodes-incorporated/AH9251-P-B/AH9251-P-BDI-ND/5592454
https://www.digikey.com/product-detail/en/texas-instruments/DRV5033AJQLPG/296-38520-ND/5031905
https://www.digikey.com/product-detail/en/diodes-incorporated/AH9246-P-B/AH9246-P-BDI-ND/5418532
https://www.digikey.com/product-det...uctivity-solutions/SS451A/480-3587-ND/2505488

The original has a builtin pull-up 10k resistor, does that make it an open collector? I'm not trying to match that characteristic, it's what has been giving me fits. One of them has digital output, that's what I'm most interested in/seems the most straight forward, I'm thinking it will dispense with the drain/collector mismatch crap in the sensor.
 

Thread Starter

mmcginty

Joined Feb 4, 2010
57
Open collector or open drain presumably should not have a built-in pull-up.
I'm confused... a resistor from power pin to output of the Hall sensor is a pull-up, correct? It makes the output high when uninfluenced? The original Hall sensor set output to low when triggered, left it high when idle. This was a problem as the only choices for wake-up on multiple pins are wake when all low or any high, so it woke immediately.

I cut the built-in resistor out and it didn't work at all, I tried a pull-down, still nada. So I was going to try a level inverter (which arrives today) but figured a more direct approach was to use a Hall sensor that outputs a compatible level when triggered. Two of them that I just ordered are digital, which seems like the best shot, in my mind. One is open collector, the other open drain, so I should have enough of them to figure it all out through trial and error -- they are different sensitivities but I'm sure I can trigger them manually to experiment.

If I have the energy, I'd like find out if the level inverter would've worked, but it's SMD, kind of a pain to breadboard.
 

Alec_t

Joined Sep 17, 2013
14,280
a resistor from power pin to output of the Hall sensor is a pull-up, correct?
Correct.
I cut the built-in resistor out
Eh? The original Hall sensor used an external pull-up resistor, according to your post #12 pic, not a built-in one. So the original sensor presumably was open collector/drain. Conversely, the sensor in the first link in post #37 does have a built-in pull-up.
 
Top