Giter Site home page Giter Site logo

cellular_keyfob's Introduction

Cellular Consumer Electronics

Purpose

The range on my car starter is rather long, maybe 500ft line-of-sight. The purpose of the project is more of an exploration of the potential benefits of having my key fob connected to the cloud. There are limitations baked into the design of the key fob as it is initially presented:

  • I have to be in range
  • I have to physically press a clicky button
  • I have to preemptively press the button before my trip
  • ...

These limitations should be taken with a grain a salt. Having the option to start a car without actually being in the car is awesome. It works great (if I remember to have the heat on when I get out), its not buggy, there is zero barrier-to-entry. There is a lot to like about the design.

My real motivation was partly the chase to do something I hadn't seen anyone publicly do yet, and have something in the physical space to test out what API's can do with it. The IoT!

Steps Taken to Take Back Control

1. Turn Clicky Buttons into Solid State Buttons

For this step, I took apart my spare key fob and laid out all the pieces. The fob uses two coil cells (+6V), and a PCB pad closure to connect the different antenna circuits.

The first tricky part in making the switchover was in understanding how NPN transitors behave in this context. The goal is to have a persistent connection between the hot and ground connections but have a way to open and close the connection between the two sides electronically. NPN transistors are perfect for this. They offer a base pin that, when voltage is present, saturates the two sides and opens the circuit connection.

If you would like to play around with this, then checkout the Circuit Playground I setup as a proof-of-concept circuit.io/transitor-gate-test

If you look carefully, every one of the pads has the same shape. The circular shape in the middle is the hot and the outside part connects to ground. In the photo I had one of the transistors soldered in backwards (I switched it when I noticed strange behavior). It was also the first time I soldered in a while so if you attempt to hack your own electronics you don't actually need mountains of solder. The only important part in wiring these components is that the collector is attached to the hot pad and the emitter to ground. Those extra wire pieces attached to the groud pad are pieces of staples. There are three in the photo but when I realized that ground is the same everywhere for a circuit I just opted for one in the final prototype.

2. Prepare the Micro Controller

I used the particle electron for this project. It is the more expensive development board that Particle offers. It has an onboard 3G antenna and Particle takes care of all the carrier fees (by that I mean I pay Particle and I don't have to hassle with multiple carriers or weird fees). The actual setup for this board is outside the scope of this doc, but I encourage those interested to checkout the Docs that Particle provides. They do a great job cutting down the real barrier to entry in connected things.

There is a lot to talk about in dealing with the micro controller. A lot more than is relevant in this doc, so I'll just link to the test code repo. In the test, instead of saturating the base pins of the key fob, I have an LED turning on/off. It is a lot of fun and the sky is the limit, but there is no time for that, so lets just keep going here.

3. Putting it all together

Everything works in theory, but the project got held up for about a month while I worked through a single bug. I wrote an API that, through a URL endpoint, made calls to the Particle Platform, that called the board over 3G and triggered the onboard function to open the port that saturated the base pin to lock the car doors. The key fob would flash and the particle board would return "1" meaning "yes, I in fact did all that you asked, what more do you want of me", but the car doors would not lock. Why! I tried darlington pairs, I tried more voltage, and several different circuit configurations. You know, once I get on something, I can't let it go. Now that I have had it on my dash for a while I bet I could have just used a 100µF capacitor to smooth the output from the particle board. That is what I'll do before I solder the board into a more permanent proto. My solution was a hack. If one output current from the board was not going to be enough, then two output pins will be used. So in the code I have two pins output in parallel to each of the NPN base pins. It's not pretty, a capacitor would be prettier.

I also opted to use 4 AA batteries rather than the 2 coin cells. I get better Amp Hour capacity and better performance in the cold.

Moving Forward

There are a couple of sensors wired into the board right now: a Temperature and Light sensor, but there is so much more I'd like to know about my car while I'm away. One piece primarily, I am asking my car to turn on while I am out of eye shot and have no idea if it did in fact turn on. Using another piece of equipment I plan to hook into the main system of my car and record RPM to check a didTurnOn state. Once in, I could have custom dash board report gasMilesRemaining or a system of trip recording.

cellular_keyfob's People

Contributors

larryschirmer avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

cjsatuforc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.