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

Thread: use fb to turn headlamps on and off

  1. #1
    Newbie
    Join Date
    Mar 2009
    Location
    illinois
    Posts
    4

    use fb to turn headlamps on and off

    i am new to to fusion brain and car pc world. i am slowly figuring out to fb and config program. having trouble writing logic to use light sensor to trigger output when light level is low and to untrigger same output when light level is high. any help would greatly be appreciated. thanks bob

  2. #2
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Quote Originally Posted by cripauto View Post
    i am new to to fusion brain and car pc world. i am slowly figuring out to fb and config program. having trouble writing logic to use light sensor to trigger output when light level is low and to untrigger same output when light level is high. any help would greatly be appreciated. thanks bob
    Which part do not get? Is there a specific place you are stuck, or just getting going that is tough?
    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

  3. #3
    Newbie
    Join Date
    Mar 2009
    Location
    illinois
    Posts
    4
    im not very good with programming language so bare with me. i have logic for light and temp sensors, and 2 relays for outputs to start with. used ninja kitty to make configuration .xml file. can open and see sensor readings and i am able to click on ouputs for relay control. i am wanting to use the light sensor to turn on output 1 when light is low and turn output off when light is high. i can write a root function and triggers output on when light is low but i can not figure out how to get it to release output when light level is high.

  4. #4
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Quote Originally Posted by cripauto View Post
    im not very good with programming language so bare with me. i have logic for light and temp sensors, and 2 relays for outputs to start with. used ninja kitty to make configuration .xml file. can open and see sensor readings and i am able to click on ouputs for relay control. i am wanting to use the light sensor to turn on output 1 when light is low and turn output off when light is high. i can write a root function and triggers output on when light is low but i can not figure out how to get it to release output when light level is high.
    Easiest way if you already have the low bit, is then use the "anti-then" (a.k.a
    "else") to turn it off. The button right next to the then section is the anti-then.


    Otherwise you can just create another logic block change the "less then" sign to a "greater than" sign (or visa versa).
    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

  5. #5
    Constant Bitrate
    Join Date
    Jul 2002
    Posts
    131
    Cripauto,

    You're not seriously considering using your computer with sensors to turn car headlamps on and off completely while out on the road are you? If you're doing something else than what the thread title says than you can disregard the following.

    I know there were (are?) cars that dim the lights automatically - although I'm not sure how well it really works - turning them totally on and off automatically sounds like a good way for really bad things to happen to you or someone else when something in your system fails or the sensor detects too much light momentarily and shuts them down when you really need them on.

    While 2K1toaster knows his fusion brains and can help you do it, if that is what you're really trying to do, please think long and hard and then decide not to do it at all. The potential consequences of a failure are so bad I wouldn't want to touch something like that and it seems like it would have horrendous liability problems if you ever cause injury to someone.

    Just my 2 cents worth...

  6. #6
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Its exactly the same as Auto headlights on pretty much any car nowadays.

    When implementing in the car, you dont do a "if light then off, if no light then on" type logic. That is for testing only.

    In the car you have a huge hysteresis period. That's why lights wont turn off when you drive under a streetlight or something. And when wired correctly, there should be a on/off/auto so if anything goes wrong flip to on and have it work like it always had.

    It is not dangerous if done correctly.
    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

  7. #7
    Maximum Bitrate Crinos's Avatar
    Join Date
    Mar 2009
    Location
    Kristiansand, Norway
    Posts
    483
    Quote Originally Posted by 2k1Toaster View Post
    Its exactly the same as Auto headlights on pretty much any car nowadays.

    When implementing in the car, you dont do a "if light then off, if no light then on" type logic. That is for testing only.

    In the car you have a huge hysteresis period. That's why lights wont turn off when you drive under a streetlight or something. And when wired correctly, there should be a on/off/auto so if anything goes wrong flip to on and have it work like it always had.

    It is not dangerous if done correctly.
    True, but one should allways have at least the park lights on at all times. Even at day time.

    I'm from Norway, and here, one need to have driving lights on while driving day and night. And it's so much easier to spot a car if there is light infront of it. Even in daylight...

    And now, after the days "safty drill"...

    Many cars have automatic light sensors of some sort.

    My car, a BMW, will ignight the main driving lights while driving into a tunnel, even if the tunnel is brightly litt up with "tunnel lights".
    It's even possible at the dealership to adjust sensetivity of the sensors.

    As a note:
    I am allso planing on using my CarPC to controll the lights of some sort, but I'm doing it via the IBUS (BMW's own bus interface system) instead of FusionBrain.

  8. #8
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    I drive with my headlights on 100% of the time day or night, similar training to Norway from Canada. But in the states, I am pretty much the only one I ever see with lights on in the day time. People even flash me sometimes thinking I turned them on by mistake.

    But anyways, you can control the parking lights seperate from the headlights. The on/off/auto can be set for headlights while the parking lights can be set independant. It is all in the wiring.
    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

  9. #9
    Newbie
    Join Date
    Mar 2009
    Location
    illinois
    Posts
    4
    i own an automotive repair shop with a mobile electronics section. so i have a very good knowledge of vehicle electrical systems. i would attach the fusion brain outputs in parralel with headlamp switch. write the logic to turn lamps on at lets say 10% light and then start taking a 1 minute averaging log, and when the log average reaches 30% light to turn lamps off. that should eliminate the problem of street lights and on coming traffic. works similar to factory autolamps.

    i tried the then and anti then statement. still does not work. im using the photosensor variable < 20 = output node then statement reads trigger output, headlamps, low, vote on. anti then statement reads triggeroutput, hedlamps, low, vote on. still when i open program and lower lights, latches headlamp button, but when i bring lights back up, it does not unlatch headlamp button. and then i want to learn how to make the averaging log work. slow work in progress but would be great contribution to demo truck.

  10. #10
    Newbie Cerberus's Avatar
    Join Date
    Nov 2003
    Posts
    54
    [media]http://www.youtube.com/watch?v=6n3HVEMQsNc[/media]



    C

Page 1 of 2 12 LastLast

Similar Threads

  1. Off - On - Momentary Switch?
    By MP3DUB in forum General Hardware Discussion
    Replies: 7
    Last Post: 07-07-2003, 11:07 PM

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
  •