Go Down

Topic: Coin Acceptor help. CH-268t (Read 2774 times) previous topic - next topic

hunter2379

Has anyone every had some experience with the CH-268t? Below I will have the wiring instructions. Apparently it sends a pulse and the arduino is supposed to interpret this. I don't know how to wire or program this and am in desperate need of help with that. I know the red and black wires and where they go but not the other wires. could really use some help on this. Essentially I want to make a counter for an arcade game I want to make.



White line--(N.C. signal)

Green line--(N.O. signal)

Gray line--Counter (Meter)

Yellow line--inhibit/low(<+1V)

Red line--PowerDC +12V

Black Line--Ground (GND)

Thank you to all who help.

Grumpy_Mike

Any chance of a link to the device?
I would power it up and look at the grey line with a scope to see what it is producing before connecting it up to anything. It look like the yellow line has to be high as well but whether this is 5V or 12V I dont't know.

hunter2379

How can I do this with arduino?

AWOL

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

hunter2379

Ok so lets say I use a voltage divider and the Vout is 1.2 volts. How would I interpret that with arduino?

If pin1 = HIGH?

Or would it be analog?

AWOL

Quote
Ok so lets say I use a voltage divider and the Vout is 1.2 volts.

Say the voltage is above 3volts, and attach it to a digital pin.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

robtillaart

use  0V ----[10K]---- digital pin Arduino ----[20K] ---- 12 Volt

Then the arduino pin will get about 4 Volt (will be seen as a HIGH) , current will only be a about 0.4 mA

You could use one of the interrupt pins to measure the timing - see attachinterrupt() - if you want to
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

hunter2379

#7
Oct 14, 2012, 10:23 pm Last Edit: Oct 14, 2012, 10:24 pm by hunter2379 Reason: 1
Ok so I'm totally lost and frustrated. Basically I bought a coin acceptor CH-268t. Been emailing seller and he told me that the pulse signal is 12v 20ms-100ms. I tried the voltage divider with R1 3.3kohms and R2 1.5kohms. The voltage input was 12v and the wiring for the CH-268t is:
White line--(N.C. signal)
Green line--(N.O. signal)
Gray line--Counter (Meter)
Yellow line--inhibit/low(<+1V)
Red line--PowerDC +12V
Black Line--Ground (GND)

All i got with Analog Input to serial and Digital input to serial was a bunch of numbers that don't change even when I put a coin in the slot. Sometimes I'd get straight zeros down the line, but then again I don't know if that was even the right sketch to use.

I'm totally lost and confused. I wanted to build a simple game machine for my little cousins but I don't know how to continue from here on. If anyone has any ideas or suggestions I'd greatly appreciate them.

JoeN

Like AWOL said, use a digital pin.  Design the voltage divider so it turns +12V/0V into +5V/0V and attach it to a digital pin.   Then use this sketch:

http://www.arduino.cc/en/Tutorial/Debounce

A switch on pin 2 should trigger the Arduino's LED.  It will be a quick pulse.

I would change this line:

Code: [Select]
// set the LED using the state of the button:
   digitalWrite(ledPin, buttonState);


to this:

Code: [Select]
// toggle the LED using the state of the button:
if (lastButtonState != buttonState)
digitalWrite(ledPin, !digitalRead(ledPin));


to make it a bit more friendly to read.
I have only come here seeking knowledge. Things they would not teach me of in college.

dhenry

Quote
How can I do this with arduino?


It depends on exactly what you are trying to measure.

In the simplest, a resistor would do (it measures the presence of a high voltage signal, potentially over a period of time), or a zener (it measures the presence of a specific range of a high voltage signal), to some adc.


hunter2379

Well Joen debounce did nothing. I took apart the hardware and played with it for a bit. The LED"s don' light up and the solenoid doesn't move. I'm going to see if I can return it or exchange it because I think it may be defective. Simply does nothing when I put a coin in.

Thank you all who have replied and helped me with this. I really appreciate it.

Nick Gammon

@hunter2379 - why do you post a question and then lock the thread?

Unlocked.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

JoeN


@hunter2379 - why do you post a question and then lock the thread?

Unlocked.


He asked this in at least one other message and it never got caught as a dupe (see http://arduino.cc/forum/index.php/topic,127204.0.html).  In the other thread he has concluded that the device must be defective so he is sending it back.  At that point I think he additionally concluded that continued discussion was a waste of everyone's time.  But I am just guessing here.  I had a discussion with him and he seems to be a nice guy and I suspect he didn't do it to intentionally irritate anyone or anything like that (like a different guy earlier this weekend).
I have only come here seeking knowledge. Things they would not teach me of in college.

Nick Gammon

OK, well that makes it less confusing.

Threads merged.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Nick Gammon

@hunter2379 - It's easier all round if you confine your questions about the same device to the same thread. You can see how confusing it is to ask about measuring voltages in one thread, and about the device for which you want to measure that voltage, in a different thread.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up