Looks like a great idea,
Zip Saved for when i build the comp, Still in the scavenging of parts stage
Being the lazy bastard that I am I decided that it would be too complicated (read too much of an effort) for me to push a button to change frontend gamma from day to night so why not have a sensor to do all the hard work for me? That way when the darkness falls the gamma would be switched on to around half the normal value and when the day breaks it would be switched back on to normal value automagically.
First the hardware. Pulled out my breadboard and off to work. As usually people do, I started with the most complicated scheme for the purpose i.e. with an op-amp running as a voltage comparator.
All fine, but I can have the same thing a lot simpler, so I tried with a darlington.
Fine too, but that left me with a problem: I needed a 12V source for the scheme to work (I know it's not that hard to find one in a computer case, but I like the KISS principle). So I ended up with just the photo-transistor and a diode for added protection since DTR in low state is -12V (I'd rather be on the safe side
). This has a disadvantage though: due to the extreme simplicity you can't adjust the level of light it's gonna respond to, but things are working just fine for me without adjusting anything (I even stayed wake last night to see the level of ambiental light at dawn when it will switch and it switched just fine). The photo-transistor is soldered at the end of two wires, isolated with shrink-wrap tubing and fitted inside a dc jack housing. The transparent head comes from a ball point pen cap which I had around; it needed some step by step cutting to get the exact diameter so I could fit it tight in the jack housing. It connects to pins 4 and 8 (DTR and CTS) of the com port on your computer.
Now the software. Since the routine is integrated in the frontend I'm writing I decided to make it available to you guys as a standalone program. Remember that the program just sits in the tray and does not accept any user input (except exit command of course) it just monitors the serial port for the CTS line status (sensor connects the DTR line - which is set to high when the program starts - to CTS line when there's light falling on it and disconnects the two when there's no light) so if you run it without the sensor connected it will just darken your screen. You've been warned. Oh and by the way set the com port your sensor will be on in the ini file. Other than that hope somebody will find it useful.
Why drink and drive when you can smoke and fly ?
Looks like a great idea,
Zip Saved for when i build the comp, Still in the scavenging of parts stage
I like this, will build it. Now, is this photo-transistor has part number , can I get it from RadioS . Thanks for sharing
I can give you the source code so that you can modify it if you connect the sensor in a different way. Alternatively if you provide me with schematics of how is your light sensor connected to your car maybe I can come up with some adapter to connect it to the serial port and use the software as it is.Originally Posted by boostedGT-S
Basically, because of the extremely low current of the serial portOriginally Posted by kingtut
any photo-transistor or photo-diode will work. I used a generic (no part number, sorry) photo-transistor which looks exactly like a white transparent LED. Good luck with building.
Why drink and drive when you can smoke and fly ?
I have done the exact same thing... I used the cheapo photocells and am regulating voltage between the 12 down to about 8... I used a 317 instead though, no need for a transistor then... for the "split" resistors that would normally set the output voltage I put a pair of 15 turn 10k pots and with the upper leg I put two cheapo photocells from the "grab bag" at radio shack... about $15 in parts... one big difference is mine is not gonna "switch" over, it will transistion and street lights/headlights aren't going to change the brightness unless you are sitting directly under it...
for my setup I added a fairly large cap to the control leg, to "slow" the transitions... it takes mine about 10 seconds to go from low to high... I haven't hooked up the Xenarc yet (still waiting on some bigger cohones)... but it is getting closer to the top of the to-do list... I will post pics of the proto board tonight... this rocks, glad to see I am not the only one climbing this hill...
Kronos, keep this thread alive.. I think people bite once the kinks are worked out...
I am skipping the computer connection, no need for serial input... light is all you need... backlight dimming looks way better than gamma settings, don't you think??
I think it would be easier to hardwire it directly into the screen, than to build circuit and software... I have an in dash DVD player that uses another input on the screen, so I am looking for a total screen solution, not just computer input dimming...
anyone else think this is a project worth pursuing??
What a great idea!!!
And of course this would work through tunnels as well (how cool would that look to your passengers as it adjusts automatically!!!)
boostedGT-S, using a relay connected through your lights you could make a similar circuit that therefore runs off your car's sensor though it would probably need the line high setting reversed to work? (sure someone could correct me on this)
mgithens, my lilliput is permanently in pieces behind my fasciaso I might be up for your version if it truly is simple - how would it work?
Ford Focus MP3 : www.stevieg.org/carpc Blog Updated 29 January 2009!
Car PC Status: Complete - Undergoing Software Redevelopment
Actually you're right with hardwiring into the screen, but since I don't have a screen yet (raising fundsOriginally Posted by mgithens
) I had nothing to practice on. If you do something in that direction then please post some info. Eventually I will go that route too, once I'll have a screen, but until then... I thought something is better than nothing and besides that some people simply lack the technical skills to modify a screen so a simpler solution might work for them. Let's make this a dual system thread, one approach being interfacing with a computer and the other interfacing directly with the screen so all the info is in one place.
Originally Posted by stevieg
Tunnels were the main reason I didn't use a capacitor to slow the response, but instead the wait can be implemented in software e.g. only during the night will it slow down the transition cause during the day we don't need it.Originally Posted by mgithens
Why drink and drive when you can smoke and fly ?
ok, first let me start off by saying that I am a Mech Engr... electrical crap is for hobbies...Originally Posted by stevieg
this is a link to the heart and soul of the idea... simple voltage regulator, can handle MUCH more than we are asking for... the only other thing you need are some 10k-100k photocells and a few 0-10k potentiometers...
![]()
here's the basic diagram... my changes were to replace R1 and R2 with 10k pots, then you can dial in the brightness and range that you want... and the second change is to add the photocells in parallel with R1... you need to find photocells that have a decent range (read - LESS RESISTANCE OVERALL)... some photocells go up into the 1M ohm range, we need the 10k to 100k ranges to be covered... I actually am running two 10k-100k in parallel to get 5k-50k... I found these in a $3 5-pack of photocells...
the only other change that I would suggest is putting a sizeable electrolytic capacitor in parallel (positive side away from ground) with R2.. this will keep the light from "bouncing" it will stay constant and won't respond immediately to light changes... I used 3300pF and it worked great... more is better - within reason... and also, for reference, I skipped the C1 and C2 caps - those are for line noise and fluctuation... we're working with light, we won't be able to notice the small variations... ok, so here's a proof of concept video on a protoboard...
video here
this isn't 100% of the info that you'll need... one thing I am up against is that if you use the regulated 12V supply from your motherboard's p/s then you will have two issues... #1 is 12V... the car's electrical system is typically 14.4V when the alternator is turning, and this voltage regulator will take a hit so you will max out less than the supply voltage... from reading the forums someone mentioned that there was a 1ohm resistor in series with the positive lead to the backlight... so I will definitely be ditching that and just dial in my own equivalent... so if you do manage to bypass the 1ohm the voltage drop might put you right in the butter zone... #2 is that the computer has to be on for lighting...
ok, feedback time... thoughts?? (I pulled the capacitor out for the video so that you could see it work fast, with the cap it takes about 10 or so seconds from dark to light)
Bookmarks