View Single Post
Old 04-18-2016, 01:16 PM   #433 (permalink)
t vago
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 830
Thanked 708 Times in 456 Posts
Quote:
Originally Posted by H-Man View Post
Is there any reason I wouldn't be able to add some code to do an analog read of my dashboard lamp rheostat voltage and have the micro controller adjust PWM based on dashboard brightness?
Hardware-wise, you'd have to add a voltage divider to condition your instrument panel lighting signal to be less than 5VDC, then feed it to one of the analog input pins. You'd want to also add a 5 VDC Zener diode to the pin for circuit protection. The circuit would look similar to this:



The resistor values would have to be adjusted, but that should be easy enough to do.

Software/Arduino-wise, this capability could easily enough be added in. My code already has analog input reading capability built into it - not sure if the original DCB 0.86 (or earlier) code would allow/accept Analog library calls. I'd just have to provision in a way of assigning an unused analog pin for use with brightness.

I got the analog gauge driver code added in, but haven't been able to find any time to test it.
  Reply With Quote