Go Down

Topic: Coin acceptor with arduino (Read 1 time) previous topic - next topic

ahmedomarz

I got coin acceptor (model CX-363CA-A) and I want to run it with Arduino. I read the PDF of the model here. After programming the coin acceptor for two types of coins and then connected the RX and TX pins of the coin acceptor to their opposites in Arduino on pins 10 and 11 and used SoftwareSerial library to see the results from the coin acceptor.

Here's the code:

Quote
/*
  This example code is in the public domain.

*/
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
}

void loop() { // run over and over
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}
The when I inserted the same coin two several times and then the other coin, results all different and I don't know what are those results? From reading the PDF, it's TL4 protocol (which I don't know what it's) and I should receive 14 byte String.





PaulS

How is the coin acceptor connected to the Arduino?
The art of getting good answers lies in asking good questions.

ahmedomarz

as in the PDF

1 -
2 +5VDC
3 -
4 GROUND
5 GROUND
6 +9VDC
7 TXD, +5VDC TTL level
8 RXD, +5VDC TTL level
9 -
10 -

Go Up