- #1
trogan77
- 4
- 0
Hi guys... be kind as I am a software engineer by trade and this is my first little side-project in EE.
So I'm building a custom motorcycle from the ground-up and it is nearly complete. I decided for the brake light and various indicator lights, that I would control them using a pic microcontroller for which I have already written and tested my program. Everything seems to be working wonderfully on the bread-board. I have a 12v DC power supply running the circuit (although I think on the motorcycle, the voltage may be around 14v) and the microcontroller is behind a voltage regulator to give it the 3.3v it requires. For the indicator lights, I have a bunch of LEDs that I blink or fade using PWM as necessary, and there is a small transistor paired with each of them which helps the pic switch them on/off. The circuit will certainly draw less than 3 Amps altogether. All of that seems to have been pretty straightforward.
Here is the part that I'm scratching my head over. I know that in automotive applications, the electrical system is a very harsh one with EMI, voltage spikes from the ignition system, overvoltages, undervoltages, and various gremlins which I may be unaware of.
How can one best protect a microcontroller in such an environment? I'm assuming that I'll need to put the voltage regulator and microcontroller behind a filter of sorts but I don't know how to design that piece. I have also read that there are some chips designed specifically for this purpose but I don't know much about that.
Also, how can one protect the pins of the microcontroller where they connect to various switch inputs? (eg: low oil pressure sensor, neutral switch, directional switch, etc.)
I hope I have provided you with enough information but please let me know if you would like more details. Any recommendations you can provide will be thoroughly appreciated.
Regards,
Tom
The motorcycle in case you are curious.
So I'm building a custom motorcycle from the ground-up and it is nearly complete. I decided for the brake light and various indicator lights, that I would control them using a pic microcontroller for which I have already written and tested my program. Everything seems to be working wonderfully on the bread-board. I have a 12v DC power supply running the circuit (although I think on the motorcycle, the voltage may be around 14v) and the microcontroller is behind a voltage regulator to give it the 3.3v it requires. For the indicator lights, I have a bunch of LEDs that I blink or fade using PWM as necessary, and there is a small transistor paired with each of them which helps the pic switch them on/off. The circuit will certainly draw less than 3 Amps altogether. All of that seems to have been pretty straightforward.
Here is the part that I'm scratching my head over. I know that in automotive applications, the electrical system is a very harsh one with EMI, voltage spikes from the ignition system, overvoltages, undervoltages, and various gremlins which I may be unaware of.
How can one best protect a microcontroller in such an environment? I'm assuming that I'll need to put the voltage regulator and microcontroller behind a filter of sorts but I don't know how to design that piece. I have also read that there are some chips designed specifically for this purpose but I don't know much about that.
Also, how can one protect the pins of the microcontroller where they connect to various switch inputs? (eg: low oil pressure sensor, neutral switch, directional switch, etc.)
I hope I have provided you with enough information but please let me know if you would like more details. Any recommendations you can provide will be thoroughly appreciated.
Regards,
Tom
The motorcycle in case you are curious.