Hi, I need to control 2 horns with Attiny85 but I have this problem:
I use two IRF540 Mosfet to control the horns because they absorb +2A.
When the sketch start, the Attiny85 doesn’t work but if I replace the horns with two LEDs all works fine.
There aren’t programming issues, i think that problem is the current that horns absorb that disturb the Attiny85
There aren’t programming issues, i think that problem is the current that horns absorb that disturb the Attiny85
As you believe that the problem is the hardware you should provide information regarding the hardware: schematics, link to the horn an so on.
My crystal ball does not work very well at the moment but:
Stable power supply (at least for the ATtiny) is essential - do you have 0.1 µF ceramic caps between Vcc and GND (as close as possible to the µC pins)?
The mosfet IRF540 may not be the best choice - it is not a logic level mosfet, it may not work so well with low voltage like 5 V