Shop OBEX P1 Docs P2 Docs Learn Events
propmodule meter reader — Parallax Forums

propmodule meter reader

UnparallaxedUnparallaxed Posts: 7
edited 2010-01-31 15:30 in Propeller 1
·I am trying to build a meter reader using the propmodule. I would like to interface a 4X4 matrix keyboard
and log the data··that is created by the keyboard on the sd card with time stamps.
keyboard looks like
1,2,3,A
4,5,6,B
6,7,8,C
*,0,#,D
all it has to do is log the data when i press the·# key on the keyboard.
if dispenser·A has a reading of 12345678 I will press A12345678# and # should write the data onto the sd card
To set time and date·29/12/10 17:52 ·i would like· to press AAA1012291752#
I have No experiance in programming. the keypad has a display on it already so I could see what is being typed.·Any help would be much appericiated.

·

Comments

  • RaymanRayman Posts: 14,876
    edited 2010-01-30 11:30
    doesn't sound too hard... You can use FSRW to write and read from SD card. For the time, you can use an external RTC chip and talk to it over I2C. Or, you can use the Prop as an RTC, but it doesn't have battery back up provisions, so it'll lose the time if it loses power. But, you need to find a way to the the keys from the keypad. If it already has some kind of RS232 equivalent serial output, it won't be hard at all...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • StefanL38StefanL38 Posts: 2,292
    edited 2010-01-30 11:33
    Welcome to the forum unparallaxed.

    You can get a lot help here. It is good that you describe your skill-level in programming.
    It doesn't matter that you don't have any experience. Everybody here started at this point.

    The amount of help you will get, highly depends on how concrete your questions are and how much information you provide.

    Did you already have the 4x4matrix-keyboard?
    If yes it would be nice if you could attach a datasheet or minimum the type and manufacturer of it

    In the microcontroller-area things are not so much standardised as in the PC-world
    (In the PC-world you by a USB-flashdrive from ANY manufacturer plug in and it works.
    In the microcontroller-world it's still easy but not standardised so much)

    Do you want to learn programming or do you want somebody else to do ALL the programming and put a ready to use product on the table?

    best regards

    Stefan

    Post Edited (StefanL38) : 1/30/2010 11:39:24 AM GMT
  • UnparallaxedUnparallaxed Posts: 7
    edited 2010-01-30 13:35
    thanks guys for your quick response
    the keypad does output serial data.
    i am using simple keypad interface module. It supports keypads with 1 to 4 rows and 1 to 4 columns. Also it will work with any microcontroller capable of accepting asynchronous serial data. characters are sent using standard ascii values.
    Power: 5V VDC <10mA
    Size: 50mm x 20mm (2.0” x 0.75&#8221[noparse];)[/noparse]
    Speed: 2400, 4800, 9600 or 19200 Baud.
    Keypad: 16 keys (4 x 4)

    I would like to use the propmodule from http://www.propmodule.com. to store the data.
    if I could use the propeller chip as the matrix keypad controller. it would cut down on the number of components.
    time stamping is the most important aspect of it. i would like to use as much of the programming myself.
    thanks again
  • UnparallaxedUnparallaxed Posts: 7
    edited 2010-01-30 15:25
    i also have a memkey module which could be found on the parrelex site.
  • StefanL38StefanL38 Posts: 2,292
    edited 2010-01-30 15:29
    OK so we can go into some details.

    The propeller is a 3.3V device. To connect to a 5V-device like your keypad-interface-module you have to insert a 5kOhm current-limiting resistors between the prop.module and the keypad-interface.
    Just to make it really sure could the keypad-interface be connected to a serial port on a PC?


    If so the serial interface provides +12V-12V as voltages and in this case you need a MAX2323-voltage-levelshifter to shift the voltagelevels from -12V/-12V to 3.3V/0.0V

    Anyway if you write the exact type of the keypad-interface or the datasheet of the keypad-interface it will be much easier to support you than without that.

    To get knowledge about programming the propeller I recommend going through the PE-Kit Labs.
    There are two basic ways to go:

    1: put together objects like FullDuplexSerial, FSRW (for SD-card access) with a lot of help from the forum having a half working system in 3 weeks. Struggling around 3 months with some details that are hard to understand with understanding
    programming only on a very basic level.

    2: start learning programming from the base during 3 months where you do only a few things near to your project but simpler things and then drive up the learning curve in 3 weeks to get your original project finished

    So both take around the same time with different focuses.

    Depending on the time you can spend on the project the time maybe differs down to 2 month (very intensiv and beeing a natural programming-talent) or up to 12 months when spending only 2 hours a week (forgetting half of the things through the week)

    As you have to deal with serial connections anyway I highly recommend to get familiar with serial connections as the very first thing.
    Then you can do debugging through a serial connection to the PC. For this you need a prop-plug or any other kind of like the serplug from

    So If you have your propmodule and a programmer give a short buzz here and I'll show you how serial debugging works.
    With this technique you can analyse a lot of things yourself without the support of the forum because you can analyse every detail of what your code does.
    If you don't mind spending money you can take a look at ViewPort which provides a more classical debugger through a serial connection.

    best regards

    Stefan
  • UnparallaxedUnparallaxed Posts: 7
    edited 2010-01-30 17:01
    could I just use the parallex chip and some pullup resisters to act as a keypad controller. like with arduino
    you can hook up a keypad to the controller thus avoiding additional components? on rs232 yes I can hookup keypad module to serial port using max232
  • StefanL38StefanL38 Posts: 2,292
    edited 2010-01-30 17:14
    So this means this is the datasheet of the keypad-interface ?

    From the datasheet I can see that the MemKey-module operates from 3.0V to 5.5V. So if you supply the MEMKey with 3.3V like the propeller the voltage-levels fit perfectly to each other

    You wrote that "i also have a memkey module which could be found on the parrelex site."

    Could you please make a CLEAR statement: Do have any kind of a keypad-interface AND the memkey and you can't decide wich one to use
    or do you have ONLY the memkey and want to use the memkey as the keypad-interface?

    Do you use this keypad in combination with the memkey?

    Will your device be battery operated or beeing supplied through a AC-socket-powersupply?

    For the timestamps you need a RTC R)eal-T)ime-C)lock
    parallax sells the DS1302
    But additional you need a 32,768 kHz-chrystal

    In the obex there are objects for the DS1302-RTC-chip

    best regards

    Stefan
  • StefanL38StefanL38 Posts: 2,292
    edited 2010-01-30 17:32
    Yes You can use the parallAx propellEr-chip itself as the keyboard-controller by using pull-upresistOrs
    best regards

    Stefan
  • UnparallaxedUnparallaxed Posts: 7
    edited 2010-01-30 18:06
    thanks Stefan. that is the right keypad
    i have a couple of different interfaces one is not a tested prototype version. i prefer memkey. even better to use the propeller chip as the controller. it will keep cost down. the propmodule is a breakout board with a microsd slot.but there are no suporting documents on the site apart from pinout and schematics. It is a breakout board for proppeller. i
  • mctriviamctrivia Posts: 3,772
    edited 2010-01-30 19:07
    ya sorry. almost all my customers have come from the forum so I have been lacks in writing up documentation. I will have to spend some time and make some links to useful information like the propeller data sheet.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board now in. $24.99 has backlight driver and touch sensitive decoder.

    If you have not already. Add yourself to the prophead map
  • hinvhinv Posts: 1,255
    edited 2010-01-30 19:09
    I don't have a lot of technical advice, but just some points of view. I personally would start out with what they call a 10-key. It is the numeric keypad that is found on the right side of a PC101 keyboard. It should be a faster interface than the keyboard you are talking about. You could relabel the top row of keyes a b c d, or however you want. There are many of them on shop.ebay.com/i.html?_nkw=numeric+keypad&_armrs=1&_from=&_ipg=. You would also have the case for your project all for less than $4. I would guess that there would be enough room to put a the prop and LIin there, and enough space on the top to stick a LCD module if you wanted.
    You could decode the keyboard directly with 8 i/o's and debounce the keyboard. Alternatively, you could use BradC's USB HID code, but you would have to run at 96MHz, and the USB stuff takes up 2 cogs. If you wanted to run low power, it would be better to debounce the keypad directly.
  • UnparallaxedUnparallaxed Posts: 7
    edited 2010-01-31 11:45
    thanks hinv
    ·I would like to use the modules I have for this project.
    from my understanding of··Stefans replies a I need· a propellerchip ,·memkey,
    rtc module (DS1307 Real Time Clock.)
    how do i make it log data onto sd? are there some coding examples for sd logging?




    ·
Sign In or Register to comment.