Power Supply and Pump Control using LM2576 and Arduino micro

orhema:
I am exactly trying to put the voltage regulator into standby mode when it is not being used, but I don't know how to go about this using the prescribed TTL or CMOS?

As per the criteria for turning the Pump on and off, I just want to monitor for runtime, power draw (battery discharge specifically) and flow rate/blockage

Hey, hey, hey. What will decide for turning the pump On or Off?????

orhema:
"You control 1 pin. When it is LOW, the regulator is supplying power.
When it is HIGH, the regulator is not.
0 & 3.3V or 5V from an Arduino will do."

From the above statement, do you mean I control just the on/off pin using the digital or Analog pins of the Arduino?

So, basically, I can use one of the pins to implement a logic switch between high and low voltages for the On/Off pin?

Yes You can. Only You must use the On/Off pin, not the feedback pin....

Still my question is....... Who, where, what decides if the pump should run or not?

@Railroader I now understand what the feedback does thanks to your explanation. However, please now I need to know what that bock of text you included does as I am no longer comfortable with messing with the pins of the LM2576 as per your warnings.

Moreso, for the feedback itself, I can just connect it straight to the resistor network at the output for efficient functionality right?

Since you posted your reply before I finished typing mine, I intend to use one of the digital pins of the Arduino with a Mosfet and resistor network to turn the pump on/off. Is this the right decision?

PS: Also, on a side note, this Arduino chat system is not the best as it always prevents me from posting my reply once another user posts in the same thread. It messes the flow of replies

orhema:
@Railroader I now understand what the feedback does thanks to your explanation. However, please now I need to know what that bock of text you included does as I am no longer comfortable with messing with the pins of the LM2576 as per your warnings.

Thanks but note the correct reply from @CrossRoads about the enable. That is correct, I was wrong bubbling about a transistor. You can turn On and Off the Lm256 using a logic pin on the Arduino.

Sorry but CAN YOU PLEASE STOP TALKING ABOUT FEEDBACK?

I intend to use one of the digital pins of the Arduino with a Mosfet and resistor network to turn the pump on/off. Is this the right decision?

Yes, perfect. Then I ask WHY DO YOU LOOK FOR AN EXTERNAL FEEDBACK? The "feedback" is found in the code setting the power controller to "On".

PS: Also, on a side note, this Arduino chat system is not the best as it always prevents me from posting my reply once another user posts in the same thread. It messes the flow of replies

There is a time limit, a kind of timeout that inhibits sending replies "too frequently".
I know that can be an obstacle. Practise this: Post a question, or a reply, and then wait for a response.

Sorry for my temper getting short now and then, but please tell WHAT CONDITION, WHAT DEVICE, WANTS TO THE PUMP ON OR OFF?

Oh no, thank you for being considerate and taking your time to help and guide good design decisions.

As per the specifics about the overall design, I am honestly trying to make a DIY automated vacuum pump system from scratch for some of the other projects I am interested in embarking on. This is why I believe it is important to have a pump run time reading pump blockage, and pump power. The first project I may be using this pump for is trying to do a diy electric lamp/bulb and seeing if the pump holds up. So its mostly a learning expirience

I am pretty sure at this point I don't even know what feedback fundamentally is, or rather what I am actually intending it for. Further still, I am more of a novice at software than I am of hardware, but I guess the Arduino community really eases the entry stuff. It is in light of this inexperience with software that I will use as an excuse for not understanding the most effective way of going about the 'feedback' from the pressure sensor reading. From your reply, it seems there will be blocks of code for handling any data acquisition and subsequent control of the pump's activities.

Also it is on this note that I think making a distinction between the pressure sensor/pump 'feedback' and the LM2576 FEEDBACK would be necessary.

My previous comment "Moreso, for the feedback itself, I can just connect it straight to the resistor network at the output for efficient functionality right?" was about the LM2576 FEEDBACK as per the data sheet recommendation.

For pump performance feedback you can out a really low value resistor, like 0.1 ohm, between the pump negative and Gnd, and then monitor the voltage at that resistor. That will tell you how much current is flowing thru the pump.
If you want to monitor the vacuum the pump is developing you will need a suction guage off the pumps output.
Example:

" In particular we think this would be a great sensor for use with making DIY assistive tech "Sip & Puff" interfaces, or measuring the pressure within a vacuum chamber or other pressurized container."

Thank you for this great information about the pressure gauge. I believe that is what I was looking for for the pressure reading

I decided to reread the LM2576 datasheet so as to best implement the on/off function. Since I am using an Arduino Micro, I intend to use one of its digital pins if that makes sense (I am really completely new to programming hardware) to control the on/off. So my question is why would I need the 3.3C or 5V of the Arduino Micro when II could just use the digital pin in series with a resistor to send the voltage signals to the LM2576 seeing as the digital pins all have a 5V ref.?

Yes, an output pin from the Micro to the On/Off pin of the LM2576 is all that is needed.

Thank you for the reply. Yes, I also just realized a resistor may indeed not be needed in my specific case. I initially intended to use the resistor in series with the digital pin to protect the pin itself, but it seems I can just set the output voltage to control the on/off pin directly using the software right?

Look att the wiring You posted in Your reply #24. The potentiometer, preferably a trim pot sets the output voltage once and forever.

but it seems I can just set the output voltage to control the on/off pin directly using the software right?

This makes no sense to me. Why vary the voltage?

If suggest a driver between the Micro and the pump. From "the side" the 12 volt from the LM2576 is connected to the driver.
As driver a logic N channel MOSFET and 2 resistors can be used. Changing the PWM value gives "normal motors" a varying speed.

Have you posted link to specific pump? I'm pretty sure most pumps aren't happy with varying voltage, they either want the rated voltage applied, or not. You can pulse them on/off to reduce their effective running time. I don't think PWMing the regulator would be the best way to do that; having a logic level N-channel MOSFET between the pump - and Gnd would be the best way to do that.
If you can go surface mount, an AOD508 would be a great part for that and can be controlled from an Arduino output pin with 150 series resistor to limit inrush current from the Arduino pin into the MOSFET gate capacitance, and 100K to Gnd on the gate to hold the MOSFET off when the Arduino is off, or being reset, and not letting the gate float and possibly turning on.
https://www.digikey.com/en/products/detail/alpha-omega-semiconductor-inc/AOD508/3060898

@CrossRoads
You're likely correct about PWMing that pump. Using a simple digital output set to HIGH will make the MOSFET turn on without any pulsing. A link to that pump and its data sheet is needed.
Still waiting for OP to tell why the voltage would be changed. It sounds "no good" to me.

Sorry Fort the long Haitus, I got preoccupied.

So, I ended up doing some more research and found out I was trying to compare apples with oranges, and TI's datasheet has some problem to do wit it. On the LM2596 datasheet, they had stated about an error flag and feedback which was wrong. I eventually read TI's application notes on Linear and switching regulators and realized the functionalities I wanted was an alert for output voltage drop and battery lifetime (eventually)

So having better understood my design requirements, I chose to go with MIC29301-12WT which has an error flag for alerting when the output voltage drop below 5% of its rated value. For some reason, I kept conflating the 'feedback' with 'error flag" from various LDO regulators.

Unlike the feedback pin, the error flag functionality is stated to be fully configurable by a microcontroller to read when the output voltage drops, this is the functionality I required.

My question now is, how do I wire and use one of the digital pins of the Arduino Micro to configure and control this error flag pin? It states its current draw and requirement of a pull-up resistor, but I want to know how to use an Arduino to achieve this. Thank you all for your help and guidance.

Good work!
Giving it quite some time turning pages in the data sheet....
I'm pretty sure the enable can be directly connected to the controller.
Regarding the "flag" output I hesitate about what its high level might be. The device has no reference to the 5/3.3 volt world. More reading of the data sheet or a simple test, having the "flag" not connected at all would tell whether voltage dividing would be needed or not.

Thank you sir, it was worth it just as your profile states.

I did look and realized what you suggested is what I will eventually have to do. I was trying to cut corners (again) and use simple guess and approximations to check the best approach for using the error flag pin. It is also unfortunate the documentation for these ICs are lacking in one way or the other.

So, from the little I read, I figured I can either connect the pin to the Vout of the regulator, or one of the digital pins of the Arduino to provide it with the required voltage for its max current Sink of 10mA.

Since the error flag pin is simply a comparator, if I connect it to the 12 Vout, I would just need a pull-up resistor or resistive divider (which I am trying to avoid), then I could connect the output itself to the Arduino.

Likewise, I could just directly connect it to the Arduino digital Pin and provide power directly with a resistor in series, but I fear for the pins of the Arduino as I am not yet comfortable with how the current ratings work for the digital pins.

I guess I might eventually just have to experiment with the values and see which works best. Honestly, I am just trying to use as few components and calculations as I can get away with for now.

orhema:
I did look and realized what you suggested is what I will eventually have to do. I was trying to cut corners (again) and use simple guess and approximations to check the best approach for using the error flag pin. It is also unfortunate the documentation for these ICs are lacking in one way or the other.

The documentation covers several versions a turns into "a brick in the wall". Not easy to find out.

So, from the little I read, I figured I can either connect the pin the error flag pin?
to the Vout of the regulator,

No. It's an output and should not be connected like that.

I could thing of using an opto coupler and some resistors, to interface the fault output. Output of the opto to the controller. Controller input delared as INPUT_PULLUP.

or one of the digital pins of the Arduino to provide it with the required voltage for its max current Sink of 10mA.

Since the error flag pin is simply a comparator, if I connect it to the 12 Vout, I would just need a pull-up resistor or resistive divider (which I am trying to avoid), then I could connect the output itself to the Arduino.

Check deeper. An open collector output could use a 5/3.3 volt pullup resistor. An active output would do fine with an OPTO.

Likewise, I could just directly connect it to the Arduino digital Pin and provide power directly with a resistor in series, but I fear for the pins of the Arduino as I am not yet comfortable with how the current ratings work for the digital pins.

I guess I might eventually just have to experiment with the values and see which works best. Honestly, I am just trying to use as few components and calculations as I can get away with for now.

Read the documentation and try to find what high level the fault output might generate. I didn't find it. Be careful in case its high level would be at the level of the converter in-line.

What I meant is I could use the Vout as Voltage source the error flag pin is pulled up to to provide its operational requirements as stated in many similar LDOs.

"No. It's an output and should not be connected like that."

Moreso, I think the optocoupler would indeed be a more 'secured' method, but it seems it's not necessarily required for my application, as all I'm doing is reading the error's value to see if the output voltage has indeed dropped or not.

Unfortunately, I myself am still yet to determine what the High output level fault conditions are for this IC

Sorry I misunderstood that. Reading the Vout (5 or 3.3 volt) must be safe.

Hi,
Can you tell us what your application is?
What are you providing a varying vacuum to?

Thanks.. Tom... :slight_smile:

@Crossroad

So to clarify, do you mean reading the Vout(5 or 3.3V) by the Arduino must be fine?

Restating my last few replies, I am thinking of connecting the flag pin to the 12V output through a pull-Up resistor for proper operation. Then I will connect the pin also to the Arduino to get any error signals from it. However, the concern is with what happens between the Arduino and the Flag pin with regards to the current sourcing. Please correct me if that's not right.