I'd not be so quick to write this idea off!
I read this forum almost daily, but don't tend to write much. I thought this sounded like a good idea and was thinking through all of what I'm about to write last night, so though it only fair to share it - even if it is an essay!
My background is in electronics/engineering and software, and I have a real passion for interfacing hardware, software, internet etc. Unfortunately it's not something I get to do in my current job! If I had time, I'd offer to work with you on this one, but I really don't. Anyway...
Firstly, I think the idea is very sound. Pre-ordering (and pre-paying!) is great, and as you've identified the range you can stock is much better than a van. Especially stuff with long shelf lives - you could have 20 varieties of crisps back at the warehouse and keep everyone happy, right? Plus you can pack everything in the early hours, run round and stock everyone's machines and take the afternoon off (or perhaps spend it packing the next batch, or getting sales for further sites etc)!
Anyway - back to the main point - this is how I'd approach this problem...
I feel your original question has already started you down the wrong route to an optimum solution - in that I don't think changing the existing programming is the best plan - I'd go a slightly different route...
Firstly, get the existing vending machine into a state where entering the codes (i.e. 'A7') would simply present the compartment. I assume this is probably just a matter of putting into into 'free-vend' mode, right? Then remove the coin mech, keypad and screen (the latter two may be best re-mounted inside the door in case you need them for changing any settings etc).
Editing the ROM would be great if you were a machine code expert. It would probably allow you to change the compartment codes to 4-8 digit pins, but it wouldn't be easy to add additional hardware (like a barcode reader) that I think this project really needs. You'd have to change all the pins each day of for change of customer and that's a total pain. There may also be copyright issues with this plan. I would suggest that the vending machine manufacturer may be happy to write updated firmware for your purpose - after all, they're just after a sale of a machine, however I suspect that you're initially looking at working with second hand machines which would be a lot cheaper (I'd do exactly the same when starting up - keep costs down to prove the concept at least).
Personally, I'd take a different approach - consider develop a new custom module/circuit to operate the rest of the process (the customer interface) and then enter the codes into the keypad. I'd suggest this could be done electronically as the original keypad will probably be a matrix type (a grid of contacts that connect at the position the button is pressed - here's an example:
[Grr, had to remove image as can't post links - Google Image Search: "keypad schematic"]
I'm not 100% sure where I'd start, but the whole grid will probably work on a floating 0v or 5v, pulled up or down or something like that - it should be possible to design a very simple circuit and programming via a microcontroller that emulates entry of the codes. Simply plug your new microcontroller in instead of the current keypad and bingo, you then have control - that's the first step.
Personally I'm a .NET programmer to would initially reach for my gadgeteer kit (sorry, can't post links yet) for prototyping this, however I would expect most people would go for Arduino or even a Raspberry Pi (overkill, but cheap and gives some great upgrade options) for this purpose. All these would allow you to easily connect up a barcode reader (along with other interesting options). You can then write the programming to 'interface' with the user (barcode reader, perhaps include an LCD display, maybe another keypad or touchscreen options) - then the module simply passes the compartment code to the vending hardware to vend the correct meal. You have full control of the software, and there's so much you could do.
Here are some other ideas:
- Get some Happy Meal style boxes made up that fit the compartment perfectly. This allows you to manage meal sizes back at packing. Also, they can be labelled for the machine and compartment they go into later.
- Add a network port (if connection is available) or a GSM module to the system with a m2m SIM (cheap data only machine-to-machine SIM card), so orders/barcode/customer data can be over to the system. Could also report which meals have been taken, and even remind people to collect their meal if they've not already.
- For stocking, scan the barcode printed on the meal box and the next empty compartment is presented. The system links that compartment with the order for when the customer scans their phone. In fact - a very simple implementation could do only this:
- Completely random barcode printed onto food box, and sent to customer.
- Food scanned, machine presents empty compartment and links barcode to it.
- Customer barcode scanned, linked compartment shown, barcode then forgotten.
- Add touchscreen and allow customers to place tomorrows orders / repeat orders from the machine itself. "Thanks for collecting your lunch Tim, same tomorrow?" - debited straight from stored card/PayPal etc!
- Fingerprint module? The number of plug ins for these microcontroller boards is endless, so there's plenty of things to consider - though probably best to keep it simple!
Hope all of that's of some help. I think there could be a good and profitable business in there if you can get the right locations (large business offices?). I'd certainly recommend you explore it further.
Cheers,
T