Monday 16 November 2015

Rear Programmable Keys, FM Fixed and Keyboard Installed

Hello and welcome to post #18 of my project on building an all in one in-car PC based multifunctional system.

Roughly a month ago the FM tuner app Radio Reciever in my Patrol started displaying an error when started stating it could not connect to the FM tuner dongle. I suspected the tuner to be faulty due to the poor FM signal I experienced in previous posts, so I ordered another almost** identical tuner from Ebay. 

After doing some research and popping the new tuner open when it arrived I made an interesting discovery. The older black dongle had the older R820T tuner chip (This is the part that the antenna is connected to and which selects the desired frequencies then feeds them to the RTL2832U which does the demodulation and interfaces with the PC). 

The R820T (older model) tuner chip that was housed in the black dongle
At first the dongles appeared identical, save for arbitrary differences like a white LED and different brand capacitors. It has the critically important RTL2832U but crucially it has slightly different (by one character) R820T2 chip which the manufacturer claims has a 6db lower noise floor than the the previous model. The bottom line is it can pick up signals better using smaller antennas. I found proof of this when I got an almost perfect signal while driving with the cheap telescopic adapter it was supplied with taped to my car's snorkel, whereas the older black dongle would struggle to get signal through the car's factory FM optimized antenna when it was fully extended.

I have relocated the FM tuner into the electronics bay (above the glovebox) and I will get a friend to redo the coaxial wire (which incidentally originally ended in the same area) and shorten it to suit the adapter to restore function with the factory antenna.

Aforementioned crappy antenna attached to my snorkel
Moving on to the next item - It was decided between my friend and i that we needed a better way to control the PC in case it needed software maintenance and configuration while away from home. The old solution of carrying an ancient Microsoft PS2 keyboard and USB mouse under the drivers seat was not practical. I had the idea of attaching a wireless keyboard to the back electronics bay door (located above the glovebox) so that when it was opened the keyboard swung down on with the door resting comfortably on the user's knees. This idea was further improved by changing the keyboard to a wireless one with a built in trackpad. 
Electronics bay door. I made it by cutting out the plastic plating that was behind it and adding a lock salvaged from a scooter seat and attaching it to the car once more with hinges. There is empty space (The safety pack model of the car housed an airbag here) which in the last post I filled with a switched power distribution system.


A quick online search to find a compact keyboard that would fit on the compartment door and a trip to my local electronics stores later and we had a unit that fit perfectly. It was necessary to grind off the plastic studs protruding from the inside of the door with a Dremel. After that we simply attached the keyboard with some Velcro tape for easy removal.

Keyboard/trackpad mounted in place on the electronics bay door.

However, Due to the large amount of USB devices (GPS, FM, USB3 hub, Touch screen, ECU diagnostic link, Volume knob, Bluetooth 4.0 dongle and the Wireless keyboard/trackpad dongle), only one free port remained. Therefore it was necessary to fit another hub which would be dedicated to running system infrastructure. To achieve this I bought a 7 port powered USB hub.then cut the DC power plug from the mains transformer and ran the wires directly into a multi-purpose DC-DC step down converter converter (The same model converter as the ones I originally used to power the old centre console USB charging set-up, except only one was used to avoid the interference issues). Then I wired the converter in parallel to the screen as I want the hub to only be powered when the computer is running (Ie the screen is on). 

7 Port USB2 hub with the new blue FM dongle connected. I chose the metallic case type hub as this design has proven durable for me in the past


Luckily running another 5m USB extension cable was not necessary as we simply used the one that was already there for the volume knob then connected the knob to the hub. I connected the 2.4ghz dongle for the keyboard/trackpad, and an extra 5M USB2 extension which I will explain later. After that we mounted the DC converter (now acting as the USB hub's power supply) in a small project box and secured it to the hub with double sided tape.

Power supply box. Note the 5VDC cable running to the USB hub which is attached underneath. 
Then the whole unit was attached to the side of the SPDS with velcro tape for a neat finish.

Hub and its power supply in its final position in the electronics bay.

For the final modification of this post, we decided to install the X-keys stick that I had ordered a few weeks previously. X-keys is a class of fully programmable LED backlit keypads designed by PI Engineering. The model I bought is the XK-4, which is a row of four programmable keys. I figured I could find a use for them somewhere in the vehicle. We ended up using it as a mounted remote control for the PC's media functionality. Being limited to four buttons (I have an XK-8 on order to mount up front for full media control), we chose to assign Volume up, Volume down, Play/Pause & Next track to the buttons. 

XKeys Macro Software
Before fitting the keys to the vehicle, we first programmed it by activating the hardware programming switch on the keys themselves, then using a laptop and the MacroWorks software which is downloadable for free on PI's website. This was a learning experience for us both, but we were both very impressed with the versatility of both the macro software and the keys themselves. 

The keys are able to operate in two modes: In Software Mode the MacroWorks software must be running in order to receive the button press signal from the keys, then execute the assigned macro(s) in windows. This is the most versatile mode and it allows full functionality, and I do mean full. There are thousands of different macros and functions that can be assigned to the keys, including keystroke macros and application specific macros, eg iTunes media library controls like play & pause. 

In Hardware Mode the onboard micro-controller does all the work. Keystrokes (but not software macros as the unit can only emulate a keyboard) can be carried out and the LED backlights programmed to do different things in response to a key press & release. This mode is used for legacy support on non-winows devices (eg android phones, linux, and everything that supports a USB keyboard) as no software is require for the keys to funciton.

We decided on a place in the back of the vehicle that is out of the way to mount the switch. The position is intended to prevent accidental pressing of the buttons by cargo or loose objects, and to be in a convenient place for the user to reach.

A wider shot showing the position of the keys
The place we decided on was both easy to reach when the back door is open, and also when sleeping in the back with the bed installed, while not protruding in an easy to knock place. 

To install it we ran a 5M USB2 cable from the new 7 port hub along the door sills then through the cargo area. The bolt to the right of the keys was removed and the USB cable fed down between the two trim panels. The excess cable was neatly bundled up and tucked into the removable cover that was originally intended for accessing the tail light bulbs (this seldom gets used to do the LED conversion I did on the car). Overall a neat installation that adds a bit more customization and flare to the project.

Installed keys. Note they are supplied with a sheet of pre-cut icon & letter cards as well as a blank sheet to print your own.
I have made progress on installing a system to synchronize my music and playlists, more on that in the next post. As always, thanks for reading.




No comments:

Post a Comment