12v 5v power supply, and transistor question

ok so i am making a light for a fish tank and i need a to make a power supply that can deliver 12v and 5v at the same time.

this is what i was thinking

the 12v will end up powering the LEDs and the 5v will power the arduino and the RTC.
will this design work or do i need to rethink it.

now my other question is which transistor type do i use to control the LEDs. the LEDs draws about 1 amp.

i am not sure if i should use a P-channel or a N-channel mosfet and i will be using PWM to control the brightness

i hope i explained that well enough :slight_smile:

That layout is fine, the 12V will run warm as it sourcing the 5v current also. Make sure to heatsink it.
I'd go with Logic Level N-channel Mosfet with Low Rds for the transistor, connecting LED Cathode's to ground.
WIll run cooler than NPN transistor at that current.
Maybe this one

would something like this work Nchannel Mosfets Australia | Little Bird Australia

Yes.
You're in Australia?

CrossRoads:
Yes.
You're in Australia?

ok so with this mosfet Nchannel Mosfets Australia | Little Bird Australia
12V goes into the SOURCE
signal from arduino into the GATE
and the DRAIN goes to the LEDs anode
is that right?

and yes i am in AUS

ok so i made the schematic messer and added the mosfet and a pull-down resistor for the gate

EDIT: removed pic

You need capacitors on those regulators, see the data sheet for exact minimum values but I would put a 0.1uF across the input and output of both regulators plus put an additional 47uF capacitor on the input of the first regulator.

The FET needs to have the load connected to the 12V, so source to ground, drain to load, other end of load to +12V.

Grumpy_Mike:
You need capacitors on those regulators, see the data sheet for exact minimum values but I would put a 0.1uF across the input and output of both regulators plus put an additional 47uF capacitor on the input of the first regulator.

The FET needs to have the load connected to the 12V, so source to ground, drain to load, other end of load to +12V.

do i really need caps on the regulator. the 5v one i use to power my servo is doing fine with out them

do i really need caps on the regulator.

Yes I don't say these things for fun.

the 5v one i use to power my servo is doing fine with out them

No it is not, it is just that you haven't noticed the instability it causes, it is not doing fine.

Grumpy_Mike:

do i really need caps on the regulator.

Yes I don't say these things for fun.

the 5v one i use to power my servo is doing fine with out them

No it is not, it is just that you haven't noticed the instability it causes, it is not doing fine.

ok i will add them in the final plan
and i fixed the mosfet

Yes that look fine on the FET.

Grumpy_Mike:
Yes that look fine on the FET.

ok that is good to know. you and CrossRoads have been a great help
now i just need to find a easy to use library for the DS1307 RTC

ok one last thing, the data sheet for the voltage regulators call for a 0.1uF and a .22uF cap
i would like to know if i can use these 0.1uF, 0.22uF 35V Tag Tantalum Capacitor

P.S. i don't know what type of cap to use

i would like to know if i can use these 0.1uF, 0.22uF 35V Tag Tantalum Capacitor

Yes you can.

I wouldn't actually recommend it for a safety critical circuit because when tantalum capacitors fail they fail short circuit and could cause a fire but many people do use tantalums in this sort of circuit. I suspect a short would be protected by the power plug in your case.

Why not buy a 12v regulated wall wart, and power the Arduino from it as well as the lights, through either barrel jack or the Vin pin? That way, you don't need to mess around with regulators.

Your schematic isn't right. You need to connect the -ve side of the 15v input to Arduino ground and the source terminal of the mosfet (and the ground terminal of any regulators you may be using). The resistor goes between the mosfet gate terminal and the Arduino output pin.

dc42:
Why not buy a 12v regulated wall wart, and power the Arduino from it as well as the lights, through either barrel jack or the Vin pin? That way, you don't need to mess around with regulators.

Your schematic isn't right. You need to connect the -ve side of the 15v input to Arduino ground and the source terminal of the mosfet (and the ground terminal of any regulators you may be using). The resistor goes between the mosfet gate terminal and the Arduino output pin.

because the arduinos regulator can not supply enough current to run the LEDs and it would over heat

because the arduinos regulator can not supply enough current to run the LEDs and it would over heat

No the power to run the LEDs will not come from the arduino but directly from the 12V.

Grumpy_Mike:

because the arduinos regulator can not supply enough current to run the LEDs and it would over heat

No the power to run the LEDs will not come from the arduino but directly from the 12V.

hmmm
i will still use the two regulators, it will give me some good soldering practice and will ceramic caps work

So you're gonna end up with this:

well i wont need the resistor between the LEDs and the mosfet because i am using a pre-made LED strip.
with the resistor between the arduino and the mosfet what value should it be and with the caps for the regulators will 50 Volt Ceramic Capacitors work well.

P.S. the data sheet calls for 0.22uF and 0.1uF