Pages: [1]   Go Down
Author Topic: Coin Acceptor help. CH-268t  (Read 1960 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 509
Posts: 31478
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How can I do this with arduino?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 239
Posts: 24371
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

With a voltage divider.
Logged

"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.

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 239
Posts: 24371
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12465
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Tillaart

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

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: October 14, 2012, 03:24:47 pm by hunter2379 » Logged

More Cowbell
Offline Offline
Edison Member
*
Karma: 11
Posts: 1029
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
// set the LED using the state of the button:
   digitalWrite(ledPin, buttonState);

to this:

Code:
// 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.
Logged

Vexatious Sampler

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Unlocked.
Logged

More Cowbell
Offline Offline
Edison Member
*
Karma: 11
Posts: 1029
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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).
Logged

Vexatious Sampler

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, well that makes it less confusing.

Threads merged.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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.
Logged

Pages: [1]   Go Up
Jump to: