Hi there,
I’m creating a device to run in a car and I need some guidance.
In a nutshell, this device will receive a 12V signal (engine on) and the ATtiny85 will switch a MOSFET to power another device that will consume 15W (5V 3A).
Don’t worry too much in the details of that, it is more complicated and this is going to be software based anyway.
This another device will be a Tinker Board (similar to a Raspberry Pi).
Background
I never designed a device or even a PCB before, not even a small one, this is my very first project.
I know only the very basics of analog and digital eletronics but not much more than that.
Feel free to suggest any improvements or changes.
Restrictions
Since this is not a commercial project, I don’t have price restrictions.
A relay module costs R$12,91 while the MOSFET costs R$4,90 but the price is not the issue, the clicky noise is (more on this later).
Regarding power, I can’t keep the second device always on due to power restrictions, it would flat the car battery in around 1 day.
I’m looking into the most power saving asset for that and the ATtiny85 with some power saving techniques seems the way to go.
1. Is it okay to use an optocoupler (PC817) to isolate the 12V signal from the ATtiny85?
I’m using a 1kΩ resistor to limit the current but the environment of this signal is harsh.
The worse thing that may happen in that case is the optocoupler fry, right?
I was doing a very unorthodox approach of using a 7805 to convert that signal but this doesn’t provide any isolation from the harsh environment and felt very, very, very dirty application for a 7805.
To convert the signal, not to power the entire thing, this will be done by a buck regulator.
2. Is it okay to use a MOSFET (FQP30N06L) to switch the second device?
I asked about that before here in the forum and we conclude that a relay would fit.
But the device is going to be inside the car and the clicky noise of the relay is completely annoying.
3. Is the MOSFET going to rise 20ºC for that load?
Doing some calculations I found that this particular MOSFET would rise around 20ºC and supposedly the car is always around 25ºC inside while the engine is on, that would make the MOSFET be around 45ºC.
P = RDS(on) * I^2
P = 0.035 * 3 ^ 2
P = 0.315
PD = (MAX(TJ) - TA) / R0JA
PD = (175 - 25) / 62,5
PD = 2,4
TEMP RISE = P * R0JA
TEMP RISE = 0,315 * 62,5
TEMP RISE = 20 (rounding up)
TEMP = TA + TEMP RISE
TEMP = 25 + 19,68
TEMP = 45 (rounding up)
I’m not entirely sure about those formulas, are they correct?
4. Is the pull-up/pull-down resistor wrong?
Just by the convenience of designing the PCB as one layer, I used a resistor to jump and also keep the pin 3 HIGH and then supposedly LOW when the optocoupler activates.
This was really just for the layout convenience and I’m not sure if this is right.
Should I just reroute and use a jumper to avoid that mess or this is the way to go?
5. Is the PCB Layout generally okay?
This is not going to be a commercial product or anything like that, just a computer-ish for my car.
I’m probably going to make this PCB handcrafted, it seems easy to do after the layout is ready, and solder everything together, or even one of those.
I just don’t want to set my car on fire or fry the device :o
Thanks in advance!