Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How to handle a pulse on a 12V line?

  1. #1
    Low Bitrate
    Join Date
    Jul 2009
    Location
    Squamish, BC
    Posts
    93

    How to handle a pulse on a 12V line?

    I am now on to handling the dimmer control within the car which is described as pulse modulation.

    Basically, it switches the 12V on and off very quickly to control how bright the dash LEDs are. I need to measure this speed so that I can detect the 5 or 6 rates/frequencies that are in use and translate them into a brightness setting on the screen.

    Is this handled by the frequency board?
    Can it be done and how?

  2. #2
    Raw Wave
    Join Date
    Nov 2009
    Posts
    2,119
    It is not a frequency. It is a "duty cycle" - the proportion of ON time to total (on+off) time.
    The frequency is usually constant (from a few hundred Hertz to thousands or millions of Hz).

    The %dimming = %duty-cycle (as a general rule - eg, LEDs, incandescents etc).
    EG - if you want 20% brightness, set the PWM to 20% duty cycle.

  3. #3
    Low Bitrate
    Join Date
    Jul 2009
    Location
    Squamish, BC
    Posts
    93
    and how do I measure that using a FusionBrain v4 ?

  4. #4
    Raw Wave
    Join Date
    Nov 2009
    Posts
    2,119
    I'd question why you want to measure it instead of reading off the source?


    But to read by any uPC, you need to measure on versus off time.
    Best is probably using +ve edge & -ve edge detection which each start and end a counter. Otherwise you have to poll...

  5. #5
    Low Bitrate
    Join Date
    Jul 2009
    Location
    Squamish, BC
    Posts
    93
    I wanted to measure it so that I can control the brightness of the display on the carpc. Sounds like this is beyond the FB so I'll drop it. Shame, as that's the first compromise I have had to make.

  6. #6
    Maximum Bitrate Mickz's Avatar
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    812
    You can do this really easily; do you have a spare ADC input on the FB?
    GA-Z77N-WIFI, i5-2400S, 8GB, Intel 520 128GB SSD, M4-ATX Modified, 2 Rev Cams, 2 Web Cams
    8" 16:9 TRANSFLECTIVE, Win8-64, Dual GPS RX and Garmin PC + Odyssey Nav, FM-DAB+, BB-Rec
    T-Screen HVAC control, custom microcontrollers, code and FE. CarPC Project

  7. #7
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Quote Originally Posted by Petrie View Post
    I wanted to measure it so that I can control the brightness of the display on the carpc. Sounds like this is beyond the FB so I'll drop it. Shame, as that's the first compromise I have had to make.
    Quote Originally Posted by Mickz View Post
    You can do this really easily; do you have a spare ADC input on the FB?
    +1

    The basic implementation of a DAC (Digital Analogue Converter) is exactly that. Run the PWM signal through a capacitor to ground. The capacitor "smooths" out the PWM signal. If it is on 10% of the time then if perfectly smoothed you would get a signal that is 10% of the supply. So a 12v PWM signal at 10% duty cycle perfectly smoothed would be 1.2v. 50% duty cycle perfectly smoothed would be 6v. You have to make compromises on how much smoothing you want. The more capacitance, the slower the reaction. Slower to charge, slower to discharge. Since the dimming doesn't change often, this isn't too much of a worry.

    But basically it can be done really easily with 1 capacitor 1 resistor and perhaps 1 more resistor to make a voltage divider depending on the source circuit.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  8. #8
    Low Bitrate
    Join Date
    Jul 2009
    Location
    Squamish, BC
    Posts
    93
    Ok. This is good news. I'm not toally sure yet exactly what you mean but am keen to learn.

    The wiring harness just shows that I have two wires + & -.
    I assume that the stock radio was powering the + line with a voltage just like it did for the steering wheel controls.

    Here's what I found in the wiring manual...

    Name:  dim.png
Views: 126
Size:  7.0 KB

  9. #9
    Raw Wave
    Join Date
    Nov 2009
    Posts
    2,119
    PHEW! Thanks Mickz & Toaster - I was gonna say the FB could...


    But Petrie, there are many methods. I only explained one - a purely "digital" solution.

    But add analog filtering - eg, a voltage divider with cap as 2k1Toaster wrote above - is another...


    Now for Mickz & 2k1, since the PWM input SUPPLY voltage can vary, can the ADC reference voltage be taken off another voltage divider? That means the system voltage is irrelevant (ie, whether 50% at 12V or 14.2V and hence filtered as 6.0V or 7.2V, but they are both 50% PWM Duty Cycle).
    But if the PWM is off a regulated supply (5V, 8V etc; but not the old "flasher can" mechanical voltage regulators {aka digital}), the above is irrelevant.

  10. #10
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Quote Originally Posted by OldSpark View Post
    PHEW! Thanks Mickz & Toaster - I was gonna say the FB could...


    But Petrie, there are many methods. I only explained one - a purely "digital" solution.

    But add analog filtering - eg, a voltage divider with cap as 2k1Toaster wrote above - is another...


    Now for Mickz & 2k1, since the PWM input SUPPLY voltage can vary, can the ADC reference voltage be taken off another voltage divider? That means the system voltage is irrelevant (ie, whether 50% at 12V or 14.2V and hence filtered as 6.0V or 7.2V, but they are both 50% PWM Duty Cycle).
    But if the PWM is off a regulated supply (5V, 8V etc; but not the old "flasher can" mechanical voltage regulators {aka digital}), the above is irrelevant.
    A 12v 50% signal through a dimmer circuit will be less luminous than a 13.8v 50% signal through a dimmer circuit. So if the goal is to measure how bright, not what the duty cycle is, then that should work.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

Page 1 of 2 12 LastLast

Similar Threads

  1. Question about line levels, line drivers and/or EQ's
    By malcom2073 in forum Car Audio
    Replies: 5
    Last Post: 09-01-2009, 01:01 AM
  2. Line Driver and Speaker Line Voltage
    By i_drank_what in forum Car Audio
    Replies: 2
    Last Post: 03-18-2009, 05:28 PM
  3. Circuit help: Short ground pulse -> long +12V pulse
    By cMags in forum Hardware Development
    Replies: 7
    Last Post: 08-14-2008, 07:38 AM
  4. only 1 line-in port and sirius-to-usb and hqct both have line-out
    By americasfuture2 in forum General Hardware Discussion
    Replies: 1
    Last Post: 12-14-2007, 10:53 AM
  5. Need help on power on pulse
    By Jothen in forum Power Supplies
    Replies: 2
    Last Post: 06-04-2002, 08:28 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
  •