Ch-926 coin acceptor identify coins

  Рет қаралды 27,293

craynerd

craynerd

Күн бұрын

Пікірлер: 91
@ch40skappa64
@ch40skappa64 4 жыл бұрын
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;)
@craynerd
@craynerd 4 жыл бұрын
Cheers mate!
@CarstenMeyer
@CarstenMeyer 8 жыл бұрын
Very elegant code to differenciate between the coins. Thumbs up.
@mattdgroves
@mattdgroves 4 жыл бұрын
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?
@KuyaMagik
@KuyaMagik 8 ай бұрын
do you still have the code
@craynerd
@craynerd 8 ай бұрын
I’ll have a look in a few days when I’m back home. I should somewhere!
@JimmyRetro
@JimmyRetro 8 ай бұрын
@@craynerd Could you add a link to it in the video description if you find it please? Thanks!
@primescienceprojects
@primescienceprojects 27 күн бұрын
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 }
@GiorgiGvimradze1
@GiorgiGvimradze1 9 жыл бұрын
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
@craynerd
@craynerd 9 жыл бұрын
Did you get this sorted?? I had a very similar issue but grounding everything as you described sorted this!
@GiorgiGvimradze1
@GiorgiGvimradze1 9 жыл бұрын
yes i lately found out that i havent grounded it :) but Ive lost about 1 week to get it by myself
@craynerd
@craynerd 7 жыл бұрын
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.
@essedisystem430
@essedisystem430 7 жыл бұрын
Hello, can anyone tell me which kind of signal the coin selector give? Furthermore the out signal is 5V? Thanks. Regards.
@anythingunderthesun9930
@anythingunderthesun9930 5 жыл бұрын
Please comment the whole code you used. We want the full sketch of this project. Thanks.
@primescienceprojects
@primescienceprojects 27 күн бұрын
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 }
@dudik11
@dudik11 5 жыл бұрын
Grey wire is a coin counter ground output...
@tjdals3035
@tjdals3035 6 жыл бұрын
i have troble about power, Arduino continues to receive high and low digital signals continuously
@italaa86
@italaa86 6 жыл бұрын
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
@martinchavez2596
@martinchavez2596 7 жыл бұрын
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?
@thabisoedwintjatjie5339
@thabisoedwintjatjie5339 8 жыл бұрын
The is helping i'll try to write my own codes, but please don't forget to help me with the codes.
@KaramAbuGhalieh
@KaramAbuGhalieh 11 жыл бұрын
do you have the programming video for the accept-or
@yalfenymartinez1450
@yalfenymartinez1450 6 жыл бұрын
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
@juleshell5801
@juleshell5801 8 жыл бұрын
The grey wire is for a counter - connect this wire to one side of counter and other side of counter to +
@craynerd
@craynerd 7 жыл бұрын
Jules Hell to count what??
@PHLocalExtremeSports
@PHLocalExtremeSports 11 ай бұрын
do you still have the code?
@gangsterlovester4712
@gangsterlovester4712 11 ай бұрын
Did anyone try to hook this up to a logic analyzer ?
@craynerd
@craynerd 10 ай бұрын
Hi, in what way, to look for what?
@MrGakure
@MrGakure 11 жыл бұрын
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.
@emidiobattipaglia
@emidiobattipaglia 6 жыл бұрын
same problem. did you manage to get it work?
@rajasbhadkamkar2287
@rajasbhadkamkar2287 5 жыл бұрын
Did you find the solution??
@cascha4220
@cascha4220 6 жыл бұрын
Hello, really nice! Can i download the code for it somewhere? Thank you!
@craynerd
@craynerd 6 жыл бұрын
Www.raynerd.co.uk
@anujaarman263
@anujaarman263 5 жыл бұрын
@@craynerd Hi... Your website has so many projects. May I request to send the link of this project for code ?
@syedmohdbukhariadhabinsyed351
@syedmohdbukhariadhabinsyed351 7 жыл бұрын
if i just insert coin than my lamp is on . just set the coin acceptor as button right ?
@craynerd
@craynerd 7 жыл бұрын
Abam Jambang hi sorry, not sure what you mean. Can you explain a little more?
@syedmohdbukhariadhabinsyed351
@syedmohdbukhariadhabinsyed351 7 жыл бұрын
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
@syedmohdbukhariadhabinsyed351
@syedmohdbukhariadhabinsyed351 7 жыл бұрын
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 .
@craynerd
@craynerd 7 жыл бұрын
Abam Jambang does my new video help kzbin.info/www/bejne/r3qppKdvm8yWjrM
@syedmohdbukhariadhabinsyed351
@syedmohdbukhariadhabinsyed351 7 жыл бұрын
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 ..
@tylerdecker4096
@tylerdecker4096 11 жыл бұрын
Can you share a link to the code?
@pedroandresguzman
@pedroandresguzman 7 жыл бұрын
Porfavor comparten el codigo. Gracias
@johnjovibon7504
@johnjovibon7504 8 жыл бұрын
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?
@craynerd
@craynerd 8 жыл бұрын
John Bon have you got a common ground between all components - arduino AND coin hopper?
@johnjovibon7504
@johnjovibon7504 7 жыл бұрын
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.
@johnjovibon7504
@johnjovibon7504 7 жыл бұрын
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!
@johnjovibon7504
@johnjovibon7504 7 жыл бұрын
do you have a code for the coin hopper? we want to put coin changer.
@craynerd
@craynerd 7 жыл бұрын
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.
@Thisishosea
@Thisishosea 4 жыл бұрын
Can you share the source code please?
@alessandro_apo
@alessandro_apo 10 жыл бұрын
hello, I need to understand how the Arduino reads coin acceptor. Regards
@craynerd
@craynerd 9 жыл бұрын
It feels a pulse from the coin acceptor
@soumyaranjan6835
@soumyaranjan6835 7 жыл бұрын
I need the program and circuit...plzzz.. can u share it.
@craynerd
@craynerd 7 жыл бұрын
Soumya ranjan go to here to see the updated video and code, www.raynerd.co.uk/coin-change-machine/
@opalscoctoberry
@opalscoctoberry 4 жыл бұрын
@@craynerd it's said, sorry no posts found. Can u give me the other link or something? Thank you
@ankitdwivedi5129
@ankitdwivedi5129 5 жыл бұрын
Hello sir. . I need. The programming code. With arduino so i can control the further processes for. Different coins
@yusrijamaludin
@yusrijamaludin 9 жыл бұрын
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?
@craynerd
@craynerd 9 жыл бұрын
+Yusri Jamaludin Have you used a common ground? I had a similar issue but it was solved when I grounded everything together.
@yusrijamaludin
@yusrijamaludin 9 жыл бұрын
+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?
@craynerd
@craynerd 9 жыл бұрын
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.4739
@naveenpalanisamy.4739 2 жыл бұрын
Bro could you please send me the link to access code .
@mohdfaisal9832
@mohdfaisal9832 5 жыл бұрын
Can you share programming to me??
@joynano127
@joynano127 6 жыл бұрын
can you please give to me the codes of multi acceptor to arduino
@priyankmehra7416
@priyankmehra7416 6 жыл бұрын
Where can i find this code
@wholechums257
@wholechums257 5 жыл бұрын
pls. share codes..
@cesjaravata3756
@cesjaravata3756 8 жыл бұрын
bro can i get the whole program?
@lets_watchh
@lets_watchh 5 жыл бұрын
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-0551
@den-0551 7 жыл бұрын
can i have the coding?
@Metex4
@Metex4 7 жыл бұрын
I dont think it fits the spirit of open source arduino to take money for things you share...
@craynerd
@craynerd 7 жыл бұрын
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!
@Metex4
@Metex4 7 жыл бұрын
craynerd so wasnt a Projekt for yourself?
@13hisuka
@13hisuka 7 жыл бұрын
Craynerd can you please send me the code thanks melvin.jansor_utsc@yahoo.com
@franciscocaicedo2693
@franciscocaicedo2693 Жыл бұрын
share the codigo ´please
How to use CH-926 Coin Acceptor with Arduino
15:18
Mario's Ideas
Рет қаралды 132 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
E6 project Smart Sensor Switch SSS 2025 Electromagnetic 1
1:38
Antenna designs, Microwave and Electronics AME
Рет қаралды 808
Inside the V3 Nazi Super Gun
19:52
Blue Paw Print
Рет қаралды 1,8 МЛН
SparkFun Coin Acceptor
6:18
SparkFun Electronics
Рет қаралды 162 М.
How to program an coin acceptor
6:45
The Creator
Рет қаралды 4,9 М.
Coin Acceptor or Coin Sensor Tutorial with arduino (GD-100F)
13:19
Визитка программиста
19:40
Александр Красников
Рет қаралды 222 М.
Connect your Arduino projects with a universal Coin Acceptor
14:11
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН