Analog inputs to different outputs - Page 1
Forum section: electronics / projects

author: tblake05
author_rank: Contributor
timestamp: July 14, 2019, 08:51:34 pm
content: Hello all, Looking for some direction.First time posting here. Figure maybe you can help.What I'm up against. Long story short is I own a vending business. One location would do great if I could run a credit card reader. The machine apparently "cannot" have one due to its control board not being compatible. Well yeah. Ok.So the exact same machine I have on a different location only its one newer model and is fully compatible with a credit reader.So, can I use the control board from the newer machine in the older machine? "No, won't work" is what everyone tells me.Me not taking no for an answer, think I've come to a solution. All the inputs and outputs on the control boards are the same between both machines except for the keypads.The keypads, which are just analog switches much like your computer keypad, are different arrays. Say like button "1" on the first keypad closes a circuit between pins 1 and 5. Whereas button "1" on the other keypad completes a circuit between pins 4 and 9.My question, can an IC be programmed to take the inputs of one keypad and change them to the outputs of another? Maybe an arduino could? (Which I know nothing about arduino programming).Can anyone point me in the right direction?Thanks!!~Tim

author: Richard Crowley
author_rank: Super Contributor
timestamp: July 15, 2019, 01:19:24 am
content: Quote from: tblake05 on July 14, 2019, 08:51:34 pmWhat does "are the same" mean? Do you have any access to wiring diagrams or schematic diagrams?Can you probe the inputs and outputs with meters? With oscilloscope? Are the power supplies the same voltage? Do the solenoids, motors, lights, whatever use the same voltage?If the electrical properties of the control boards are the same, can you buy a "replacement" control board for the newer machine? So that you can try plugging it into the older machine? What are the risks of blowing up the older machine from your experiments?

author: tblake05
author_rank: Contributor
timestamp: July 15, 2019, 03:00:36 pm
content: Hello, Yes, I've gone over the schematics and only have to switch over one sensor. Everything else is the same (verified by service manual part number). I'll try and draw out a lattice diagram of both keypads layout and post them in a little while.

author: tblake05
author_rank: Contributor
timestamp: July 15, 2019, 06:09:09 pm
content: Hello,Here is the keypad layout I am looking at on both machines. I was hoping it would be as simple as splicing some wires together but unfortunately not. Trying to get the 3189 keypad to operate the 3500 machine so I can use the control board from the 3500 in the 3189 if that makes sense. Does anyone think a programmable logic IC or an arduino could do the trick? Thanks!3189 machineButton - pins closed (when button pressed)------------------------------------------------1 - 11&12 - 10&23 - 11&24 - 10&35 - 11&36 - 10&47 - 11&48 - 10&59 - 11&50 - 10&1* - 9&1# - 9&13500 MachineButton - pins closed (when button pressed)------------------------------------------------1 - 1&22 - 1&43 - 1&64 - 3&25 - 3&46 - 3&67 - 5&28 - 5&49 - 5&60 - 7&4* - 7&2# - 7&6

author: Richard Crowley
author_rank: Super Contributor
timestamp: July 15, 2019, 07:49:59 pm
content: If you need to "translate" a matrix array of buttons (typically a numeric pad) to a DIFFERENT array of buttons, then yes, an Arduino (or Arduino-like) microcontroller is a good solution. It would be easy enough to:1) Create a matrix of relays in the same pattern as the 3189 machine2) Program a microcontroller to recognize all 12 combinations from the 3500 machine keypad3) Have the microcontroller activate the 3189 relay matrix pattern with the equivalent button push.Arduino-like boards are available for <$5. My favorite is the "Pro Micro" versionYou may have to use "expander chips" to get enough inputs and outputs.The favorite input expander for Arduino is CD4021 parallel in, serial out (8 channels)And the favorite output expander is the 74HC595 serial in, parallel out shift (8 channels)You can get off-the-shelf solutions for both input and relay output expansion:16 channel relay output board:https://smile.amazon.com/dp/B0057OC66U16 channel input/output expansion board:https://www.amazon.com/dp/B07GRQWQF9

author: tblake05
author_rank: Contributor
timestamp: July 15, 2019, 08:05:23 pm
content: Great, thanks. That is exactly what I was looking for. I'll look into the Pro-micro. I've never programmed anything like this. So if I can't figure it out, would you guys be willing to help my with the code? Also, do you think these solutions would be ok for long term use? Should I add a heatsinc to it or anything?

author: Richard Crowley
author_rank: Super Contributor
timestamp: July 15, 2019, 08:44:39 pm
content: A heat sink is probably not required for this kind of circuit.The only thing that draws any kind of significant current is the relay coils.And the relays and the relay drivers are typically designed for continuous use.For a very intermittent application like this (customer button presses), no worries.There are probably detailed tutorials and examples of using both that input/output board, and the relay board.There is also a dedicated forum for Arduino athttps://forum.arduino.cc/And there is a dedicated micro-controllers forum here on EEVblog:https://www.eevblog.com/forum/microcontrollers/So you should find whatever help you need for this project.You might even spend a few quality minutes with Google.It seems certain that you are not the first person to need a solution like this.

author: Richard Crowley
author_rank: Super Contributor
timestamp: July 15, 2019, 08:53:05 pm
content: Is it possible to get a replacement keypad? Does the 3189 keypad fit the 3500 machine?If not, can you get a replacement 3500 keypad? And "re-wire" the 3500 keypad to look like the 3189?Even if you had to take it apart and cut PC board traces, etc. it would be a much simpler and more reliable solution.I would vigorously pursue the reworking of a 3500 keypad before considering the much more complex translation solution.

author: magic
author_rank: Super Contributor
timestamp: July 15, 2019, 09:16:38 pm
content: The machine probably probes keys only in one voltage polarity (positive at pins 1,3,5,7 and negative at 2,4,6 or vice-versa) so relays could be replaced with transistors (or optocouplers if you aren't sure of DC levels), for lower cost, higher reliability and no noise.

author: tblake05
author_rank: Contributor
timestamp: July 15, 2019, 10:05:51 pm
content: I'm fairly certain I would not be able to rewire the keyboard given it is a flat circuit board that is pressed together and glued. As soon as I were to open it, it would become destroyed. That is a thought though, but at about 100.00 for a new one and no guarantees that it would work when I'm done, I'd rather go a different rout. If I could find a couple used ones to try out though.

author: tblake05
author_rank: Contributor
timestamp: July 15, 2019, 10:08:50 pm
content: Unless somehow I could design my own keypad using membrane switches. Then I could map it however I needed.....

author: ejeffrey
author_rank: Super Contributor
timestamp: July 15, 2019, 10:23:19 pm
content: It is suspicious to me that the control boards are supposedly identical in their other inputs, outputs, and functionality, confirmed at the schematic level, but that the keypads are so strikingly different.What I would try to do is verify the basic functionality before making anything. Hook up the new control board to the old vending machine, figure out some ugly hack to let you press the minimum number opf buttons, and try it out. Just a few pushbutton switches wired into a connector and floating freely should be enough. You could also make an adapter cable between the old and the new keypad that hooks up the right buttons: the mapping will be wrong (i.e., button 4 will register as # or whatever), but that should be enough to validate your assumption. Then you can work on making the translator.

author: tblake05
author_rank: Contributor
timestamp: July 15, 2019, 10:44:25 pm
content: I can only assume they are so different is because this same updated board is used in multiple different (newer) machines. Whereas this old machine uses a keypad and control board only for this machine. I don't know. What I do know is that the machines operate different. One machine you select "A" for a purchase. The other you select "1", and then "0" for a purchase. Probably the reason for the different mapping entirely. But like you say, I can get my hands on a donor board and just make a few connections to verify it will run. I did do my homework though and the entire rest of the machines are the same right down to the wiring colors.

author: tblake05
author_rank: Contributor
timestamp: July 15, 2019, 10:46:37 pm
content: I also see on google where companies make custom membrane switches. Maybe that is a route I should go depending on cost. They all need to be emailed for a quote. Anyone have an idea of what a 5x5 panel would cost? Ballpark figure. I guess I could stop by there and take some measurements and email them. Couldn't hurt.

author: Richard Crowley
author_rank: Super Contributor
timestamp: July 16, 2019, 12:58:07 am
content: Doesn't the keypad need to be rather rugged with hardened buttons, etc?Most of those custom membrane switches would seem to be rather fragile for public vending machine applications.I would think you would use a hardened metal type of button/keypad?Those custom keypads are probably on the same price level as the replacement.But the one-time setup charge for custom keypads may be prohibitively expensive for your application?Unless you can set up a boutique business selling 3189 wired keypads for 3500 machine upgrades.http://www.directindustry.com/prod/key-technology-china-limited/product-68381-2166633.html

author: tblake05
author_rank: Contributor
timestamp: July 16, 2019, 02:38:36 am
content: Your probably right in it being too expensive. It is a membrane style keypad encased inside the machine with plastic button caps over the top. Here's the keypad on its own.Then my machine.New style machine with its different style keypad.

author: Richard Crowley
author_rank: Super Contributor
timestamp: July 16, 2019, 02:50:53 am
content: There are these 5x5 button matrix panels available from several Chinese vendors.They feature clear plastic button caps under which you can put the nomenclature ("R" or "7" etc.)However, they appear to be common keyboard-grade plastic switches.Not the kind of thing I would want to put into a public vending machine.https://picclick.com/1pc-White-Keyboard-5x5-25-keys-Metal-Panel-130541363513.htmlIf you could find a suitable 5x5 matrix of switches, it would seem to be trivial to wire them up in the 3189 configuration.I would MUCH rather do that than use a microcontroller translation kludge.

author: tblake05
author_rank: Contributor
timestamp: August 25, 2019, 11:08:56 pm
content: Hello all, Thanks for the insight. I am still formulating this idea in my mind....The picture I've shown of my 3189 machine, If you can visualize, the keypad has clear plastic buttons that push up against the non-tactile membrane keypad pictured. So I'm thinking find some single membrane switches, affix them to the correct spots, and then get a custom printed vinyl decal for over the top. Which should maintain functionality and appearance. Plus allow me to connect the switches in the correct array.Problem is, are any of the china membrane switches robust enough to handle repeated daily use?Also finding some the correct size to all line up. This one won't fit. 36MM is just too wide. I've got a distance of 25MM between the center of each button.https://www.ebay.com/itm/10pcs-Matrix-1-Single-Key-Switch-Control-Keypad-Keyboard-Membrane-Super-Slim/202636639383?_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D40719%26meid%3D6d762eac0ffc4af0bd3ae2ce5a7967d2%26pid%3D100667%26rk%3D2%26rkt%3D8%26sd%3D201718232343%26itm%3D202636639383%26pmt%3D1%26noa%3D1%26pg%3D2045573&_trksid=p2045573.c100667.m2042Then there are so many that plain out just don't list a dimension.https://www.ebay.com/itm/Mini-Innovative-Single-Key-Membrane-Switch-Keyboard-MCU-Extended-Keypad-new/282623420179?hash=item41cdab2713:g:fLYAAOSwa~BYWQI4Orhttps://www.ebay.com/itm/Membrane-switch-keypad-1-key-matrix-membrane-switch-keyboard-board-for-arduino/223521057572?_trkparms=aid%3D333200%26algo%3DCOMP.MBE%26ao%3D1%26asc%3D40719%26meid%3Dff3413fd8a4645f886b9fafa2351fecf%26pid%3D100008%26rk%3D3%26rkt%3D12%26sd%3D282623420179%26itm%3D223521057572%26pmt%3D1%26noa%3D0%26pg%3D2047675&_trksid=p2047675.c100008.m2219

author: Richard Crowley
author_rank: Super Contributor
timestamp: August 25, 2019, 11:57:38 pm
content: I would think that it depends on where the vending machine is located.The requirement for robustness would seem to be much different between these two extremes:* A machine in the break room on the executive floor of a prestigious business office.vs.* A machine in a dimly-lit corner in the bad part of town.Certainly, those round metal buttons would seem robust enough for use in a hostile environment.They are the kind you see on the call panels of elevators, pinball/game machines, etc.I would not think that any of those self-adhesive membrane switches would be suitable in hostile use.I don't recall that you ever responded to the notion of re-wiring the existing button matrix?Or retro-fitting the button matrix of the old machine in the circuit of the new model?

author: tooki
author_rank: Super Contributor
timestamp: August 26, 2019, 11:14:41 am
content: Why not just use a panel of discrete (ruggedized) momentary push button switches to replace the old keypad? Then you can wire up the matrix however you need.

author: rstofer
author_rank: Super Contributor
timestamp: August 26, 2019, 10:25:30 pm
content: I'm lazy! I would sell the old machine to a vendor is some other area and buy a new machine. Then I would have the new technology and a discussion with my tax guy. Depreciation, investment, business loan, whatever.If you mess this up, you'll probably have to buy a new machine anyway and not have any residual value in the old machine.

author: tblake05
author_rank: Contributor
timestamp: August 29, 2019, 01:43:22 am
content: Yes, your probably right... Finding a suitable replacement for the location is the biggest problem, plus its neighbor snack machine would have to be replaced as well to maintain visual appearance between the two. Now I'm looking at 6000-10,000.00. Which is why I'm here.

author: MDBSolution
author_rank: Newbie
timestamp: May 31, 2021, 09:57:48 pm
content: I know this is an old thread but I found it while searching something else. I've designed an adaptor for your type of machine assuming it uses the MDB standard of communicating with your coin changer and bill validator. It works great with the PayRange cashless device. I've attached a photo. If you're still interested you can contact me at info@mdbtools.com