Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Controlling a Coin Hopper

Status
Not open for further replies.

Dirk the Daring

New Member
I'm sure this project has been done many times before, but it is my first time, and my electronic skills are more than a bit rusty.

I am trying to control a coin hopper-- a device that spits out coins when activated. It is an old-style hopper, which means it has two lines for A/C 115, that power a motor that ejects coins. There is also a switch that is triggered when a coin is ejected.

So, effectively, in order to eject a coin, you turn on the power for the motor and wait for the switch to be tripped, then stop the motor.

NOW...

My setup involves a PC, and a PIC connected by a serial cable. I need to figure out how to control the motor with either the PIC or the PC (I assume the PIC, unless I'm missing something obvious)

So my first guess is to involve a relay-- to have the hopper powered off the AC lines on the PC, with an in-line relay, controlled by the PIC. The pic would then use one output line to control the relay, and one input to listen to the switch in the hopper.

This seems fairly straightforward, however, it leaves me a few questions:

* Is there an easier way to do this?
* If not, what relay would be recommended? Although I understand the
concept of a relay, I do not understand the specifics.
* Is there more to this circuit than a relay, and a bunch of wiring?

Basically, help :)

Thanks,
Mike
 
Coin hopper

Mike,
you are right. The simplest way to do that is to use a relay.

First of all, you need to know how much current will go to the the motor, because the relay contacts will have to carry that current.
As presumably the motor is an inductive load, it is best to choose a relay with rated contact current well higher than the rated current of the motor, if you want that the contacts work reliably for a long time.
Let we make an example.
On the motor you find written “230 VA”. This means that the current will be 230 VA / 115 V = 2 A (RMS). Or, otherwise, you measure the current with a meter, and you find 2 A. (In reality, it could well be much less; this is an example).
You should then choose a relay rated for 2 A, or more, _at 115 V AC_. The current rating depends both on the working voltage and on the current being AC or DC. The same contact will be able to carry more current on less voltage, and less current on DC.
If you choose a relay with rated contact current less than is needed, it will work – at first. But the contacts will wear rapidly, and soon will malfunction.
If you choose a relay with a rated contact current more than it is needed, nothing bad happens, apart that you spend more buying the relay.
The most of the wearing happens when the contacts open; the current creates an electric arc between them, and the arc can melt or vaporize some part of the contact.
Well, an inductive load (i. e. a load that behaves partly like a coil) tends to sustain and prolonge in the time the arc. That is why I said that the rated current of the contacts should be well higher than the current effectively carried. Should I have to use a relay for a motor of, say, 2 A, I would choose a relay rated for 5 A, or, even better, 10 A.
As for the coil of the relay, you have to choose a relay with a coil voltage that you can supply. As you are using a PIC, you probably have 5 V DC at hands.
So, a coil for 5 V could do. But if the contacts must carry an heavy current, it could be that the relay is not produced with 5 V DC coil; in that case you will choose a 12 V DC coil. Most relays comes with a variety of coil voltages, an 12 V DC is very common.
You can use a 2N7000 VMOS for driving the coil (even if the relay has a coil for 5 V, probably it will need more coil current than the 25 mA a PIC can give).
The 2N7000 gate can be drived by the PIC at 5V, and the drain can carry more than 200 mA.
Don't forget to place a 1N4007 or similar diode in anti-parallel with the coil.

As you asked it: yes, there are other means to do the same thing.
One is to use a so-called “solid state relay” (basically, a triac driven by an optocoupler).
Another is to use a little relay (e. g. a reed relay with a coil for 5 V DC, directly driven by the PIC) to control a triac. The little relay gives the insulation between the AC line and teh control circuit, while the triac gives the required current to the motor. The triac turns off when the AC motor current crosses the zero, so there is no arc problem.
If you want more informations, let me know.

Best wishes

Ezio
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top