1998chevy1500
New Member
Hello all,
I am attempting to design a circuit that will take an analog input and output a PWM signal. The circuit is going to be used in an automotive application, so I need to make it relatively robust so that voltage spikes and weird EMF do not cause problems with it.
Attached is the schematic. Please look it over and let me know what you think. In the mean time, I will fill you in on the application for it.
The device is intended to be installed to replace the voltage controlled dash illumination dimmer found in most automobiles with a PWM control. This is to go along with replacing the bulbs in the interior with LEDs. The 5-12v variable voltage is the voltage coming from the dimmer control. The load (the LEDs and incandescent bulbs) are high side switched, thus the need for a PNP transistor.
The reason for the Vref pin is that the vehicle voltage will vary from 11.5v to 14.5v. Therefore the voltage on the Vref pin will vary from 3.68v to 4.63v. When the dimmer is at full brightness, it will be at the same voltage as the battery, and the AN3 input will be at the same voltage as the Vref pin. This will make sure that the ADC register is at 0xFF (full value) This value is then passed to the PWM converter, which will run at 100% duty cycle.
The reason for the 4148 diodes is to bleed off any crazy voltage spikes that appear on the input pins. I am not sure if they are needed, I saw them in a schematic I found and thought that they couldn't hurt to have. If you feel they are unnecessary, or there is a better solution, I am all ears.
The PWM pin goes from 0-5v, when it is 0v, the NPN transistor is off, and so is the PNP transistor. When the PWM pin is at 5v the NPN transistor is on and so is the PNP transistor. I am a little unsure about applying BJTs properly, so the 1k resistors shown on the output schematic may be completely wrong. If anyone has some links for me to research the values I should be using, that would be great.
I hope I covered everything, please let me know if I forgot to clarify anything.
Thanks,
Conrad
I am attempting to design a circuit that will take an analog input and output a PWM signal. The circuit is going to be used in an automotive application, so I need to make it relatively robust so that voltage spikes and weird EMF do not cause problems with it.
Attached is the schematic. Please look it over and let me know what you think. In the mean time, I will fill you in on the application for it.
The device is intended to be installed to replace the voltage controlled dash illumination dimmer found in most automobiles with a PWM control. This is to go along with replacing the bulbs in the interior with LEDs. The 5-12v variable voltage is the voltage coming from the dimmer control. The load (the LEDs and incandescent bulbs) are high side switched, thus the need for a PNP transistor.
The reason for the Vref pin is that the vehicle voltage will vary from 11.5v to 14.5v. Therefore the voltage on the Vref pin will vary from 3.68v to 4.63v. When the dimmer is at full brightness, it will be at the same voltage as the battery, and the AN3 input will be at the same voltage as the Vref pin. This will make sure that the ADC register is at 0xFF (full value) This value is then passed to the PWM converter, which will run at 100% duty cycle.
The reason for the 4148 diodes is to bleed off any crazy voltage spikes that appear on the input pins. I am not sure if they are needed, I saw them in a schematic I found and thought that they couldn't hurt to have. If you feel they are unnecessary, or there is a better solution, I am all ears.
The PWM pin goes from 0-5v, when it is 0v, the NPN transistor is off, and so is the PNP transistor. When the PWM pin is at 5v the NPN transistor is on and so is the PNP transistor. I am a little unsure about applying BJTs properly, so the 1k resistors shown on the output schematic may be completely wrong. If anyone has some links for me to research the values I should be using, that would be great.
I hope I covered everything, please let me know if I forgot to clarify anything.
Thanks,
Conrad