Shop OBEX P1 Docs P2 Docs Learn Events
Is the BS2 enough for this project? — Parallax Forums

Is the BS2 enough for this project?

electromanjelectromanj Posts: 270
edited 2009-07-06 02:18 in BASIC Stamp
Hello fellow stampers!

I am about to start a new project and have a few questions before I dive in.

I am an electrical contractor. When I go out to a job·we start grabbing parts from the truck and install them. When the job is done I walk around with some preprinted forms and check off the parts that were used.

I have this RFID reader a couple of BS2s and a memory stick datalogger sitting in front of me.....

I would like to have a RFID card assigned to each part. When someone grabs a part from the truck the run the card past the reader. Maybe a selector switch so you can add a part or remove a part from the list. At the end of the day I print out the list and done.

To get started an audible tone to signal a read. Eventually a lcd readout with a text to voice module.

I would like to start off really basic to get going and then add as I go, (I'm going to lose some more hair on this one I think)! tongue.gif

Is the bs2 enough for this project?

Any sugestions will be greatly appriciated!

Thanks!

·

Comments

  • xanatosxanatos Posts: 1,120
    edited 2009-06-20 22:15
    Depending on your experience level, this could either be a challenge, or a lot of fun! The stamps can all handle what you've got in mind. I've been using the Emic module for a few months now and it is incredibly easy to use. The datalogger is also easy, as long as you create a routine to predetermine the exact data-write length you will be writing to the logger- it's VERY strict about its data requirements.

    Have fun and feel free to ask if you have any questions that the documentation and code for the items doesn't cover.

    Dave X
  • SRLMSRLM Posts: 5,045
    edited 2009-06-20 23:30
    Yes, the BS2 is plenty for this kind of project. I assume that you'll have a wall of bins (or equivalent) and a tag attached to each bin, and when you want to check an item out you borrow the card, swipe it, and put it back? Obviously you won't be able to print from the BS2; you'll have to create a txt or csv file and print from that. The most challenging part will probably be storing all the names that you need. Unless you have really short names you'll need some sort of storage solution.
  • electromanjelectromanj Posts: 270
    edited 2009-06-20 23:37
    Thanks Dave!
    I would classify myself as a novice, but I think challenges are fun.

    If my trusty BS2 is up to the task, I guess that I am too.

    It's time to get started.

    I am going to start piecing together some code and draw a schematic. Try it out, change some things, try it again, change some things, repeat, repeat, repeat, ask questions, etc...

    If anybody has some ideas I would love to hear them.

    Thanks in advance for all the help!

    Travis.
  • electromanjelectromanj Posts: 270
    edited 2009-06-20 23:42
    SRLM - how many characters would be considered a long name?
  • xanatosxanatos Posts: 1,120
    edited 2009-06-20 23:45
    I have an idea! Look into the PINK server that Parallax offers. It is incredibly simple to use and will give you access to a huge variety of functions. You can store data on the device using the USB datalogger or an EEPROM (several available) and access it via the server for direct importation into Excel or whatever you like. I *LOVE* this little server, it's awesome!

    Dave
  • xanatosxanatos Posts: 1,120
    edited 2009-06-20 23:51
    PS., regarding names - you can assign a code for each part and use a routine on the computer that takes in the data from your storage device and converts the code to the full part name. This will work especially well if you use the PINK server. If you go this route but don't know JavaScript, I'll be happy to write the conversion code for you.

    Dave
  • electromanjelectromanj Posts: 270
    edited 2009-06-20 23:52
    Thanks xanatos.

    I know I'll get a lot of good suggestions before I start.
  • electromanjelectromanj Posts: 270
    edited 2009-06-20 23:55
    I have just started working with netbeans, but have only made a couple of very simple projects.
    So many projects so little time...
  • SRLMSRLM Posts: 5,045
    edited 2009-06-21 01:05
    The BS2 has only 2k bytes of memory (or a max of 2048 letters). If you assume that you program takes up half of the memory, then you're left with 1024 letters for all your names. If you have 100 items that's about 10 letters a piece. Since you'll have to store the count of each item, that cuts out a letter. There are, however, certain tricks that you can use to double the number of letters that you can use.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-06-21 01:08
    ·electromanj

    One way to this part would be to take the first three or four letter of the name of the part that you are using

    ·and nane the routine· for·example·· Routine1 = TAPE··......>>>>>· ON tagNum GOSUB TAPE

    One more thing I would do is make

    List of Tag # and next to the Tag·# the Name of the Part

    I am going to help you out a Little with how you get each card to do something different



    I hope this helps



    Tag_Found:



    ON tagNum GOSUB Routine0,· Routine1, Routine2, Routine3····

    Routine0:·

    ······················· ' Your code here

    RETURN



    Routine1:

    ························ ' Your code here

    RETURN



    Routine2:

    ························· ·' Your code here

    RETURN



    Routine3:

    ················· ···· · ' Your code here

    RETURN


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 6/21/2009 1:22:15 AM GMT
  • SRLMSRLM Posts: 5,045
    edited 2009-06-21 04:01
    I also forgot that you'll have to store the tag ID. You could probably get by with just the lower three or four bytes (so now you only have five characters to store in memory).

    I would use the idea of the lookdown operator, but your own make. You probably couldn't use the lookdown because that would only allow you to use two bytes for an ID, which is pretty limited. Anyway, something like this:

    'counter is a word sized variable
    'match is a bool
    'tag_id is a four byte array with the scanned tags ID
    'MAXIMUM is a constant address of the position immediately following the last element.
    'MEM is an alias for accessing memory at a specific location (given in brackets)
    
    repeat counter from 0 to MAXIMUM step 10 
       repeat temp from 0 to 3
          if MEM[noparse][[/noparse]counter + temp] != tag_id[noparse][[/noparse]temp] then match = false
       if match
          MEM[noparse][[/noparse]counter + 4] += 1
          break
    
    
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-06-21 04:03
    Hi, interesting project.

    Here are a couple of ideas to think about.

    The longest filename you can write to the logger is 11 characters I believe·. This is convenient when working with the RFID as each tag is 10 characters. Rather than store each tag's detail in EEPROM it might be better to create a file on disk giving the filename the tag ID#

    Each time the tag is swiped a file with the tag# is created and a value of 1 written to the file.

    If the tag has been used more than once during the day then the file value would be read , incremented by 1 and re-written.

    I have a few ideas on transfering to a printable report where the tag ID is referenced to a parts description in the PC software, still thinking on that one.

    Jeff T.
  • GiuseppeGiuseppe Posts: 51
    edited 2009-06-21 04:41
    Never used this thing but it might help you with the whole printing issue. http://www.cdadapter.com/smp.htm
  • electromanjelectromanj Posts: 270
    edited 2009-06-21 04:59
    Would the propeller be better for this kind of project?
  • electromanjelectromanj Posts: 270
    edited 2009-06-21 05:09
    unsound- thats what I was hoping for. A +1 or a -1 increment for an end of the job total.
    This is going to be fun!

    Guiseppe- I saw that printer before and lost the link. Thanks that would be an awesome addition to this project. A guy could print out the list then and there and double check it. I have about 80 rolls of that size paper sitting idle in a box. The printer would also good for a mobile time clock! Somebody stop me before I get·too carried away!jumpin.gif

    Post Edited (electromanj) : 6/21/2009 5:20:18 AM GMT
  • SRLMSRLM Posts: 5,045
    edited 2009-06-21 06:16
    electromanj said...
    Would the propeller be better for this kind of project?

    I'd choose the Propeller simply because I have some and enjoy programming it more than the BS2. It's a more down to the hardware type device. However, there's no reason why a BS2 wouldn't work if you put in a little thought.
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-06-22 06:17
    You could work up the project with a BS2 and then convert it to a BS1. I'm building more and more projects with the BS1. It's much better for portable apps as the project board draws only 8ma. If the project fits the EEPROM memory and pins, it's a powerful processor that should not be overlooked.

    humanoido
  • greg_a_shieldsgreg_a_shields Posts: 2
    edited 2009-06-22 20:14
    This could be an interesting project, but it sounds more like inventory control. I use an Access database at work, and we track >25,000 items. We assign a unique part number, use 3 of 9 barcode (code 39) which is free and record it in Access with a bar code scanner. It could be adapted to a PDA with a bar code reader and would be very easy to do. Just a thought. Greg
  • Chip CoxChip Cox Posts: 73
    edited 2009-07-06 02:18
    Sorry that I am butting in here, but doesn't rfid work off of numbers instead of characters.· The numbers follow a specific pattern ( x number of bits mean one thing the next x number of bits mean something else, etc ).· I haven't delt with rfid in a while and I haven't played with the reader here yet, but it should just read a string of bits that correspond to a part or actual specific piece ( each 20A circuit breaker could have it's own tag for example ).· Then that number is decoded to to report against your inventory, etc.· An additional example would be if you had 20 15A circuit breakers with 5 each from·4 different vendors.· You could track exactly which vendor's circuit breaker went to each job.· I don't know how applicable that is for an electrical contractor but it's an example.· Your reader should read that value for that breaker·from the card, and write it to a data logger.· Then at the end of the day, you plug your data logger into your pc/laptop and print out your report for that job.· Your print program on your pc/laptop would decode the rfid number and print out the information in a human readable form translating 38 Hex into "15 Amp Circuit Breaker" and 39 Hex into "20 Amp Circuit breaker" etc.· You could do the same thing at the bin level even though it doesn't take full advantage of what RFID could offer.
Sign In or Register to comment.