-
Phase 2... GO
01/12/2015 at 21:19 • 1 commentNow that the headrest monitors are in, and my lil gremlins... I mean, kids, are happy and watching movies to their hearts content while we drive, its time to move on to what Mom and Dad want.
Heres the gameplan
Remote car start, ability to use a non transponder key to run the car by allowing the same key we use to bypass the passkey2 immobilizer to send transponder signals in run mode( this would require the user to authenticate, or else any fool with a screwdriver could drive off with my car.)
OBDii interface specifically for comfort features, this would be seat heaters, steering wheel buttons, window controls
GPS
Accel/gyro/compass to assist gps in fine tuning where the hell we are and where we are going
Small OLED display on dash for feedback
Car wifi bridge (so when its parked we can sync the in car NAS with the home NAS)
Cellular internet (using freedom pop usb modems (2) )
In car wifi
complete headunit replacement
-- Gutting factory radio and stock dvd changer, removing crapping infinity audio amplifier
--raspberry pi using SDR for fm tuning
--airplay receiver
--pandora radio
Adding a 433 long range keyfob
--- More? Ordering parts now!!
-
over (under) engineering
12/30/2014 at 03:58 • 0 commentsSkip to the break for the meat and potatoes
I just wanted to drop a quick update, I got the monitors installed for Xmas, the christmas eve "quick" install went well, until I got to the power / ethernet controller I built that live in the center console.
I used a flora as the brains for it (because it was an extra from another project) it worked perfectly inside, but as soon as I installed it into the car....... DEAD
Yikes, ok change of plan, I hardwired the headrest/media players to the accessory line, yucky, because I dont like random shutdowns, or the power loss from swapping from accessory mode to run mode, or vice versa.
-------------------------------------------------------------------------------------------
I just spent 2 hours trying to track down my stash of PICs, finding on the proccess, *14* propeller boards of various shapes and sizes, almost all of which could do what I need the to do, but I didnt WANT to throw a prop in, for such a simple task......
Well, sometimes you have to try and fail because now I have overspent time on this, because I didnt want to spec in a nuke where a dart would do.... Oh well
-
software - Part 4
12/18/2014 at 04:42 • 0 commentsTurning the monitor on
This was an easy one too, made a file called startup.sh in /storage with the following content
#!/bin/sh cleanup() { echo ${RPI_SCREEN} > /sys/class/gpio/unexport echo ${RPI_STATUS} > /sys/class/gpio/unexport } RPI_STATUS=27 RPI_SCREEN=22 echo ${RPI_SCREEN} > /sys/class/gpio/export echo ${RPI_STATUS} > /sys/class/gpio/export echo "in" > /sys/class/gpio/gpio${RPI_STATUS}/direction echo "out" > /sys/class/gpio/gpio${RPI_SCREEN}/direction echo "1" > /sys/class/gpio/gpio${RPI_SCREEN}/value sleep 3 echo "in" > /sys/class/gpio/gpio${RPI_SCREEN}/direction trap 'cleanup; exit' SIGHUP SIGINT SIGTERM SIGQUIT cleanup
Right now I am not doing anything with the screen status pin, I will probably change that laterand in autostart.sh add:
/storage/startup.sh &
-
software - Part 3
12/18/2014 at 04:33 • 0 commentshere was another quick and easy
Shout out to Gatorfreak, he made a simple reliable service add on to be able to save the play position and resume it on reboot
https://github.com/Gatorfreak/service.autoResume
Download the zip, install on openelec with the "install addon from zip" option, then set the save directory to /storage and set the save frequency to whatever floats your boat ( I used 15)
-
software - Part 2
12/18/2014 at 04:29 • 0 commentsSNES controller
After breeezing through the LIRC stuff, I was ready for what would surely be the next trivial step, getting a SNES controller working in openelec.
......
WRONG
openelec does not offer any sort of controller support that isnt first dumped into the linux joystick system, and even then, the keymap from the joystick didnt seem to work all the time.
I tried various solutions and found 1 that almost worked
https://github.com/petrockblog/SNESDev-RPi
I identified what he was doing, and then modified it, heavily, he was using uinput and making a js dev, which I would then have to still use a keymap to pump into XBMC.
All the joystick stuff, gone.
Next I changed it to have all key presses simulate keyboard events instead, removed the multi-state single button support, removed config file reading, removed NES controlled support, removed 2nd controller support.
Compiled it on my laptop, shot it over and.....
it didnt work
flipped the clock and latch pins in code, recompiled... and success!
To the autostart.sh we need to add the following:
modprobe uinput
modprobe joydev
/storage/SNESDev &
I will put a link here soon to the compiled file
only took 30 mins start to finish, awesome!
-
software - Part 2
12/18/2014 at 04:13 • 0 commentsLirc
this was the easy part, we already sent the IR output to the right default pin so all we have to do is SSH in
UN: root
PW: openelec
nano /storage/.config/autostart.sh
add this
modprobe lirc_rpi
and save ctrl+x, then pick yes
reboot, then pick a remote you want to learn, and make a file for it
more details on the specifics HERE ( http://aron.ws/projects/lirc_rpi/openelec_howto.html )
-
software - Part 1
12/18/2014 at 04:08 • 0 commentsThe software.....
Huge shout out to Whufcle
his post at http://totalxbmc.tv/new-forum/index.php?topic=137.0 was what I used as a starting point
the gist is this, the sd card is formatted as fat32, and has all the normal pi files on it, and additionally the SYSTEM file for openelec, the USB stick is formatted ext4 as is mounted as /storage
the nice thing here where most people goof up is they use references to SDA or SDB and if you have another USB stick plugged in, you may not end up booting correctly, in cmdline.txt we are setting it to mount the partitions by LABEL
So its not perfect still, if you plug in a USB drive with the label SYSTEM or STORAGE things may go bad, so lets just not do that mmmkay?
Out of the box update all your addons, grab a skin to use, I prefer xTV for the kids
we are 80% there, now we just need to....
1.) enable lirc_rpi
2.) get the SNES controller working
3.) be able to autoresume what was being played before power was cut
4.) turn on the monitor on bootup
5.) add games
6.) more... cool stuff?
-
the monitor - Part 3
12/18/2014 at 03:27 • 0 commentsAs it turns out the monitor wont go back to its last state when it resumes getting power, I kind of figured on that.
Pulling the button PCB I found this to my surprise!
LED goes to an unpopulated LED, 3.3v when on, 0v when off... NOTED, that will be going to an IO on the Pi, no need to feed that to the button PCB
Key is the output of the buttons, there is a pulldown on that pin, and each button (besides power) has a resistor to then act as a voltage divider, power is 3.3v, source is 3v, etc NOTED... Ill also be taking that to an IO, but also leaving the original signal path intact
IR is the IR output, once again, that will also be going to an IO, no need to send that to the controller
Next is the SNES Controller, that was as easy as a quick drill, and some hotglue to get the extension cable in place
The last step is to get all these thing connected, and I dont want to hardwire them all the the RPI, I want an easy way to disconnect the monitor from the headrest. I picked DB9 as my preferred connector, I need 8 signals, and
the jumpers from the DB9 to RPI soldered, not heatshrunk yet
This is the monitor side DB9
I used the following pinout
DB9Pin -- Label -- RPI Pin -- SNESCable Color
1 -- 3.3v -- 1 -- green
2 -- Screen LED -- 13 --
3 -- Screen KEY -- 15 --
4 -- Screen IR -- 11 --
5 -- Ground -- 14 -- black
6 -- SNES Data -- 22 -- red
7 -- SNES Latch -- 16 -- yellow
8 -- SNES Clock -- 18 -- blue
9 -- SPARE -- 0 --
Here you can see the DB9 connected and ready to go
The last thing that I didnt mention is I am using a cat6 keystone jack to provide the connection from the rest of the car
Pins 1,2,3,6 go right to the Ethernet port on the pi, and pins 4,5 provide power the screen and the UBEC
pins 7,8 are for a future feature to allow the headrest monitor to gracefully shutdown and cut power to its own relay
Next stop, SOFTWARE!
-
the monitor - Part 2
12/17/2014 at 17:27 • 0 commentsThe point of this project is that right now, we have a "DVD entertainment system" a 7inch screen mounted to the ceiling that uses the speakers in the car.
there are multiple problems with this
1.) they have to watch the same thing
2.) WE(parents) have to hear it
3.) sometimes they want to watch a scene over and over, and WE(parents) have to then have to rewind it for them
4.) WE(parents) can not carry on a conversation without hearing from the back "WE CANT HEAR THE MOVIE!! REWIND IT!!!"
most of the problems are audio related, and while its cute that these headrest monitors came with speakers.... they are not going to stay
So at first I just dumped the wires that were running to the speakers to the 3.5mm jack I installed in the front
That was problematic, after looking up the audio amplifier chip they use and looking at the board, I realized they did everything needed on the board for a headphone connector, except populate the connector!
On the left is the speaker connector, on the right are the headphones pads that I soldered to.
Next, controlling the monitor
-
The monitor - Part 1
12/17/2014 at 17:08 • 0 commentsThe monitor is released from the headrest via a tab accessible through the bottom holes, simply push the tab towards the top of the monitor.
This is the controller hot glued to the back of the screen
The first thing I did was trace the whip pinout to the connector on the board, then I soldered a TRRS connector.
As it turn out, this was a horrible idea, the TRRS cable i got and hacked up was non shielded, and there was a terrible interference that showed up on screen
I would need a different solution...
On the B+ the points I need are PP26,25,24 and ground
using the cable that came with it, I cut it and used its shielded cable and soldered it direct to the RPI