|
 |
|
04-20-2009, 10:59 PM
|
#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
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
04-21-2009, 05:35 PM
|
#2
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 8,862
|
Quote: Originally Posted by cripauto 
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?
|
|
|
04-21-2009, 07:00 PM
|
#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.
|
|
|
04-22-2009, 12:02 AM
|
#4
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 8,862
|
Quote: Originally Posted by cripauto 
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).
|
|
|
04-22-2009, 01:12 AM
|
#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...
|
|
|
04-22-2009, 01:31 AM
|
#6
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 8,862
|
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.
|
|
|
04-22-2009, 02:27 AM
|
#7
|
|
Variable Bitrate
Join Date: Mar 2009
Location: Kristiansand, Norway
Posts: 284
|
Quote: Originally Posted by 2k1Toaster 
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.
|
|
|
04-22-2009, 03:02 AM
|
#8
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 8,862
|
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.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
04-23-2009, 12:10 AM
|
#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.
|
|
|
04-23-2009, 05:39 AM
|
#10
|
|
Newbie
Join Date: Nov 2003
Posts: 45
|
C
|
|
|
04-23-2009, 11:50 AM
|
#11
|
|
Newbie
Join Date: Apr 2009
Posts: 7
|
Wow, that's great! How is the iPhone scripting done or is it a webpage through virtual desktop over wi-fi?
Jeff
|
|
|
04-23-2009, 11:58 AM
|
#12
|
|
Newbie
Join Date: Mar 2009
Location: illinois
Posts: 4
|
i went back to my car pc and worked on the config program and i did figure out how to get the output to toggle on and off, how would i log for 1 minute and average that to determine light level is high to turn lights off???
|
|
|
06-17-2009, 05:37 AM
|
#13
|
|
Low Bitrate
Join Date: Nov 2007
Posts: 89
|
hi,
well i need HOW TO for the headlights automaiton. is there any around??
|
|
|
06-17-2009, 06:13 AM
|
#14
|
|
Variable Bitrate
Join Date: Mar 2009
Location: Kristiansand, Norway
Posts: 284
|
Not ment to be rude, but....
If you do not know what you are doing, don't do it!
Tempering with headlights can be fatal, if they all of a sudden should turn them self off while you drive at 140km/t and it gets dark all of a sudden.
So unless you find a howto for your spesefic car, and FB... don't temper with it.
|
|
|
06-17-2009, 08:00 AM
|
#15
|
|
Low Bitrate
Join Date: Nov 2007
Posts: 89
|
i can easily play around with the hardware part. but the problem is about the spftware thing. i need "HOW TO" on the software part. rest is easy for me. ( wiring, realy and all that stuff)
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
Off - On - Momentary Switch?
|
MP3DUB |
General Hardware Discussion |
7 |
07-08-2003 12:07 AM |
All times are GMT -5. The time now is 05:01 AM.
| |