Thanks:) with a bit of effort i got it working. Searched for days thank god i found this video:D PS: the way you detect the pulse is smart af;)
@craynerd4 жыл бұрын
Cheers mate!
@CarstenMeyer8 жыл бұрын
Very elegant code to differenciate between the coins. Thumbs up.
@mattdgroves4 жыл бұрын
I'm trying to connect this coin acceptor to a USB Controller board (like for joysticks). Any idea what voltage the pulse is? I believe the USB controller is expecting 5V? Or do you have any idea how I would set this coin pulse up to map to a USB button or even a keyboard key?
@KuyaMagik8 ай бұрын
do you still have the code
@craynerd8 ай бұрын
I’ll have a look in a few days when I’m back home. I should somewhere!
@JimmyRetro8 ай бұрын
@@craynerd Could you add a link to it in the video description if you find it please? Thanks!
@primescienceprojects27 күн бұрын
here's the full code you are looking for, this code edited by me according to indian values, you can alter accordingly. volatile int coinPulseCount = 0; byte cmd = 0; // A place to put our serial data int opCountPin = 2; // Pin 2 as optical count input volatile unsigned long pulseTime; // This stores the time of the last pulse int newCoinInserted = 0; void setup() { Serial.begin(9600); Serial.print("Input on pin "); Serial.print(opCountPin); Serial.println(); pinMode(opCountPin, INPUT); // Optical count is an input attachInterrupt(digitalPinToInterrupt(opCountPin), coinpulse, RISING); // Attach interrupt to pin 3 on rising edge } void loop() { // Check now to see which coin is inserted if (coinPulseCount > 0 && millis() - pulseTime > 200) { // If the pulse time has passed newCoinInserted = coinPulseCount; coinPulseCount = 0; // Clear pulse count read // Process the coin inserted switch (newCoinInserted) { case 1: Serial.println("1rs inserted"); newCoinInserted = 0; break; case 2: Serial.println("2rs inserted"); newCoinInserted = 0; break; case 3: Serial.println("5rs inserted"); newCoinInserted = 0; break; case 4: Serial.println("10rs inserted"); newCoinInserted = 0; break; case 5: Serial.println("20rs inserted"); newCoinInserted = 0; break; // case 6: //Serial.println("50p inserted"); // newCoinInserted = 0; //break; } } } void coinpulse() { coinPulseCount++; // Increment the pulse count pulseTime = millis(); // Store the current time in pulseTime }
@GiorgiGvimradze19 жыл бұрын
I have grounded arduino and coin acceptor in one ground. using white whire in 2or 3rd pins but getting pulse even when i touch the coin validator case with metal coin or knock on a validator with a coin. shoul i use NO or NC? Thanks in advance
@craynerd9 жыл бұрын
Did you get this sorted?? I had a very similar issue but grounding everything as you described sorted this!
@GiorgiGvimradze19 жыл бұрын
yes i lately found out that i havent grounded it :) but Ive lost about 1 week to get it by myself
@craynerd7 жыл бұрын
Giorgi Gvimradze lol I'm sorry my delayed reply and having you sort it out for yourself lost you a week. In future I will ensure I am immediate in my reply.
@essedisystem4307 жыл бұрын
Hello, can anyone tell me which kind of signal the coin selector give? Furthermore the out signal is 5V? Thanks. Regards.
@anythingunderthesun99305 жыл бұрын
Please comment the whole code you used. We want the full sketch of this project. Thanks.
@primescienceprojects27 күн бұрын
here's the full code you are looking for, this code edited by me according to indian values, you can alter accordingly. volatile int coinPulseCount = 0; byte cmd = 0; // A place to put our serial data int opCountPin = 2; // Pin 2 as optical count input volatile unsigned long pulseTime; // This stores the time of the last pulse int newCoinInserted = 0; void setup() { Serial.begin(9600); Serial.print("Input on pin "); Serial.print(opCountPin); Serial.println(); pinMode(opCountPin, INPUT); // Optical count is an input attachInterrupt(digitalPinToInterrupt(opCountPin), coinpulse, RISING); // Attach interrupt to pin 3 on rising edge } void loop() { // Check now to see which coin is inserted if (coinPulseCount > 0 && millis() - pulseTime > 200) { // If the pulse time has passed newCoinInserted = coinPulseCount; coinPulseCount = 0; // Clear pulse count read // Process the coin inserted switch (newCoinInserted) { case 1: Serial.println("1rs inserted"); newCoinInserted = 0; break; case 2: Serial.println("2rs inserted"); newCoinInserted = 0; break; case 3: Serial.println("5rs inserted"); newCoinInserted = 0; break; case 4: Serial.println("10rs inserted"); newCoinInserted = 0; break; case 5: Serial.println("20rs inserted"); newCoinInserted = 0; break; // case 6: //Serial.println("50p inserted"); // newCoinInserted = 0; //break; } } } void coinpulse() { coinPulseCount++; // Increment the pulse count pulseTime = millis(); // Store the current time in pulseTime }
@dudik115 жыл бұрын
Grey wire is a coin counter ground output...
@tjdals30356 жыл бұрын
i have troble about power, Arduino continues to receive high and low digital signals continuously
@italaa866 жыл бұрын
Hello i need something which is almost what you did, it's for car wash machine, by connecting that coin acceptor to a raspberry pi and increase time counter according the impulse number given from it and display it on screen lcd, once time finish i should stop motor, i hope you help me to know how i can receive impulses by raspberry and read them ??? thanks a lot
@martinchavez25967 жыл бұрын
Hello I am interested in reading the pulses to detect if I enter a coin, I use a NRI G13 validator of 6 channels. Each channel sends a pulse, but I receive false pulses, can your code work for me?
@thabisoedwintjatjie53398 жыл бұрын
The is helping i'll try to write my own codes, but please don't forget to help me with the codes.
@KaramAbuGhalieh11 жыл бұрын
do you have the programming video for the accept-or
@yalfenymartinez14506 жыл бұрын
greeting brother very good video you could send me the code or where could I get it thanks and discula my English is not my native language
@juleshell58018 жыл бұрын
The grey wire is for a counter - connect this wire to one side of counter and other side of counter to +
@craynerd7 жыл бұрын
Jules Hell to count what??
@PHLocalExtremeSports11 ай бұрын
do you still have the code?
@gangsterlovester471211 ай бұрын
Did anyone try to hook this up to a logic analyzer ?
@craynerd10 ай бұрын
Hi, in what way, to look for what?
@MrGakure11 жыл бұрын
But for sure help me on this,,,,because i have the same model,i went through the setting and sampling procedure very well but once done and complete, the coins are not getting through but get returned to the return slot,what is the cause ........... Very good Stuff.Thanks.
@emidiobattipaglia6 жыл бұрын
same problem. did you manage to get it work?
@rajasbhadkamkar22875 жыл бұрын
Did you find the solution??
@cascha42206 жыл бұрын
Hello, really nice! Can i download the code for it somewhere? Thank you!
@craynerd6 жыл бұрын
Www.raynerd.co.uk
@anujaarman2635 жыл бұрын
@@craynerd Hi... Your website has so many projects. May I request to send the link of this project for code ?
@syedmohdbukhariadhabinsyed3517 жыл бұрын
if i just insert coin than my lamp is on . just set the coin acceptor as button right ?
@craynerd7 жыл бұрын
Abam Jambang hi sorry, not sure what you mean. Can you explain a little more?
@syedmohdbukhariadhabinsyed3517 жыл бұрын
craynerd ok like this . my progress is when the coin insert . my lamp will be on . or can you whatsapp me 0109121011 ? i will give you my progress video . tq
@syedmohdbukhariadhabinsyed3517 жыл бұрын
my coin acceptor was broken before my present last monday . so i decide to buy another coin acceptor . but i dont know how to use . i m in diploma electronic communication . i hope u can help me .
@craynerd7 жыл бұрын
Abam Jambang does my new video help kzbin.info/www/bejne/r3qppKdvm8yWjrM
@syedmohdbukhariadhabinsyed3517 жыл бұрын
craynerd just a little bit . tq . but can you whatsapp me ? i have to show u my progress video . so i can ask you directly ..
@tylerdecker409611 жыл бұрын
Can you share a link to the code?
@pedroandresguzman7 жыл бұрын
Porfavor comparten el codigo. Gracias
@johnjovibon75048 жыл бұрын
Hi! i'm having a problem with the output value. it sometimes differ even when I insert the same value of coin simultaneously. do you have an idea about this?
@craynerd8 жыл бұрын
John Bon have you got a common ground between all components - arduino AND coin hopper?
@johnjovibon75047 жыл бұрын
yes. both ground of psu of coin slot and ground of Arduino. we don't have yet coin hopper. do you have a code for arduino? we want to try it.
@johnjovibon75047 жыл бұрын
it's working now! I just added 10k resistor then the value of coin inserted is ok now. Thank you so much for the code!
@johnjovibon75047 жыл бұрын
do you have a code for the coin hopper? we want to put coin changer.
@craynerd7 жыл бұрын
John Bon I'm currently on hols in Wales but I'll look when I get home. If I remember correctly, the coin hopper gives an output line with a number of pulses for each coin type. The arduino just sat waiting for impulses, counted the impulses when they came and turned on the coin hopper. Sadly, you couldn't tell the coin hopper how many coins to dispense but instead it pulsed each coin as it was ejected. Again, I just used the arduino to count the number of coins coming out of the hopper and shut it off.
@Thisishosea4 жыл бұрын
Can you share the source code please?
@alessandro_apo10 жыл бұрын
hello, I need to understand how the Arduino reads coin acceptor. Regards
@craynerd9 жыл бұрын
It feels a pulse from the coin acceptor
@soumyaranjan68357 жыл бұрын
I need the program and circuit...plzzz.. can u share it.
@craynerd7 жыл бұрын
Soumya ranjan go to here to see the updated video and code, www.raynerd.co.uk/coin-change-machine/
@opalscoctoberry4 жыл бұрын
@@craynerd it's said, sorry no posts found. Can u give me the other link or something? Thank you
@ankitdwivedi51295 жыл бұрын
Hello sir. . I need. The programming code. With arduino so i can control the further processes for. Different coins
@yusrijamaludin9 жыл бұрын
I got a problem where pulse voltage from acceptor is about 20mV. And sometimes, it trigger a pulse but no coin inserted. Maybe I know what is the pulse voltage. How can I solve my problem?
@craynerd9 жыл бұрын
+Yusri Jamaludin Have you used a common ground? I had a similar issue but it was solved when I grounded everything together.
@yusrijamaludin9 жыл бұрын
+craynerd I have grounded the coin acceptor to arduino GND and power source 12V-GND. The unwanted pulse is disappear but still exist 1, 2 pulse after I left the circuit unattended for 5 to 10 minutes. May I know what is your ground circuitry?
@craynerd9 жыл бұрын
Sorry, not too sure with that one and my ground was simply tying all of them together as you have already explained. Can you detect a random pulse that is causing the hopper to fire or more specifically the Arduino to detect it? Is the coin acceptor attached to anything that could be interfering or causing a potential difference? Sorry, I`m guessing here! Please post back if you do figure it out and help others
@naveenpalanisamy.47392 жыл бұрын
Bro could you please send me the link to access code .
@mohdfaisal98325 жыл бұрын
Can you share programming to me??
@joynano1276 жыл бұрын
can you please give to me the codes of multi acceptor to arduino
@priyankmehra74166 жыл бұрын
Where can i find this code
@wholechums2575 жыл бұрын
pls. share codes..
@cesjaravata37568 жыл бұрын
bro can i get the whole program?
@lets_watchh5 жыл бұрын
is there any means of simulating the arduino code for the coin acceptor in arduino or other softwares please help me wondemenehaddis@gmail.com
@den-05517 жыл бұрын
can i have the coding?
@Metex47 жыл бұрын
I dont think it fits the spirit of open source arduino to take money for things you share...
@craynerd7 жыл бұрын
mihu no problem pal, buy a £40 coin hopper, £30 coin acceptor and then write the code and share freely! I made this because people were asking for it!
@Metex47 жыл бұрын
craynerd so wasnt a Projekt for yourself?
@13hisuka7 жыл бұрын
Craynerd can you please send me the code thanks melvin.jansor_utsc@yahoo.com