Arduino controlled Power supply

Hey there arduino forum .

What im trying to build is my own graduation work for finishing middle school , and its as the topic stands .

Now , its all fine and dandy as how i planned it but as anything DIY and till i get the PCBs built , its only theory .

Il try to explain it short :

  • Two transformers ( one 30VA 24V to power the arduino , LCD and cooling fans , one 100W toroid for the actual power supply part )

  • 20x4 LCD that will show the current voltage , current and some other stuff is possible )

  • a power transistor / tiristor that will receive the PWM from the arduino and thus control voltage )

In short , A0 port for reference voltage (24V , but after voltage divider 2.4V) which can be changed with a potentiometer . A1 port that monitors the output voltage after the power transistor . A2 port that outputs the PWM signal to the transistor .

The issue im up against is this : can it even be done all in the same time ? That means reading voltage , calculating needed PWM frequency for it to be adjustable from 0-24V , then outputting it to the LCD for monitoring and optionally a current sensor and programmed current limit for set voltage .

  1. Is it even possible ?
  2. What else do i need from components ? ( i additionally have the current sensor module for the arduino , an IRFZ44 as the power transistor and the rest )

(deleted)

Well , i need to register it by 20ish of february , should be done by May .

I have some sketeches of the complete electrical diagram , il post em up tomorrow . Kinda late atm

Here it is , i made it as simple as i can for now , before i can work on the details before designing a PCB for it .

Looking at your drawing it's all wrong I've only skimmed over it quickly. The input variable resistor connected to 24v will destroy your board. If this is to control output voltage then you need to connect it to 5v. The mosfet will not work unless it's a logic one if not then you need to have a mosfet driver. Why you have voltage regulators for each part of the curcuit is beyond me. Dropping 24v to 5v with a linear regulator will produce a lot of heat. Your design is flawed with faults like how you control the current limit I only see one pot, to many to point out.
Try a google search for Arduino or micro controller controlled power supply this will give you some design ideas.
Plus i think you have left it a bit late, so I would say have a rethink on your design.

Something like this in the attachment ?

And regarding my design , this is only the general idea of how it should be not the final design .

So buck converters instead of 7805/7812 , but i didnt quite understand the mosfet and current part ?

Logic mosfet gate can be controlled with 0-5v other mosfets need 0-20v gate voltage depending on how much you control it by. Your drawing shows one pot which I presume that this controls the output voltage but no current control. You need to post the correct / full schematics and not just rough idea otherwise we will be wasting time in looking.
The last one you posted is ok you could look at the way they do that one and replace the controller with arduino

Well , il work on the design , il try to at least examine how the second one i posted works .

Tho , question :

The chip it uses is an AtMega8 ? I checked for pinout , and its the same as the 328p i have , i suppose coding is alot different ?

No, coding is the same, there are just less hardware resources in the chip.
Add this to your IDE for updated Atmega8 support:

The original Arduino used the Atmega8 (see board type "Arduino NG or older with Atmega8"), and scroll down here a little to see a pic:

Thats interesting .

And it may just be me but , on the complex schematic for the power supply , i do not see a crystal hooked up to XTAl 1 and 2 .

Rather those pins are hooked up to the LCD display ? I suppose the LCD has an in-built clock generator that the chip can use ?

No, I suspect the internal 8 MHz oscillator is used, and the 2 pins are used as additional IO lines, as they connect to "rs" and "D7" on the LCD.

Well , im trying to come up with a design , but il probably buy the kit to make one of these :

tuxgraphics.org: A Digital DC Power Supply (programmable bench power supply unit), hardware version 3.0 isnt too expensive so it should be worth it .

Now , programming wise , i got the MiniCore installed , and il go buy a AtMega8 tomorrow .

The author of the PSU sais that you need a programmer , to load the program onto the chip , and its a small board with its own chip and what not ..

And the code is in some unix tape archive , which honsetly is the first time i hear of it .

Can it be plugged into the arduino shield rather than a seperate circuit ?

Happy to report the power supply is progressing nicely .

And