Hi everyone, this is my first post so be kind
As I approach retiement I thought I would learn a new hobby. Electronics and Microcontrollers it is.
I am self taught (using resources from the internet) so I hope I am using the corect terminology.
Below is a circuit I have modified for my own needs - It is used to back light an instrument panel.
The backlighting will be turned on by a microcontroller but I know that the maximum current of a GPIO pin is in the range of 40mA. Therefore I am using a 12 volt supply to power the back lighting.
I have included my calculations for resistors in the image below - I have been doing this in my schematics for the time being just to force me to think about what i am doing.
Anyway to my question...
What is the purpose of the voltage divider in the reference circuit.
If I omit the voltage divider (R1 & R2) it simply raises the value of R3 - and saves two resistors.
I suspect there is another logical reason this was included in the reference circuit? Is it to reduce the load on the microcontroler pin? If so how do you go about working out the best values to use for R1 & R2 or are they somewhat arbitary?
Thanks for your time.
Craig

As I approach retiement I thought I would learn a new hobby. Electronics and Microcontrollers it is.
I am self taught (using resources from the internet) so I hope I am using the corect terminology.
Below is a circuit I have modified for my own needs - It is used to back light an instrument panel.
The backlighting will be turned on by a microcontroller but I know that the maximum current of a GPIO pin is in the range of 40mA. Therefore I am using a 12 volt supply to power the back lighting.
I have included my calculations for resistors in the image below - I have been doing this in my schematics for the time being just to force me to think about what i am doing.
Anyway to my question...
What is the purpose of the voltage divider in the reference circuit.
If I omit the voltage divider (R1 & R2) it simply raises the value of R3 - and saves two resistors.
I suspect there is another logical reason this was included in the reference circuit? Is it to reduce the load on the microcontroler pin? If so how do you go about working out the best values to use for R1 & R2 or are they somewhat arbitary?
Thanks for your time.
Craig
