Im making a project to charge a battery 2Cells 7.4V with 910 mAh. This will be a simulation of a Cubesat EPS (Electric Power System). Im using an Arduino Mega, and the frequency of the PWM is 31.5KHz from pin 6.
My power supply will provide 20V, and I want a CC of 0.3C in order to charge the battery.
Im using an INA219 to provide feedback for my design using I2C.
I want to know how to design a Buck Converter with a NMOS. I tested it with an IRLZ44, but I did something wrong, so I just need a design for a Buck Converter. For output I will use a 500uH and 100uF.
Let's see if we can make a design together. If you need more information just tell me.
This is my design:
I know that probably there are things wrong, but Im here to hear good things and advices about design.
Also, to read the voltage in load, I use A0 and A1. Arduino make A0-A1 to know the voltage because load isn't connected to common ground (not sure of this).
Any advice will be good considered. Thank you!
Sorry a buck converter is a very specialised circuit. Not only do you have to get the circuit right but the layout and grade of ferrite used in the coil are also ultra critical.
I used to manage professional Power Supply engineers and have never known any of them get it right in less than three PCB layout attempts.
I cannot see how these parts, including a Mega 2560, have anything to do with a buck converter.
OK, presumably you intend to measure the charge current and switch off the converter when it is low enough.
But you cannot use the Arduino to generate the PWM as you have to be able to control the PWM duty cycle with a feedback circuit in order to regulate the current.
Using such a Microcontroller to be at the heart of such a critical power supply does not seem wise to me.
Since its a 'Cubesat EPS' you would want to keep something as vital as a power supply away from the direct control of a microcontroller, just in case a bit flip caused by radiation, stops the power supply working.
You cannot add simple would be my approach.
Not easy for charging … there are some about if you google , but you need to add protection to the cells , keep them balanced , not charged at full rate if the voltage is very low , not over charged, charged as constant current then constant voltage , not left on float.
If you google there are some buck converters designs based on Arduino , but it’s far easier to use an ic designed for the job
First post updated with my design.
I said a Cubesat but actually its just a prototype for my university, thats why Im using a power supply instead a solar panel. Just to simplify things.
I just wanted to know how to build a Buck converter with a NMOS or a PMOS. Both Mosfets are good for me. I just thought that Logic Level NMOS would be easy to work with Arduino PWM.
Yes, I'll use the INA219 to measure the current in order to obtain a constant current from the buck converter. Just to have a feedback for my code in Arduino.
Can you explain me why I cant use the Arduino to generate the PWM and control the Duty Cycle if the current is higher or lower than set?
Thank you in advance Paul!
If as you said "this will be a simulation of a Cubesat" then it implies you are designing stuff that would actually be suitable for a real World Cubesat satellite (in orbit) and that requires quite a bit of thought.
To use solar panels in Cubesats, its almost inevitable you will need to consider maximum power point tracking, which can complicate the power supply design a bit.
Hi again! Thanks for asnwering
We wont use MPPT, it isnt a requirement for the project. I just want to decrease the voltage from the power suppy in order to charge the battery (7.4 or 3.7V in parallel).
You need a feedback loop that controls the PWM in "real time".
Also as srnet mentions, you cannot afford a code crash.
Thanks for the circuit.
When you want to add anything new to a thread, please do it in anew post.
Editing a previous post like you have disrupts the flow of the thread.
Adding your circuit and requested info back at post #1 makes mine and other posts redundant and looking like a waste of space.
Yeah, I know, thats why I added the INA219 (current sensor + voltage sensor) and the A0 and A1 values.
All of that, with the code, will control the PWM duty cycle. Of course, if the code crash, Im fucked, but it is the simplest way to do it I think.
Sorry Tom. Didnt know all of that, thank you for your advice, I'll take them for future posts.
Added here the design of the first post.
In your circuit.
- What is 1NA219-2 measuring, because it isn't load current?
- Why is your load between supply +V of 20V and the "output" of your "converter"?
- Should it not be between "output" and gnd?
Sorry but I think you need to read up on buck and boost converters, then decide on which pre-made DC-DC converter you are going to buy.
If it is for a CUBE Sat, is this DC-DC going to model space as well?
If so you need to model for PV cells, that is a CURRENT SOURCE rather than a voltage source.
- True, INA219_2 should go in series with RLoad. Little mistake (its just a shareholder design)
- If I put the Load from Vsource to GND, the design go wrong because Im using a High side buck converter with an NMOS, so the load will bypass that MOSFET.
- Explained in 2.
The load is in floating ground, not in common ground because the explained before. Im not going to buy any DC-DC converter because I want to make my own one. If I want to buy a buck converter I just go to my electronic store and pick one, and not coming here looking for advice I wanna make one and learn in the process!
The project is from university, its just for prototyping, not for a Flying Model or Engineering Model, just a prototype of a unit for a "imaginaring" Cubesat. We are not building any in the short term, we are just making the designs.
What do you think about the design? Any advice will be good considered, mate
Btw, this is a simulation for a 30 Ohm Load:
For 40% Duty Cycle, the output in RLoad is 7.8V and 329mA.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.