Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 35

Thread: Controlling back lights directly?

  1. #21
    Constant Bitrate
    Join Date
    Mar 2010
    Posts
    160
    You owe it to yourself to check out PIC's. The PicAxe is so easy to program using just the serial output of your computer.
    Check out these sites;
    www.picaxe.com
    www.sparkfun.com

    I just started working with them over a year ago in this thread;
    http://www.mp3car.com/lcd-display/14...d-backlit.html
    OldSpark and I had about the same discussions in that thread as in this one.

    With a PIC you'd be changing code instead of circuits. You could take whatever's coming out of your car for dimming and program the PIC to give you the results you want.
    It really was fun to figure out the programming. You start simple and just build from there. There's lot's of forums that have lots of examples that you can adapt to your needs.
    I have my little circuit hooked up to my carputer permanently. I can reprogram it whenever I want.
    Seriously, if you were building switching power supplies for fun you'd really enjoy PIC's.
    You should just get a few to play with. As you play with them you'll be flooded with ideas.

    This is the code I'm currently running on mine to follow light changes.
    It's reading a light detecting resistor to adjust the PWM to the backlight.
    Code:
    symbol LED=2        						'Output 2 - LED Backlight (pin5 on chip)
    symbol LDR=4        						'Input 4 - LDR with 10Kohm resistor (pin 3 on chip)
    pause 200
    
    start:
    	gosub readldr
    	for w3=1 to w1
    	gosub updown
    	gosub light
    	if w2>=1000 then:exit:endif
    	next w3
    	
    running:
    	if pin1=1 then pwmout LED,off:goto running:endif
    	gosub readldr
    	gosub updown
    	gosub light
    	pause 100
    	goto running
    	
    readldr:
    	readadc LDR,b0
    	w1=b0*17
    	if w1<30 then:w1=30:endif
    	return
    	
    updown:
    	if w1<w2 and w2>30 then:dec w2:endif
    	if w1>w2 and w2<1000 then:inc w2:endif
    	return
    
    light:
    	pwmout LED,249,w2
    	return

  2. #22
    Raw Wave
    Join Date
    Nov 2009
    Posts
    2,118
    x2 on the PICs. Far better than and simpler circuit and calcs than SMPS controllers (why use them?).

    Light brightness is proportional to the PWM duty cycle (for most typical lighting), hence why they are the common dimmer for mixes of tungsten, halogen and LED lights. Otherwise they are the common dimmer simply for cost, sizing, and heat reasons.
    Hence to the use of PICs. Apart from simple applications where the 555 circuit or similar is fine, any time the ramping up or down is required, PICs are the go - eg, dimming of lights instead of turn-off.
    And if BOTH rampings are required - eg, the brightening "ON" and then dimming OFF for dome or puddle lights - the PIC IMO is the only answer (the electronic circuitry for that gets quite complex).


    PICs are essentially cheaper than the 555 anyway. Plus it's easy to add a full-on for 100% unlike 555 and similar circuits which have a max of 99% or 99.9% etc (without additional circuitry). (Their are various commercial chips that variable PWM with full-on, but they are hard to source if not to pricey and may have limits (eg, minimum 30% duty cycle). PICs overcome such limitations.


    All the PICs have PWM outputs.
    I finally crossed over (from logic etc circuits and CPUs) to PICs when the $4 8-pin 08M2 with its ~2,000 lines of program space was released. I have several - not that any are used yet (But hey, I finally soldered some SMD 08s to a 30 year old circuit board I had... Now for the voltage regulator, and then...)

  3. #23
    Maximum Bitrate Mickz's Avatar
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    876
    Just been reading the thread and I was reminded about looking at my LED backlighting once again. I just now popped the monitor from the vehicle and was surprised to find that this monitor does indeed adjust LED backlighting. However it’s only a 3 step adjustment for Bright, Normal and Dark and is automatically controlled via a small Photo Diode. It’s a PWM control from a small separate PCB labelled “funnily enough” LED DRV.

    This PCB has normal 2 wires running to the LED array and another small 4 pin connector. The 4 pins were earth, +5v, +5v and the other varied from 0.4 volts to 1.2 volts in response to the Light detector circuit on the Main PCB. Quick test and I found I could get the LED backlight to go way down in brightness with 1.8 volts (normally 1.2V at Dark setting) on that pin and brightness variation was linear with voltage from 0.4 to 1.8V.

    I’ll see about either dropping the Vehicle PWM control line down to match this variation with a resistive divider or just play it completely safe and use a $1.50 Optocoupler for a totally isolated connection. In either case I’ll gate the existing 3 step Auto control (it’s handy for day use) and have the Vehicle PWM control signal switch in with Vehicle lights.

    Total display consumption @ 12V is 6 Watts with bright and around 2 Watts dim backlight.

    X3 on using PIC's especially as davekra mentioned, picaxe for those starting out.
    Last edited by Mickz; 07-19-2012 at 04:57 AM.
    Surface Pro 2 128GB portrait mode, Win8.1, Reverse camera, Dual 10HZ GPS RX's for Speed Display & Sat Nav, FM-DAB & Phone Modules, iDrive interface. T-Screen HVAC control, custom microcontrollers, microcode and FE. Previous Car-PC Project

  4. #24
    Newbie
    Join Date
    Mar 2012
    Location
    Tampa, FL
    Posts
    18
    Yeah It's looking like I'm going to check the PICAXE out. I tried getting into PICs a few years ago but then (at least with the tools I knew of) I had to code in assembly. I just didn't have the time to invest to learn assembly to an adequate level to get beyond much of anything so it ended there. I see these are programed in basic which is a huge bonus. It's been a LONG time since I used basic - it had line numbers back then - so I've got a bit to learn but I could kinda follow the code here so maybe there is some hope there. Even looking at the 8 pin chip, for what it has onboard for only a few bucks just seems ridiculous! Oh the possibilities.

  5. #25
    Maximum Bitrate Mickz's Avatar
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    876
    Exactly, the PICAXE is just a Microchip PIC device with a boot-loader and Basic interpreter built in. As said, very low cost and great for small projects without the steep learning curve of ASM or expensive programming hardware, tons of code out there to copy or modify. I'm sure someone here who uses them can offer a few good links if needed.
    Last edited by Mickz; 07-17-2012 at 03:23 AM.
    Surface Pro 2 128GB portrait mode, Win8.1, Reverse camera, Dual 10HZ GPS RX's for Speed Display & Sat Nav, FM-DAB & Phone Modules, iDrive interface. T-Screen HVAC control, custom microcontrollers, microcode and FE. Previous Car-PC Project

  6. #26
    Raw Wave
    Join Date
    Nov 2009
    Posts
    2,118
    G'dam high level languages! It's Assembler for me!


    But maybe for a few simple mods to existing coding...

  7. #27
    Maximum Bitrate Mickz's Avatar
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    876
    Well the plot thickens.

    I have traced out the circuit for the LED Backlight Control. The IC appears to be a small (SMD) 6 pin Step-up convertor. The current through the LEDs is sensed and SET by parallel connected resistors 2R2, 4R7. With this layout I would assume overvoltage protection, open circuit protection, over current protection etc.

    Interesting Note: This monitor also adjusts the Brightness and Contrast levels along with the Backlight level with the 3 Step Ambient light sense circuit located on the Main PCB.



    My FE reads the PWM dash-light signal from the Vehicle and adjusts the Windows Brightness level, this works great in conjunction with the Auto Backlight on the Monitor – however it is STILL not quite enough for country night driving and this is where further reduction of the LED backlight will make a big difference. My initial interest in Backlight control was the hope it would maintain good contrast and color depth at low output levels, which is not always the case with trying to bring Brightness and Contrast way down with normal controls and the Windows API.

    Test carried out last night appear to indicate this is a far superior method and I had really good color and contrast with the LED backlight wound way down.

    I’m currently trawling the NET trying to find an IC/circuit similar to this. There are some very complicated LED backlight driving schemes out there but mainly for large screen devices, haven’t found anything much like this as yet.

    BTW this circuit layout looks very similar to the layout in the PCB pictures posted on page 1.

    Well, back to trawling the NET.
    Last edited by Mickz; 07-19-2012 at 04:58 AM.
    Surface Pro 2 128GB portrait mode, Win8.1, Reverse camera, Dual 10HZ GPS RX's for Speed Display & Sat Nav, FM-DAB & Phone Modules, iDrive interface. T-Screen HVAC control, custom microcontrollers, microcode and FE. Previous Car-PC Project

  8. #28
    MySQL Error soundman98's Avatar
    Join Date
    Jan 2008
    Location
    on the border of northern IL/IN
    Posts
    5,820
    for a minute there, i thought you knew what IC they were currently using in the screens..

  9. #29
    Maximum Bitrate Mickz's Avatar
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    876
    Hi Soundman - Well look what I just found.

    I'm HAPPY - I may have found something dam close! That line I labelled as a possible Enable is more than that as it can be driven with a PWM signal for BL control. This circuit even has the DC control of BL intensity (as in my unit) and the possibility of PWM control via the FB pin as well.

    And here is the PDF I managed to find which is close to this device and circuit. 7937v130.pdf


    EDIT: My unit is in fact PWM not DC on the FB control line (may bad) see next post. But DC control worked perfectly, after the filter (C5 and input resistor) the PWM would likely be a DC voltage anyway.
    Last edited by Mickz; 07-19-2012 at 05:00 AM.
    Surface Pro 2 128GB portrait mode, Win8.1, Reverse camera, Dual 10HZ GPS RX's for Speed Display & Sat Nav, FM-DAB & Phone Modules, iDrive interface. T-Screen HVAC control, custom microcontrollers, microcode and FE. Previous Car-PC Project

  10. #30
    Maximum Bitrate Mickz's Avatar
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    876
    Small “embarrassing” update After looking at the circuit I decided to check the control voltage coming from the Main display PCB which drives the Backlight control line. Man, I have got to stop using my DVM for this as it shows the value of any PWM signal as a nice DC voltage. After checking with a CRO (oscilloscope) it is of course PWM as per the filtered input in the PDF and my circuit. So this circuit is a piece of cake to connect to the vehicle dash light control line.


    Updated my previous circuit
    Last edited by Mickz; 07-18-2012 at 12:29 AM. Reason: Updated my previous circuit
    Surface Pro 2 128GB portrait mode, Win8.1, Reverse camera, Dual 10HZ GPS RX's for Speed Display & Sat Nav, FM-DAB & Phone Modules, iDrive interface. T-Screen HVAC control, custom microcontrollers, microcode and FE. Previous Car-PC Project

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 06-12-2012, 01:19 AM
  2. controlling Underglow & Underdash Lights
    By bassboy3313 in forum Input Devices
    Replies: 2
    Last Post: 12-08-2008, 05:46 PM
  3. Controlling Emergency Lights from CarPC
    By Mr_Luko in forum Newbie
    Replies: 6
    Last Post: 11-11-2008, 02:13 PM
  4. Controlling lights with a central device
    By garrettjeepxj in forum Input Devices
    Replies: 10
    Last Post: 10-30-2006, 12:53 AM
  5. Controlling Lights with the PC
    By Cryogen-x in forum Input Devices
    Replies: 15
    Last Post: 03-01-2004, 06:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •