Keypad with 1-Wire interface

Discussion in 'The Projects Forum' started by Martino Chiro, Oct 18, 2015.

  1. Martino Chiro

    Thread Starter Member

    May 1, 2015
    56
    0
    I have a blackbox with 1-Wire interface (the same as that of the Dallas iButton)to be used with various type of sensors.
    I'd like to connect a little keypad (with a minimum of 5 keys) to my blackbox but i have not found any product (or DIY) that shows a keypad with 1-Wire bus interface.
    Does anyone know a keypad with 1-Wire interface ?
     
  2. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,026
    3,789
    Use a resistor ladder..
    You will need an ADC or other voltage reading capability to decode...

    image.jpg

    http://www.technoblogy.com/show?NGM
     
    ScottWang and OBW0549 like this.
  3. Martino Chiro

    Thread Starter Member

    May 1, 2015
    56
    0
    Thank you GopherT
    but the ADC output is compatible with the 1-Wire bus interface ?
     
  4. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,026
    3,789
    You need A2 wire from this keypad schematic to go to the ADC INPUT on your Microcontroller. Then, in code on the micro, occasionally read the value of the pin that is connected to this A2 wire.
     
  5. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,026
    3,789
    Oh wait - you mean a datastream (digital communication bus?).

    Then, no. This is one wire for a stand-alone. Good luck. I do not know of any keyboards/keypads that use one wire. That is only used in things like rtc and temp sensors as far as I know.
     
  6. GS3

    Senior Member

    Sep 21, 2007
    408
    35
    Very interesting concept which I had never seen before. Still, it requires some careful decoding because some values are pretty close to each other. Plus any resistance in the contacts will give false readings. But it is ingenious and simple.

    For reliability I would go with DTMF or something of the sort.
     
  7. RichardO

    Well-Known Member

    May 4, 2013
    1,235
    384
    Connect up to 8 switches to the input of a UART?
     
  8. GS3

    Senior Member

    Sep 21, 2007
    408
    35
    This makes me think that a 1/n keyboard could supply values more evenly spaced and easier to decode like
    150, 200, 270, 400, 560, 800, 1200, 1600, 2200, 3200, 4700, 6400, 8600, 12000, 15000

    OTOH I cannot think of a really simple way to decode. Maybe a series of voltage comparators.

    The problem I always find in these projects it that it is impossible to find weatherproof keypads at any reasonable price and it is even impossible to build your own. These days it is just cheaper and simpler to buy contactless card or similar things.
     
  9. marcf

    Member

    Dec 29, 2014
    136
    19
  10. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    So everything is possible, the important thing is how to find the key point, now the keypad input can be used one wire to input, and the input/output data can be used one wire too, what else need to use one wire to do the communication?
     
  11. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,438
    368
  12. Martino Chiro

    Thread Starter Member

    May 1, 2015
    56
    0
  13. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,026
    3,789
    "1-wire" is a licensed technology interface. Not widely accepted, yet. But all the building blocks needed should be available.
     
  14. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,001
    If you want to connect the 1 wire keyboard to something then you will need a mcu. The one wire protocol is not a simple one. The search algorithm is horrendous.

    I wrote some code that works on the Pic. It should work on other mcus with a little modification. If you are interested let me how. I also have the one wire data sheet around here some where.
     
  15. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,001
    Thinking about it I am not sure how a keyboard would work under one wire. The mcu would probably use an external interrupt pin. But beyond that not sure how it would work. Might make for a fun project if I can lay my hands on one of those keyboard.
     
    Martino Chiro likes this.
  16. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,001
    Oh I see you need a one wire interface on a keyboard. Not sure how that would work again But for starters you could build one. A mcu would be needed.

    What does this "blackbox" do? What is it?

    As you mentioned one wire is for sensors so you could probably hook it up to something like a DS1822 temperature sensor.

    What I know about one wire is that the host queries the one wire device. You will probably nee to make your "black box" constantly poll the keyboard.
     
    Last edited: Oct 21, 2015
    GopherT likes this.
  17. Martino Chiro

    Thread Starter Member

    May 1, 2015
    56
    0
    Thank You for the answer,
    my blacknox is based on a Freescale KINETIS K10 @ 100MHz processor, and it offer some gtraditional interfaces (RS-232, RS-485 and a 1-Wire bus).
    You are right, the mcu (Freescale) should poll my keyboard at least at 0,5Hz to have an acceptable response time.
    Where is the data sheet you quote in post 14 ?
     
  18. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,001
    Attached
     
Loading...