Vending Machine - Cashless Device

339 views
Skip to first unread message

Philipp Hotz

unread,
Feb 19, 2015, 9:18:06 AM2/19/15
to notti...@googlegroups.com

Hello everybody,

 

a few weeks ago I came up with the idea of implementing a custom cash less device for a vending machine (the machine is about 5 years old, the manufacturer is Sanden Vendo).

As a "regular" software developer I am not that familiar with handling data transfer on bus systems especially not on the MDB.

So I googled a bit and found your vending machine project which is exactly what I was looking for.

 

The only thing where I am not quite sure on how to do this is the board that you but between the vending machine and the nanode (https://wiki.nottinghack.org.uk/images/a/a2/VMC-Nanode_Schematic.png).

 

Have you built this board on your own or is there a possibility to buy such a board?

 

The schematic drawing of the board seems quite simple, so I guess it won't be a big deal to build it. But I am missing one little thing: There are two capacitors used. One before and one after the voltage regulator. Unfortunately it is not specified which capacitors I have to use. So can you tell me which one I should go for?


Best Regards,

Philipp


PS: Please excuse my grammar. English is not my native language.

Daniel

unread,
Feb 19, 2015, 12:27:59 PM2/19/15
to notti...@googlegroups.com
Hi Philipp,

> Have you built this board on your own or is there a possibility to buy such a board?

We've built the board; I'm not aware of anywhere you can buy a suitable board (otherwise, we probably would have...)


> The schematic drawing of the board seems quite simple, so I guess it won't be a big deal to build it. But I am missing one
> little thing: There are two capacitors used. One before and one after the voltage regulator. Unfortunately it is not specified
> which capacitors I have to use. So can you tell me which one I should go for?


The schematic is very heavily based of the datasheet for the LM2576, so I'd hazard a guess the left one is ~100uF, and the right one ~1000uF (I'm not sure how I managed to miss both labelling them and adding the values...). I'm pretty sure neither value is particularly critical though.

Having said that, all the LM2576 and associated components (top 1/3 of the schematic) are there for is a ~34v->5v PSU. If I were building it again today, I'd probably replace that section with something like:
http://www.ebay.co.uk/itm/291090137932
It'll likely be cheaper, easier, and more compact.

Daniel

Philipp Hotz

unread,
Feb 21, 2015, 11:06:36 AM2/21/15
to notti...@googlegroups.com
Hi Daniel,

thanks for the info. I guess you are right, replacing the power regulator stuff with a pre built module is a good idea.

Do you know if it is possible to use a arduino uno instead of the nanode, especially without rewriting the whole mdb-communication part?
 

Philipp

Robert Hunt

unread,
Feb 21, 2015, 11:28:15 AM2/21/15
to notti...@googlegroups.com
Hi Philipp,

I've just had a look at the board in our vending machine, the one capacitor is 100uF and the other is 330uF, I can't tell you which one is which though without taking the board our of the machine.

Here are a couple of photos if that helps:

https://flic.kr/p/qYLNDT
https://flic.kr/p/ri6hAt

Philipp Hotz

unread,
Feb 21, 2015, 3:24:16 PM2/21/15
to notti...@googlegroups.com
Hi Robert

Thanks for the photos. Looks pretty simple. I think I will mange to build such a board on my own.

Do you know if its possible to do the mdb communication with an arduino uno?
I have somewhere read that there is a issue with those 9 bit messages on the MDB and that its not posible to talk to it with an arduino.


Philipp

James Hayward

unread,
Feb 21, 2015, 3:29:12 PM2/21/15
to notti...@googlegroups.com

Hi Phillip

The nanode is just an arduino with an on-board Ethernet port, so yes it will work.

If I remember correctly (it's been a while) you can't use the arduino library. Our code is in our github I think - feel free to take it and adapt it. It may need some updates to run on an uno

J

--
You received this message because you are subscribed to the Google Groups "Nottingham Hackspace - Nottinghack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nottinghack...@googlegroups.com.
To post to this group, send email to notti...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Erskine

unread,
Feb 21, 2015, 6:57:55 PM2/21/15
to nottinghack
If you need a Nanode I have one spare.

Philipp Hotz

unread,
Feb 22, 2015, 9:09:38 AM2/22/15
to notti...@googlegroups.com
Hi James,

Thanks for the info. So I will try it with the arduino uno.
My plan is to use the arduino only for the MDB related stuff. Everything else should by handled by a raspberry pi.


Philipp

Philipp Hotz

unread,
Feb 22, 2015, 9:11:09 AM2/22/15
to notti...@googlegroups.com
Hello Michael,

Thanks for your offer. But I think I will first try it with an arduino uno.


Philipp

Matt Lloyd

unread,
Feb 22, 2015, 9:44:50 AM2/22/15
to notti...@googlegroups.com
The mdb side of our code will work fine on the uno
But you will need to rework the network side if not using am ENC based network shield or arduino clone

'RepRap' Matt
Sent from my iPad

Philipp Hotz

unread,
Feb 22, 2015, 10:18:42 AM2/22/15
to notti...@googlegroups.com
Hi Matt,

Thanks for the info. I am confident to bring this thing to work with the uno. The network side will be handled by the raspberry.

Now there is still one little thing, I am not sure about:

Robert posted in his answer two photos of the board in your vending machine, one was this:

On the photo you can see clearly that the optocoppler (the one that is near to the bottom) has 6N138 written on it.
But the schematic (https://wiki.nottinghack.org.uk/images/a/a2/VMC-Nanode_Schematic.png) says that there is a 6N137 used.

Now which one should i get. The 6N137 or die 6N138???



Philipp

Daniel

unread,
Feb 22, 2015, 10:36:19 AM2/22/15
to notti...@googlegroups.com
Yeah, as James/Matt mentioned, the Arduino is basically an Uno + ENC28J60 based network shield all on one board.
The atmega328 used on the Arduino Uno does support 9bit serial in hardware, but the Arduino serial library doesn't (or didn't - I’ve not checked recently).

If you plan on using serial to talk to the raspberry pi, I'd suggest you use the hardware serial for MDB, and softserial for the rpi.

Daniel

Philipp Hotz

unread,
Feb 23, 2015, 10:13:52 AM2/23/15
to notti...@googlegroups.com
Hi,

Actually I am getting a bit confused by the optocouplers.

The schematic drawing says that I need a 6N137 and a 4N29.
On the photo of your board (https://flic.kr/p/qYLNDT) it looks like you are using a 6N138, unfortunately the other one is hidden.
So, which one should I use?

Do you know a good onlineshop where I can get this components?
I tried finding them at conrad electronics (a huge onlineshop here in austria and germany, which sells almost every electronic component).
But i found only the models 6N137M and 4N29M - and I don't know if there is any difference to the models with the trailing "M" in the name.


Philipp

Matt Lloyd

unread,
Feb 23, 2015, 1:15:18 PM2/23/15
to notti...@googlegroups.com
Order up some of everything, try rswww.com
 From memory the diffrence between 137 and 138 is if they invert the signal

'RepRap' Matt
Sent from my iPad
--

deeja...@gmail.com

unread,
Feb 23, 2015, 2:45:34 PM2/23/15
to notti...@googlegroups.com
According to MIDI forums, one is faster than the other.


David Clarke

Philipp Hotz

unread,
Apr 4, 2015, 2:17:25 PM4/4/15
to notti...@googlegroups.com
Hello again!

Now I finally received all parts to build the circuit to connect to the vending machine.
I built the board exactly like shown in your wiki also using the same parts.

To check if I receive data from the VMC I used this MDB Sniffer from marginallyclever (of course I am using 2 arduinos, exactly like shown in the description).
So I connected everything crossed my fingers and IT WORKED!!!

But there is one little issue: As soon as I connect master transmit and communications common to my board the MDB sniffer prints out all the data from the bus. BUT the Coin Acceptor / Changer goes offline. The Bill Acceptor is still up and accepts bills and the VMC lets me buy items - only this stupid Coin Acceptor / Changer stops working.

Has anybody of you an idea how to fix this?


Philipp
Reply all
Reply to author
Forward
0 new messages