/bump
This has worked perfectly for over a year.
Original thread and idea here:
Auto reverse camera
I am reposting as a new thread since the old started out with a cheesebox solution rather than a PIC solution.
I was able to finally get this working, it is installed in my car now. It pulses the input button once when you enter reverse and then waits for you to leave reverse at which time it pulses untill it detects that the LCD is in VGA mode
.
I am sceptical that the OP of this curcuit ever got his working. There were both software and hardware bugs that would have prevented his from working.
To find the VGA sensor on your LCD controller, look at this image.
http://www.nwlink.com/~erice/CarPC/P...ollerBoard.JPG
This is a image of a 619 but mine was a 629 so it is a bit different. You should be able to find it with the info given though. Just use a volt meter and switch modes back and forth. I soldered onto the left side of that resistor.
Here is my final hardware version:
http://www.nwlink.com/~erice/MyLilSourceSwitcher2.JPG
Edit:
Schematic and PCB layout redone in PCBExpress
I have not tested this layout as I had no reason to make another board.
I did it just to see how to use the layout software.
http://www.nwlink.com/~erice/CarPC/PIC/BackupCam.sch
http://www.nwlink.com/~erice/CarPC/PIC/BackupCam.pcb
/End Edit
It is a little more complicated than it needs to be and I'll list optional components as such so you can eliminate them if you want.
Components
LM7805 (5V power supply)
C1 = .1uF
C2 = .22uF
C3 = >20pF but as close to 20 as you can get
C4 = 10uF (optional, it just stabalizes V a bit more)
C5 = .1uF (optional, it just stabalizes V a bit more)
K1 = 12V relay (dip package, get one with a diode across the coil) (Could be replaced with optio isolater (I am told))
K2 = 5V relay (dip package, get one with a diode across the coil)
D1 = 1N4148, Diode. Protects the 7805 when power gets shut off. Really needed if you use C4.
Q1 = transistor = BC547B (or similar spec)
R1 = 50K ohms
R2 = 2k2 = 2.2K ohms
R3 = 3k3 = 3.3K ohms
R4 = <40K ohms but something close to 40K
R5s = 50K ohms (each unused I/O pin gets tied to ground to prevent floating pins which can eventualy damage the PIC, each pin gets its own R5, may be optional)
R6 = 2k2 = 2.2K ohms
The R1/C3 combination are critical. They directly determine the oscilation frequency of the PIC. The original curcuit oscilated at 1Hz. Yes, 1Hz, too slow to do anything. The pic took ~10seconds to respond to input. Yeesh. This version is likely oscilating at ~266Khz.
I used a PIC16F84A but there are others that would be a better choice. Mainly, you want to pick a PIC that has no more I/O pins than you need. (I have since decided that the PIC16F676 is the best choice, the pinouts are different than the PIC16F84 though)
I did not create an etched board, I just soldered wires to each pin.
Pics of board:
You can see the programmer I used above the board.
http://www.nwlink.com/~erice/CarPC/PIC/BoardTop.JPG
http://www.nwlink.com/~erice/CarPC/PIC/BoardBottom.JPG
I don't recommend this project for the faint of heart. It took me 3 weeks and tremendous work and studying to get it done. I didn't know anything about PICs and little electronics when I started and by the end I had to know a lot about both of those. If you take it on, though, I'll help you through it.
Code:
Project file:
http://www.nwlink.com/~erice/CarPC/P... selector3.mcp
Make sure your project finds the p16f84.inc file. It is installed with your compiler.
Actual asm file (code)
http://www.nwlink.com/~erice/CarPC/PIC/Cam Selector.asm
Binary to burn to PIC
http://www.nwlink.com/~erice/CarPC/PIC/Cam Selector.HEX
Test version of the code
http://www.nwlink.com/~erice/CarPC/PIC/OnTest2.asm
This simply reads RA0(input) and puts RB0(output) high in response to RA0. i.e. it tracks RA0.
I used a cheap $13 PIC programmer off ebay. It worked fine/ok.
I don't recommend getting the pic from someone else and expecting it to work. That is what I was originaly thinking of doing. The problem is that you will likely need a test version of the code in your pic to debug your hardware, w/o that you may never get your hardware working.
My Work Thread:
http://www.mp3car.com/vbulletin/show-off-your-project/72552-mp3-project-for-land-cruiser-done.html
Source switcher for Lill
http://www.mp3car.com/vbulletin/show...d=1#post841007
/bump
My Work Thread:
http://www.mp3car.com/vbulletin/showthread.php?t=72552
Source switcher for Lill
http://www.mp3car.com/vbulletin/show...d=1#post841007
Wow, I was just thinking the other day that I made the wrong choice going with a Lilli 629 since I want an auto-switch backup cam. After reading this post, I am at ease again. It will be a while until i am ready to implement a backup cam in my car, but I like to get a head start on planning!
Will you be making and selling these at all? I know nothing about PIC programming or electronic board level stuff. How hard is hooking up all the hardware for it? How would I wire to sense when I go in reverse? Would I hook something up to the reverse light power to sense when they are on?
Thanks for the hard work on this, very impressive...
~Puff
View my worklog... I dare you... http://www.mp3car.com/vbulletin/worklogs/77267-2003-audi-a4-worklog-puffs-ride.html
Carputer Progress [||------------------] 10%
I won’t make them to sell. Frankly, it was too much work. It would be much easier if I had gone to the work of making a circuit board for it so I won’t have to do the wiring manually but that is a whole project unto itself if you haven’t done it before.
“I know nothing about PIC programming or electronic board level stuff”
I didn’t either. It can be learned and at least you have me to ask questions of.
“How hard is hooking up all the hardware for it?”
If you are reasonably smart and ok with a soldering iron then you can do it.
“How would I wire to sense when I go in reverse?”
I tapped into the reverse light signal. I hooked that to a relay to power the Camera so it was only on when in reverse. I sent the output power from the relay to the Camera and the reverse sensor on the PIC controller board.
If you feel adventurous then choose a PIC like the PIC676 that has its own built in oscillator. That eliminates the need for the RC oscillating circuit on the PIC board and also gives you a solid 4mhz processing speed. Of course, that necessitates changing the code a tad to compensate (and the pin outs on the 676 would be a little different). You would need to add a bit of code to configure the internal processor and then you would need to change some of the timing constants I use to account for the faster processing speed.
My Work Thread:
http://www.mp3car.com/vbulletin/showthread.php?t=72552
Source switcher for Lill
http://www.mp3car.com/vbulletin/show...d=1#post841007
Cool. Thanks for all the info. I think when I get to the camera setup on my car I will try this. Maybe I'll go to ITT Tech first, lol.
Got any pics of the nightview cam in use? How well does it work in low light situations?
~Puff
View my worklog... I dare you... http://www.mp3car.com/vbulletin/showthread.php?t=77267
Carputer Progress [||------------------] 10%
It looks pretty much the same at night as it does in the day. In the day the colors don't really stand out. Its almost like a cepia but in grey scale. At night it looks virtualy the same.
My Work Thread:
http://www.mp3car.com/vbulletin/showthread.php?t=72552
Source switcher for Lill
http://www.mp3car.com/vbulletin/show...d=1#post841007
waiting to see the result.
2004 Matrix XR A7N8X-VM/400 AMD XP-M 2500+, DS-ATX
89 Supra Turbo P3 600E@750/Abit BE6 II, Alpine M-BUS Car2PC.
Y2K Accord Dell GX150
RoadRunner is the best FE PERIOD
EmoRebellion is a SCAMMER
Could you precise where is this "VGA sensor"...To find the VGA sensor on your LCD controller, look at this image.
http://www.nwlink.com/~erice/CarPC/P...ollerBoard.JPG
This is a image of a 619 but mine was a 629 so it is a bit different. You should be able to find it with the info given though. Just use a volt meter and switch modes back and forth.
.
thank you
By VGA sensor I just mean a signal that is +5V when in VGA mode and 0V when not. The image shows a yellow circle at the top of the board. That is where mine was. I bet that the red circle is the same thing on a 619 board. Just use a volt meter and you should know pretty quick if you found it.
Edit: I guess I could mention that I soldered my sensor wire onto the left side of that resistor.
I'll take pics of the LCD controller the next time it is out of the vehicle. That will be when I go to install my Transreflective upgrade.
My Work Thread:
http://www.mp3car.com/vbulletin/showthread.php?t=72552
Source switcher for Lill
http://www.mp3car.com/vbulletin/show...d=1#post841007
This has worked out really well. It switches very reliably. The only time it fails to switch back to VGA is if the backup camera doesn’t come on for some reason (and you are backing up for more than like 10 seconds). I had the latest version of the switcher installed for a week or so before I had my camera in…I was redoing the mount for it. The Lilliput is finiky about switching when it has no source signal. What happens is that if the Lill doesn’t see a source signal and it stays in that mode for ~10 seconds or more, it gets into this mode where it will NOT switch modes no matter what you do. The only way to clear this is to shut the monitor off and back on. Once it is back on you can make it switch in the first 10 seconds or so.
But as long as the camera is there and comes on at the right time I have not had one failure to switch into Video1 when it was supposed to and then switch back to VGA when it was supposed to.
My Work Thread:
http://www.mp3car.com/vbulletin/showthread.php?t=72552
Source switcher for Lill
http://www.mp3car.com/vbulletin/show...d=1#post841007
Bookmarks