1. Some members were not receiving emails sent from XJbikes.com. For example: "Forgot your password?" function to reset your password would not send email to some members. I believe this has been resolved now. Please use "Contact Us" form (see page footer link) if you still have email issues. SnoSheriff

    Hello Guest. You have limited privileges and you can't "SEARCH" the forums. Please "Log In" or "Sign Up" for additional functionality. Click HERE to proceed.

RFID Ignition project - Need input (long post)

Discussion in 'XJ Technical Chat' started by kd5uzz, Nov 20, 2008.

  1. kd5uzz

    kd5uzz Member

    Messages:
    419
    Likes Received:
    0
    Trophy Points:
    16
    I have received the parts needed to prototype my RFID ignition system.

    So now I've got to figure out how to integrate it into the bike.

    I want to completely replace (remove) the OE ignition switch. From what I can tell I've got three wires running to the ignition (which is odd, some replacement ignitions only have two?) (Item #12 in the haynes manual schematic I think). When the ignition is ON I need to connect all three together, when not running I need to have NC between them.

    Sound good?

    Next I need to know when the kill switch is not set to Stop (not exactly the same thing as knowing when it is set to Run, but I don't have that ability.)
    By using the schematic attached below I can tell when the XJ's kill switch is not set to Stop. Using a 5Mohm resistor SHOULD prevent the 5v from interfering with the starter cutoff relay. (right?! As long as it is actually a relay, and not a solid state device)).

    Here is the theory of operation:
    Rider gets on bike, with wallet/RFID tag in back pocket. Reader will be mounted under the seat, near were rider's back pocket should be (6" -8" read range.).

    Rider moves kill switch from the 'stop' to 'run'.

    Micro-controller (a.k.a. PIC) detects a pin (KILL_PIN) is now high. Activates RFID reader. RFID reader searches for a card.

    PIC will wait up to 15 seconds (longer, shorter?) to detect a valid card. If nothing is detected (or an invalid card is detected) a red LED and/or buzzer is activated, after a delay the system is put back to sleep.

    If a card is found it sends card's ID back to the PIC. If the card ID is 'valid' the PIC lights an LED and activates the new relay.

    From here, once the relay is closed, the user can start the bike either via the start button, or by a bump start. If the bike dies the user can still push start or bump start. The user can get off the bike and the bike will stay running. The 'key' is in the ignition until the run/stop switch is switched to 'stop' (which is the only way to kill the bike on demand, now that the ignition switch has been removed).

    Once the Kill switch has been moved back to the 'Stop' position the PIC turns off the relay and goes to sleep.

    Installation SHOULD be as simple as running a wire from under the seat to the headlight bucket, connecting that wire in the same place as the normal ignition plug, and adding a splice or other method of connection to the non grounded side of the kill switch. Then mount the board under the seat. (I have another seat for my bike to test with. Hopefully you won't need to mount it to the seat.) You can pull power from the fuse box.
     

    Attached Files:

  2. wizard

    wizard Active Member

    Messages:
    5,282
    Likes Received:
    26
    Trophy Points:
    38
    Location:
    DEVON ENGLAND
  3. kd5uzz

    kd5uzz Member

    Messages:
    419
    Likes Received:
    0
    Trophy Points:
    16
    Simple answer (to quote my sig): RFID card in wallet...hop on...press a button and go, no keys!

    Hard to explain, the biggest bit is simply because I've never seen it done.

    Everyone makes bobbers or choppers, or they do a military theme, efi, wild paint jobs, etc.

    I want to do a high tech old school bike.

    I want someone to look at the bike and one of two things happen: I want them to not know WTF they are looking at ("I've never seen that before...") OR I don't want them to SEE anything; no visible cables, remote brake res. I want a gauge, clutch, brake, throttle and a few buttons.

    RFID ignition, full LED, digital tach/speedo (maybe a DIY cluster with a PIC and LCD display, add some logging to SD card for accelerometers vs tach/speed. Could be interesting...), cruise control (NOT a throttle lock, an actual servo controlled 'fly' by wire cruise control), remote start, GPS tracking. I really like to do a HID headlight, but I can't find REAL current draw data. Most of these projects will require me to acquire another XJ to ride while I work on this one (I've got a near mint '81 in the works, carb work, brake work and go! -I hope- ).

    I don't have the eye for smooth flowing lines, but I can lay traces on a PCB and write code.
     
  4. mlew

    mlew Well-Known Member

    Messages:
    3,090
    Likes Received:
    242
    Trophy Points:
    63
    Location:
    Apex, NC
    Sounds like a good idea, could you use the RFID card to also lock and unlock the helmet. I'd be interested when you get it working to see all the details of how you did it.
     
  5. bigfitz52

    bigfitz52 Well-Known Member Premium Member

    Messages:
    21,283
    Likes Received:
    420
    Trophy Points:
    83
    Location:
    Rural SE Michigan 60 miles N of Motown
    I'd double-check your schematics, I think the 3rd wire from the stock ign switch is so that the "lock/park" position lights the tail light. Honest opinion? Seems like just more to go wrong. You'll need to ensure all your electronics are well protected from vibration as well as the elements. A motorcycle is a harsh environment for components that weren't designed to live in it.
     
  6. PainterD

    PainterD Active Member

    Messages:
    2,649
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    St. Cloud, Minnesota
    Hey now...you just gave me an idea for a "remote" ignition switch. I've seen remote switches sold for other purposes and could make my bike work with a remote switch instead of a key. With the use of a relay and remote receiver, all I need is to hit the remote button and fire it up. It would be nice to not need the key.
    I assume I could also use one to start the bike (like a remote starter on a car) but wouldn't be able to use the choke mechanism, so that would be a long shot. I'll just keep that idea in my archives for when/if I ever get a fuel injected bike.
     
  7. SQLGuy

    SQLGuy Well-Known Member

    Messages:
    2,140
    Likes Received:
    177
    Trophy Points:
    63
    Location:
    Colorado Springs, Colorado USA
    Sounds like a neat project.

    On the subject of the kill switch... I'd be careful about using such large value resistors. High value resistors seem pretty prone to going open on their own and will be pretty succeptible to noise. Also, the way it's laid our now, you're switching between +5V and +1.666V.

    Personally, I would just put like a 10K pull up from +5 to the KILL_PIN, and have the kill switch pull that straight to ground.

    Cheers,
    Paul
     
  8. switch263

    switch263 Member

    Messages:
    525
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Austin, TX
    Theres a company that makes this already.

    http://www.bulletproofelectronics.com/arseHOME.htm

    expensive :-/

    I like the overall idea, but I'm going a different route with mine. momentary switch under the seat that trips a latching relay, so you throw a master toggle, sit down on the bike, and she's ready to go, Hit the starter, ride off. Latching relay so that you can stand up while stopped in traffic or whatever and not have your bike die. hah.
     
  9. PainterD

    PainterD Active Member

    Messages:
    2,649
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    St. Cloud, Minnesota
    Holy crap Batman, that's a little too steep for my wallet.
    Actually, all I really need is a switch hidden under the side of the seat. I'm not worried about have my bike stolen where I ride anyways. I just thought the remote idea instead of a switch would be a sweet idea.
     
  10. switch263

    switch263 Member

    Messages:
    525
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Austin, TX
    That's exactly what I'm doing. Hidden switch under the seat, combined with either my butt-switch or a good old fasioned bicycle lock through the front wheel... that bike isn't going anywhere =)
     
  11. kd5uzz

    kd5uzz Member

    Messages:
    419
    Likes Received:
    0
    Trophy Points:
    16
    SQLGuy,
    I included the 5Mohm resistor to try to prevent that 5volts feeding back into the starter safety relay (maybe holding it in the 'run' position). 1.6v is still a logic 0 for the PIC (although it is close), but it will be at avery low current (.3e-7), not nearly enough to trip a relay (again, I am assuming that the starter 'relay' is really a relay, and not an AND gate, etcb .) Then again, maybe I don't need the 5Mohm resisitor at all. Although I don't see a way around using at least a few Mohm from the 5v source to prevent problems.

    Up until now I've limited my thoughts on noise to how it would affect the RFID reader. I'm not worried about that, because the engine will not be running when you do an RFID read. But you have a good point about the Kill switch read being affected by noise. It wouldn't do to have the ignition cut off while running down the road. From that standpoint it would be better to not have a resistor between GND and the PIC.
     
  12. kd5uzz

    kd5uzz Member

    Messages:
    419
    Likes Received:
    0
    Trophy Points:
    16
    WOW, I've got all the parts I need to build two of these for 1/6th the price...
     
  13. Ace_Frehley

    Ace_Frehley Member

    Messages:
    559
    Likes Received:
    2
    Trophy Points:
    16
    Location:
    NS Canada
    Just a thought, and it may be way off base, but when I shut off my bike by the kill switch my headlight stays on until i turn off the key. So when you kill your bike with the switch, what is going to take the place of turning off the key? Moving the rf card away?

    I'm not a wiring expert, I was just thinking.
     
  14. kd5uzz

    kd5uzz Member

    Messages:
    419
    Likes Received:
    0
    Trophy Points:
    16
    Ace,
    The micro-controller will monitor the kill switch. When you turn the kill switch to 'Stop' it will disable the relay, effectively turning the 'key' off.

    mlew,
    I'm not sure the helmet lock could be made electronic without replacing the entire locking mechinism.
     
  15. Fongdingo

    Fongdingo Member

    Messages:
    344
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Charlottesville VA
    its a cool idea intergrading the new tech into an older bike. make sure to post pics of this while your doing it and keep good notes too so you cxan post them. its a great idea id like to see it work.
     
  16. kd5uzz

    kd5uzz Member

    Messages:
    419
    Likes Received:
    0
    Trophy Points:
    16
    I figured I would try to document every stage of this project. Here is the PCB layout.

    Final Size: 3"x2.3"
    The large 'open' area that looks like wasted space is there because the footprint for the RFID reader is actually for an ID-12, whereas I'm using an ID-20 for increased read range.


    It is designed to fit under the seat, with wires going to the headlight bucket for the relay and kill switch. Power can be pulled from the fuse box.

    You can also connect a buzzer for notification of a good RFID read, as well as a status LED. There is also an 'option' switch. I plan on having a hidden button that will bypass the RFID reader, just in case I loose my wallet, etc.

    It can also be used for things other than a motorcycle, anything that can be controlled with a relay.
     

    Attached Files:

  17. kd5uzz

    kd5uzz Member

    Messages:
    419
    Likes Received:
    0
    Trophy Points:
    16
    Here is the board mostly populated. It works! Read range is much less than expected. I think it may be because of the copper backing of the PCB coupling with the internal antenna.

    Since this photo was taken I have installed the microcontroller and the programming cable. Then I realized that I took my programmer to the new house.

    Next step is to start writing some code. First some test code to make sure the PIC can 'hear' the RFID module, then some tests to verify the relay output and kill switch inputs work correctly.

    Getting rather close...

    Wow thats a horrid picture...
     

    Attached Files:

  18. wdenny

    wdenny Member

    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Kansas City
    So, this project is right up my alley. In fact, I priced it once. Cause I thought this would be totally cool. I actually was incorporating it as an attempt to take the WHOLE bike digital.

    But what killed it for me, was the gas cap. You still need a key to open the gas cap. And if you have to carry a key for that, whats the point.

    Also, it has been a while since the last post 2008? Any progress?
     

Share This Page