How to use CH-926 Coin Acceptor with Arduino

  Рет қаралды 131,844

Mario's Ideas

Mario's Ideas

Күн бұрын

Пікірлер
@DGworksIvan
@DGworksIvan 2 жыл бұрын
i love how you explain the code layer by layers, really good teaching, thanks a lot
@marios_ideas
@marios_ideas Жыл бұрын
Thanks:) Sorry for a late reply. I just came around to answer all the messages from my viewers:)
@KuyaMagik
@KuyaMagik 8 ай бұрын
Can you help me program an arduino with my bill acceptor? TheTB74? is there a way to contact you
@marios_ideas
@marios_ideas 8 ай бұрын
To be able to help you with something like this I would have to have this module, and I don't . Also I looked at the spec. It is quite complex to set up any given currency. It will take a lot of time to figure this out and I have plenty other projects videos I commited to, and very limited time to deliver them:(
@georgijetanasic3357
@georgijetanasic3357 3 жыл бұрын
13:08 You put 2 euro inside, but the value increased by only 1. I have Arduino Uno and 16x2 LCD. I will order coin acceptor and try to make it. So, I have one question. I want to have GUI on touchscreen display. So do I need to connect Arduino to Raspberry or I can do everything with Raspberry(To connect coin acceptor directly to Raspberry)?
@marios_ideas
@marios_ideas 3 жыл бұрын
This is a wrap up footage,. At the beginning I had an issue which was fixed. And when I was selecting footage for the conclusion I chose it from a wrong file:) if you work with raspberry pie you should write the code for Rasbery pie. I unfortunately have no experience with that microcontroller
@KuyaMagik
@KuyaMagik 8 ай бұрын
Is there way to make a free play button with this type of coinslot?
@marios_ideas
@marios_ideas 8 ай бұрын
Just like the display to show the recignised coin value you can add any other that you want and program its logic, including buttons
@heno_3098
@heno_3098 3 жыл бұрын
An error occurred at time 13:10, after insetr 2€ coin the display shows adding value 1€. The question, then, is whether the Chinese validator is a scrap or is present a bug in the arduino program. I also don't like the fact that the response after inserting a coin after displaying the status takes too long ...
@marios_ideas
@marios_ideas 3 жыл бұрын
Well I think the coin acceptor is ok. I had rare issues when writing the initial code where a single impuls was resulting in runnig the interrupt function more then once . I realised that after filming the footage. This led me to introduce variable "i" to eliminate this. I reshot some of the footage after that change.I had this issues with interrupts on other projects. Now I cannot tell you if the use of "i" did not fully eliminate the error or I used the previously filmed footage that contain the error . Now , knowing more I would do it differently. I would use millis() inside of interrupt function to make sure there is proper time interval between impulses. I already used in my other videos. e.g. kzbin.info/www/bejne/b5KYomCueduNh9U go to 4:55
@heno_3098
@heno_3098 3 жыл бұрын
@@marios_ideas Therefore, I do not use sw arduino, but I write in assember directly. It is very fast and reliable. The point is to measure the time it takes for the finding how long pulse to last after the interrupt is triggered, as MCU can also find some short-term interference as a pulse and it has a short length of log0 (less than 90mS). Consequently, if the pulse (log0) lasts more than 90mS continuously, but a maximum of 110mS (according to the validator setting to 100mS length of one pulse), then the length is checked for how long it lasts (log1) and only then it is decided whether it is 1 pulse in this in the case of a € 1 coin or a further decrease to log0 continues and it will be 2 € 2 pulses, etc. Everything is decided no later than 110mS after the end of the last log0.
@marios_ideas
@marios_ideas 3 жыл бұрын
Heňo _ writing code in assembler is way over my head. Last time I did it back at the university which was a long time ago. I will probably do follow up videos where I wold use millisecond and put the coin acceptor to a test loading large number of coins in sequence to see if I can fix this problem , assuming that it is not the old video footage problem.
@heno_3098
@heno_3098 3 жыл бұрын
@@marios_ideas Long ago in Poland? I've never seen a university from the inside. I graduated from an apprentice high school under socialism in the Czechoslovak Socialist Republic. But these things were already a necessary basis at the time, perhaps then the demands declined.
@markdemasseur
@markdemasseur Жыл бұрын
Hi this coin acceptor doesnt keep credit for arcade machine. So when you press play then there will be used 1 credit and other credits keeping on the memory. Is it possible to make something with arduino a project like this.?
@laurentiujinga5558
@laurentiujinga5558 3 жыл бұрын
Thanks for the info on coin mechanism, exactly what I was looking for. 👌
@marios_ideas
@marios_ideas 3 жыл бұрын
I had some issues at the beginning . I did not use resistor or I had fast impulses chosen on the device. This error is in the wrap up where I used footage that still got an error without realizing . Thanks for subscribing
@laurentiujinga5558
@laurentiujinga5558 3 жыл бұрын
@@marios_ideas I have seen on another answer. Thanks
@alirezashirazifard8990
@alirezashirazifard8990 Жыл бұрын
This is the best video to watch for set up coin drop. Others are mute
@StreamMovieYT
@StreamMovieYT Жыл бұрын
Thx worked with HX 916 and i wanted to ask how you do the price so for example i have a flipper and when i press start it does -1€ but if its under it doesnt start pls do a tutorial thank you.
@MiguelHernandez-zv8ne
@MiguelHernandez-zv8ne Жыл бұрын
could you solve it? ... I also have the same model.
@jamalsaid7158
@jamalsaid7158 Жыл бұрын
@@MiguelHernandez-zv8ne yeah it worked I'll send the code when it's done and use it for Arduino it put it on the computer but it still not with start thing if we found a solution we will tell
@pierluigizagaria
@pierluigizagaria Жыл бұрын
Thank for the video, I have a question. If the board has built in pull-up resistor, there is no need for the external one right? How does the coin-acceptor signal work? Sends pulses of 5v?
@mtraxx
@mtraxx Жыл бұрын
Hi, Can this coin acceptor directly control the cy-822a type circuit?
@marios_ideas
@marios_ideas Жыл бұрын
I am sure you can but I do not have experience with CY-822a
@kurtiii
@kurtiii Жыл бұрын
thank you so much! I searched so long for a video like this!
@marios_ideas
@marios_ideas Жыл бұрын
You welcome:) Consider supporting my chanell.
@hudabert4074
@hudabert4074 Жыл бұрын
what the purpose of connecting 5v with the 10k ohm resistor to the coin pin in the D2 pin? isn't the coin pin alone will give the signal (voltage) when inserted coin is detected? please enlight me.
@henrylaredo
@henrylaredo 5 ай бұрын
thanks for the video, just one question, are you assuming the "i" variable inside "loop" function is incremented each 1 milisecond?
@marios_ideas
@marios_ideas 5 ай бұрын
This was just my way of making sure there is a break in between interrupt execution. At that stage I was not aware of millis function. Now I would replace the mechanism with i variable with using millis to check how many ms passed inbetween impulses
@semiplex9727
@semiplex9727 8 ай бұрын
Hello Mario, First, great Video! Thank you. I just brought this Coin Acceptor after I watched your Video and today I played around with it. I'm working on a Cady machine for Kids (ofc not for permanent usage. The Kids need to do different Task like collecting trash to get a Coin. It's for an event). So, I trained all my Coins and connected a LED between Ground and the Counter Pin, that was working as expected (Blink Whenever a Coin is inserted and also in different repetitions). But when I connected the LED to Ground and Coin Pin, it just turned the LED on even tho it's on Normally Close. I expected a Consistent Blinking like a Clock where I can Orientate the Counter Pin to. My plan was to use 2x optocoupler. I'm not new in Programming but I'm (very) new to electronic and to be Honest, I didn't understood that much when it came to connection. It seems like you connected the Coin Pin directly to the Arduino, in my Case it would Fry my ESP8266 or I am wrong (that's why I also wanna use optocoupler)? I don't understand, I hope someone can Explain me this in a way that every dummy will understand this.
@samzmann
@samzmann Жыл бұрын
Thx. Very useful video! Any idea how to disable the buzzer/beep that sounds when coins are accepted?
@erickroeger1161
@erickroeger1161 8 ай бұрын
I remember working on one of these but at the time there was something finicky about it (output value? i think cant remember this was years ago) anyhow had to solder wires to the 6 leds to get the correct feedback rather than detecting the usual impulses, i think its because the impulse were too slow when the user inserted coins quickly and therefore you get mixed of impulse. Like if I had a quarter that had 5 impulses but then I inserted another coin While those impulses were still sending out, I'd get higher amount of impulses. This additive feedback isn't practical for real world usage.
@NicodemusT
@NicodemusT 6 ай бұрын
Hey there, could you explain? I have 6 leeds, too - and most of them seem to carry 12v for some reason. I am also finding the pulses finicky.
@erickroeger1161
@erickroeger1161 6 ай бұрын
@@NicodemusTSo pules aren't at all reliable because they add on top of each other due to the fact that they're being measured by the m/s (or whatever); this is why, for example, when you insert a penny (1 pulse) and QUICKLY insert a nickle(2 pules) you end of with 3 pules as an output. Its a bad design because your essentially working with one variable when you need 6 distinguished variables for each coin. (idk about the 12v thing but) You'll can hackishly opt to detect the voltage change in the leds themselves by soldering a wire to the pads and use that to distinguish which coin was inserted. Mind that this was a long time ago I can't remember much working with Arduino but maybe I can dig up some links I found; if I can I'll post again later if i find them.
@Lennings82
@Lennings82 Жыл бұрын
seems like it counts quite odd if i put in coins too fast. Is it a way ti activate the coin reject between the coin inserts? so if I put it in to fast it will come out again.
@sploopvrdavao4631
@sploopvrdavao4631 11 ай бұрын
What is the difference between the COIN and COUNTER pin?
@mikawiemers8558
@mikawiemers8558 9 ай бұрын
I think that each accepted coin gives one pulse to COUNTER-pin, that can be connected to a coin counter (counts number of coins, not value) and the COIN-pin gives out the predetermined pulses per different coin inserted. Like in this video 2€ - 1 pulse, 1€ - 2 pulses, 0,50€ - 3 pulses etc. COIN-pin pulses are to determine how much money has been inserted and COUNTER-pin pulses how many coins have been inserted (not sure if it counts all coins or only accepted, probably only the accepted)
@msindisimtengwane9456
@msindisimtengwane9456 3 жыл бұрын
This was a great video man. Very detailed. Love it. Thank you for making it.
@marios_ideas
@marios_ideas 3 жыл бұрын
Glad you liked it!
@fabi_0202
@fabi_0202 7 ай бұрын
Good video! But my coin acceptor beeps with every pulse when a coin is inserted. Is there any way to disable this?
@reamonlinnabary9749
@reamonlinnabary9749 3 жыл бұрын
Great video!!! It is very helpful, especially since the box doesn't come with any instructions. Thank you!!!
@marios_ideas
@marios_ideas 3 жыл бұрын
Thanks for watching!
@Lennings82
@Lennings82 Жыл бұрын
hi.. are trying to get this to work. but if i the setup running for some time i can see that it self trigger on the coin puls. is there a way to fix this??
@gadfay8463
@gadfay8463 Жыл бұрын
We should add an Eprom (external) ? What happen exactly after 100000 times ?
@rohamtavakkoli7562
@rohamtavakkoli7562 Жыл бұрын
Very informative. Do you know if the acceptor outputs RS232? The manual mentions that it does, but I'm not sure if external hardware (a conversion board maybe) is needed if an Arduino is not used
@marios_ideas
@marios_ideas Жыл бұрын
I cannot really comment on that
@khunden
@khunden 3 жыл бұрын
What is the logic of the counter pin on the coin acceptor? Is it a logic high and drops to logic low when a coin is accepted?
@marios_ideas
@marios_ideas 3 жыл бұрын
This is a GREAT question. When I was researching this topic I couldn’t find anything and Chinese instruction I got was useless. Maybe someone can chip in here:)?
@asllovett5208
@asllovett5208 Жыл бұрын
I tried programming my coin acceptor and did all that you say but after the programming, the LED displays from E to 0 instantly. I wasn't able to turn off the coin acceptor when the display is at E. What happened here?
@youssefyoussef2517
@youssefyoussef2517 Жыл бұрын
I have the same in a beverage dispenser but when I unplug the dispenser, I have to redo the configuration from the beginning, will you have a solution? THANKS
@iam726246
@iam726246 2 жыл бұрын
when it arrives at the price of the product, how to activate a relay so that it delivers the product? And in case you want to add a hopper to deliver change, what would a code example look like?
@marios_ideas
@marios_ideas 2 жыл бұрын
This is a hobby for me. And you probably are seeking a comercial use. Did not use hoppers so cannot really help here.
@nithinchandran3807
@nithinchandran3807 2 жыл бұрын
Broo can you include a vending moter also into the circuit, so that for a particular fixed total value , the arduino will trigger the vending moter and reset the total value for next count. Can u give code and circuit Diagram for that , it will be so helpful.
@boiyfact4918
@boiyfact4918 Жыл бұрын
Sir i want to contact you . Please. I want help in a project
@peacerobertozitha3008
@peacerobertozitha3008 11 ай бұрын
Do you think it would be possible for me to add PS4 controllers to a 5V relay module and code the esp32 that each time the Coin collector recieves a R5 coin (ZAR) it switches the PS4 controllers on for 10 minutes ?
@semiplex9727
@semiplex9727 8 ай бұрын
I don't think this will be a Problem, whenever a R5 Coin is detected, open the Relay for 10 Minutes.
@gadfay8463
@gadfay8463 Жыл бұрын
Hi friend! Sensitivity? What is it exactly? How you can set it for 10 cents ( for exemple). Thanks
@johannesrose7324
@johannesrose7324 3 жыл бұрын
What can you do with the outputs NC and NO? Can the device also count itself and e.g. only give a signal after $ 7 has been inserted? So without an external evaluation?
@marios_ideas
@marios_ideas 3 жыл бұрын
The device just recognises coins and output the defined number of impulses per each coin. Does not have any more built in logic. Any additional behaviour has to be coded, like counting the total, reacting to any particular amunt entered etc
@EC-TPavithiravalavan
@EC-TPavithiravalavan Жыл бұрын
Really a great video. Greatly explained 👍
@marios_ideas
@marios_ideas Жыл бұрын
Thanks:) Consider supporting my channel:)
@fuoto
@fuoto 2 жыл бұрын
The guide looks perfect. I just don't know how to program if one button on vending is pressed then the program should indemnify the amount specified. What if I have 2 different buttons. Every button should indemnify a different amount. And if there is not enough money machine should not do anything. Please help.
@marios_ideas
@marios_ideas 2 жыл бұрын
Well. I cannot write the code for you. You need to introduce one or multiple buttons and write the code for them.
@spacegoogie
@spacegoogie Жыл бұрын
My unit will at random & automatically deposit coins into my pinball cab. and I can't figure out why. All my stuff is wired up correctly. Anyone have any input on this for me?
@lisserkc6000
@lisserkc6000 Жыл бұрын
Mine lets some coins trough without it actually seeing the coin, it even does this when the power is out. Do you maybe know how to fix this?
@marios_ideas
@marios_ideas Жыл бұрын
You mean it goes through like it was recognised and is not returned in the return slot.? In this case it seems to me that there is a problem with your acceptor
@patrycjaferuga9783
@patrycjaferuga9783 Жыл бұрын
Czy dałoby się zaprogramować to jakoś, aby przyjmował złotówki? albo jest może jakiś zamiennik CH-926 który przyjmuje złotówki?
@marios_ideas
@marios_ideas Жыл бұрын
Czy aby na pewno obejrzałas cały ten film?:) Tam jest cała procedura uczenia tego urządzenia rozpoznawania monet. Jakie to są monety to nie ma znaczenia
@GorkemYildirim
@GorkemYildirim 4 жыл бұрын
Nice one. I haven't seen this before. Thanks for your efforts.
@marios_ideas
@marios_ideas 4 жыл бұрын
I am glad you enjoyed it:)
@GorkemYildirim
@GorkemYildirim 4 жыл бұрын
@@marios_ideas subscribed
@marios_ideas
@marios_ideas 4 жыл бұрын
@@GorkemYildirim Thank you
@smappdooda
@smappdooda 2 жыл бұрын
What voltage does the unit pulse when a coin is inserted? 12v or 5v?
@marios_ideas
@marios_ideas 2 жыл бұрын
5v
@Rippafratta
@Rippafratta 5 ай бұрын
@@marios_ideas I know I'm late: 5 Volts because of the resistor? So, without resistor it would be 12 Volts, right?
@marios_ideas
@marios_ideas 5 ай бұрын
@@Rippafratta No I think it is 5v as there are no 12v microcontrollers . The device requires 12v to work but the signal pin has 5v
@gloryvidalr3313
@gloryvidalr3313 2 жыл бұрын
How do I put the price so that it adds up the coins and can be used? I mean, when add coins and get enough to play. How to define it?
@ClbnaVGM
@ClbnaVGM 2 жыл бұрын
Do you know how to connect it to those cheap "zero lag" usb encoder please ?
@marios_ideas
@marios_ideas 2 жыл бұрын
What would be the role of that encoder? Send me the link to that part webpage
@ClbnaVGM
@ClbnaVGM 2 жыл бұрын
@@marios_ideas It's pretty generic so I wont be able to find a webpage. Here's a video however : kzbin.info/www/bejne/jYLLZKuoicRnbaM This board/encoder receives impulses from on/off microswitches (arcade buttons). My goal is to put the coin acceptor into a diy Raspberry Pi Arcade Cabinet.
@fuaduddin1811
@fuaduddin1811 3 жыл бұрын
Can someone suggest a coin operated smart plug solution? Would like to make a washing machine coin operated using a smart plug.
@alexherrera7568
@alexherrera7568 Жыл бұрын
Is it possible to replace it with an 16x2 LCD? thank you
@marios_ideas
@marios_ideas Жыл бұрын
The choice of the display is entirely up to you. The display is for outputing the number . You can also use oled displays e.g like in other project of mine kzbin.info/www/bejne/qZaneGZjlt-Xjq8
@alexherrera7568
@alexherrera7568 Жыл бұрын
@@marios_ideas how it would change the code?
@marios_ideas
@marios_ideas Жыл бұрын
I can't write the code for you:) @@alexherrera7568 You can find the tutorials on how to use LCD displays. It is really not that complicated.
@honelicious127
@honelicious127 4 жыл бұрын
how we can add a digital pin to trigger the added relay to turn off when the time is zero? ty
@marios_ideas
@marios_ideas 4 жыл бұрын
Not sure I understand. What time are you talking about.
@honelicious127
@honelicious127 4 жыл бұрын
@@marios_ideas i mean add some relay to trigger when time is end. Please
@MrWolftamer
@MrWolftamer 2 жыл бұрын
Thank you very very much! I now know how to program! Instructions that came with mine were very vague.
@marios_ideas
@marios_ideas Жыл бұрын
My pleasure:) like the video and subscribe to my channal. Also consider supporting it.
@Apothyxis
@Apothyxis Жыл бұрын
How would I set impulse if I want two of the same coin to equal one credit?
@marios_ideas
@marios_ideas Жыл бұрын
The impulses are for recognising the coin. How would the coin be calculated into credits is configured in the code.
@knerduno5942
@knerduno5942 3 жыл бұрын
I am revisiting this project after realizing the Arduino is just too slow in response. Even upping the BAUD rate did not help. If you insert the coins in too fast it throws the application way off, and cannot recover. With that, I looked for something faster. I decided to try an ESP32. So looking even closer at your code and the diagram, I have and issue now maybe you can help with. I see you are using Digital Pin 2 connected to 5 volts, 10k resistor, and to the coin accepter. Looking at the code, I see nothing in there checking for pulses on Pin 2. How is the code getting the pulses?
@marios_ideas
@marios_ideas 3 жыл бұрын
I am using interrupts in the code. Arduino nano and uno have 2 pins with interrupt functionality D2 and D3. You would need to check my tutorial kzbin.info/www/bejne/oX7Xg6CgbqmGaKs but also this is mentioned in the coin acceptor tutorial as well
@Jandroverse
@Jandroverse Жыл бұрын
Nice project however, you will overflow "i" after a certain period of time when no one is using the machine. it would work fine just by adding if(i>=50){ i=0; }; add that at the end of the loop and it will eliminate your problem.
@marios_ideas
@marios_ideas Жыл бұрын
Well i didn’t know much about anything then :) i i actually not needed. I t would be much better to use millis function instead to measure the delay
@Jandroverse
@Jandroverse Жыл бұрын
@@marios_ideas yep…that was going to be my other suggestion. Either way great project and very good explanation!
@lyricalworld360
@lyricalworld360 3 жыл бұрын
Any idea about coin acceptor with timer control Please help ❤️
@GenreFluid
@GenreFluid 3 жыл бұрын
Would I still need an audino with a raspberry pi 400
@GenreFluid
@GenreFluid 3 жыл бұрын
I want to make my raspberry pi 400 coin-op boot so I have to earn pocket money to run it
@marios_ideas
@marios_ideas 3 жыл бұрын
Rasbery pi is different type of controller so you do not need Arduino but also my code would not work on Rasbery pi. You can apply the concept but I presume you have to write whole new code for rasbery pi. I have never worked with those controllers so cannot really help
@BasitMirzaChannel
@BasitMirzaChannel 5 ай бұрын
Hi. Can you program for me for a weight machine kindly?
@ChinoBuchonMX
@ChinoBuchonMX 4 жыл бұрын
This video is amazing, outstanding work and very good code, congratulations man
@marios_ideas
@marios_ideas 4 жыл бұрын
Thank you:)
@boutrazaata2714
@boutrazaata2714 4 жыл бұрын
Arduino UNO R3 will it also be compatible with your set-up
@marios_ideas
@marios_ideas 4 жыл бұрын
Yes
@boutrazaata2714
@boutrazaata2714 4 жыл бұрын
@@marios_ideas I'll give it a shot (Thank you)
@knerduno5942
@knerduno5942 4 жыл бұрын
I finally got all the parts and have it all assembled. Now in the Arduino code, I see there are five different libraries to pick from. You did not mention which one you are using.
@marios_ideas
@marios_ideas 4 жыл бұрын
In the code at the top I have following library declaration #include #include #include
@knerduno5942
@knerduno5942 4 жыл бұрын
@@marios_ideas Yes, but in the Arduino IDE, there are five different libraries. Using the search for TM1637, it shows five and turned out to be #3 in the shown choices.
@marios_ideas
@marios_ideas 4 жыл бұрын
@@knerduno5942 Check my video kzbin.info/www/bejne/fXm5fpWbm92Nqpo where I show which one I installed
@knerduno5942
@knerduno5942 4 жыл бұрын
@@marios_ideas thank you kindly
@knerduno5942
@knerduno5942 4 жыл бұрын
@@marios_ideas I think a good followup video to this would be using C# or C++ to get the data from the serial port while the Adruino is still connected, and displaying the data in an application
@gennarogrosso2103
@gennarogrosso2103 3 жыл бұрын
Hi, I would like to be able to program the coin operated 616, similar to 926, inserting 3 coins from € 0.50 Send a single impulse, is it possible? Thank you.
@gennarogrosso2103
@gennarogrosso2103 3 жыл бұрын
Hi, I would like to be able to program the coin operated 616, similar to 926, inserting 3 coins from € 0.50 Send a single impulse, is it possible? Thank you.
@marios_ideas
@marios_ideas 3 жыл бұрын
Do not fully understand the post. “3 coins from € 50”?
@gennarogrosso2103
@gennarogrosso2103 3 жыл бұрын
I explain myself better: By entering 1 coin from 2 € Scheduled for a coin for a single impulse. I would like to get a single pulse cumulating insertion of 2 coins from 1 €. it's possible? I can not do it. Thanks for your help.
@marios_ideas
@marios_ideas 3 жыл бұрын
@@gennarogrosso2103 one tyle of coin has a definiendum number of impulses. Yo can program it for 1 Eur to have one impuls or more . It aloes you to program up to 8 coin types
@gennarogrosso2103
@gennarogrosso2103 3 жыл бұрын
@@marios_ideas May I cannot explain to me. Help me please. I have a small moon park, a game measures the strength by pulling a fist, every game on the game costs € 2. The programming is done so, I would like to get the same thing if in the coin holder they introduce 2 coins from 1 €, making the sum, 1 € + 1 € = 2 €, I should get a single pulse or, just one fist to measure strength. I am looking for confidence.
@Nico-pb1sr
@Nico-pb1sr Жыл бұрын
Where is the arduino receiving power from?
@marios_ideas
@marios_ideas Жыл бұрын
In the video if I am not mistaken I was powering Arduino from USB port of the PC or from the powerbank. However if you want to have a single power supply then you need 12 powere supply which powers the con acceptor but also connects to VIN and GND pins of Arduino. VIN pin is regulated down to 5V. Caution. Do not connect 12V to 5V pin as this will positively fry the microcontroller.
@Nico-pb1sr
@Nico-pb1sr Жыл бұрын
@@marios_ideas doesn't the coin acceptor have a current spike when a coin goes in? Will this affect the Arduino if on the same power supply?
@laohanme7281
@laohanme7281 3 жыл бұрын
why my incomingImpuls always keep increasing without any coin insert?
@marios_ideas
@marios_ideas 3 жыл бұрын
Your device may be faulty. What do you mean by increasing?
@mihaislabutu8146
@mihaislabutu8146 Ай бұрын
Hi guys, can someone please help me? I have this coffee machine, and I want to install a coin acceptor to collect coins for every beverage it produces, but I'm having a hard time trying to understand how to program the coin acceptor to unlock that certain beverage selected. For example, I want to insert 1 coin for a beverage, and by that way, when I select the beverage I want, it will ask for that 1 coin to be inserted to allow for the beverage to me made. I feel like something is mission from this equation.
@feendios5772
@feendios5772 Ай бұрын
You need an arduino uno
@feendios5772
@feendios5772 Ай бұрын
For do that you need microcontroller or arduino takes one and program it
@jamalsaid7158
@jamalsaid7158 Жыл бұрын
Finally a good video
@marios_ideas
@marios_ideas Жыл бұрын
Thank you:)
@jamalsaid7158
@jamalsaid7158 6 ай бұрын
​Btw how can I get the 3d printed plate? been searching on STL finder and found nothing​@@marios_ideas
@sklepa
@sklepa 4 жыл бұрын
Dzięki za film, fajnie wszystko objaśnione. Mam tylko taką zagwozdkę: zakładamy że licznik "i" zwiększa się o jeden w każdej pętli, i do póki w pętli nie ma nic innego niż zliczanie monet to jest ok. Później jeżeli dołożymy więcej kodu typu obsługa komunikacji i jakichś peryferii, pętla zacznie zwalniać i mogą pojawić się problemy. Czy dobrze rozumuję?
@marios_ideas
@marios_ideas 4 жыл бұрын
Masz absolutną rację. Niestety uczę się na bieżąco. Zmienna I wykorzystywana byla do zbudowania stworzenia ok 300ms przerwy które mowi nam ze to juz koniec impulsów i można rozpoznać monete. Jesli sprawdzisz moje ostatnie filmy to bedziesz widzial te o wykorzystaniu millis. I tu jest wlasnie idelane zastosowanie. Zmienna i i liczenie do 300 powinno byc zastapione funkcja millis. Czyli wrzucamy monete. Zapamietujemy czas i ponownie sprawdzamy czas z millis w petli i jesli bedzie wiecej niż umowne 300ms to moneta jest rozpoznana
@sklepa
@sklepa 4 жыл бұрын
@@marios_ideas I tak też bym to rozwiązał :) też jestem amatorem, tak tylko mówię. Pozdrawiam!
@marios_ideas
@marios_ideas 4 жыл бұрын
@@sklepa Sam fakt ze robilem te filmy o millis pokazuje ze tez dręczyło mnie take zastępcze rozwiazanie. Jak zerkniesz na film o nastawianiu alarmu w budziku tam tez jeszcze nie stosowalem millis:( I teraz bym to chetnie poprawil.
@GeekBoy03
@GeekBoy03 4 жыл бұрын
What is the purpose of the 10k resistor?
@marios_ideas
@marios_ideas 4 жыл бұрын
From my video you probably got the idea that I come from the IT background and I learn electronics as I go. When I got this coin acceptor I checked online how other connected it and quite a few diagrams I got had that resistor. Since I didin't have a datasheet as such for this part I conencted it through this resistor and it worked. I am not sure if it is needed but didn't want to risk destroing the part I waited one month to arrive:)
@GeekBoy03
@GeekBoy03 4 жыл бұрын
@@marios_ideas Thanks for the response. I have the 8 coin version. I had also bought a special device which converts the pulses to serial hexidecimal, but it seems to be a bit over complicated, and lacking the ability to connect the coin counter. This Adruino nano makes it a much better choice (and cheaper). Thanks for putting this up.
@TheEPROM9
@TheEPROM9 3 жыл бұрын
Handy, was able to set up main as the instructions that come with it are about as clear as mud.
@marios_ideas
@marios_ideas 3 жыл бұрын
Glad my video was helpful
@robbiezxc
@robbiezxc 4 жыл бұрын
Hi can you please show how to add a function to the code so something can happen at a certain amount of money like when you have put €2 in an led could light for a set period of time and then turn off but repeats when the next to €2 value was put in thanks 😀
@marios_ideas
@marios_ideas 4 жыл бұрын
Connect LED e.g. to PIN6 #define LED 6 In Setup pinMode(LED, OUTPUT); digitalWrite(LED,LOW); And then in Loop function if(total_amount==2){ digitalWrite(LED,HIGH) You can connect anthing to this pin. E.g. magnetic lock.
@robbiezxc
@robbiezxc 4 жыл бұрын
@@marios_ideas one more thing if you don't mind how do I get the light to stay on for 5 minutes and then turn off but turn back on again once another €2 has been entered
@marios_ideas
@marios_ideas 4 жыл бұрын
@@robbiezxc I will put short code for you tomorrow
@robbiezxc
@robbiezxc 4 жыл бұрын
@@marios_ideas thanks I'll send you a tip when I get payed
@marios_ideas
@marios_ideas 4 жыл бұрын
The code using millis function which return number of milliseconds that passed since the program was started. I have a separate tutorial on this. #define LED 6 long Timestamp_2EUR=0; // records time when 2EUR was reached In Setup pinMode(LED, OUTPUT); digitalWrite(LED,LOW); And then in Loop function if(total_amount==2){ digitalWrite(LED,HIGH) if (Timestamp_2EUR==0) time_past=millis(); // if Timestamp_2EUR is 0 means we just reached 2EUR so we record the timestamp // if it is yet another loop run with 2eur reached Timestamp_2EUR is not changed } if (millis()-time_past>300000){ // 300000ms is 5min. We check if the 5 min was exceeded digitalWrite(LED,LOW) // LED off total_amount==0 //reset the balance
@osamasegh8737
@osamasegh8737 4 жыл бұрын
Thank you so much for this video, it is great. You helped me a lot to understand the code. Good Continuation ...
@marios_ideas
@marios_ideas 4 жыл бұрын
Thanks. I will be doing more tutorials in the future. If you want to check them out, subscribe to my channel:)
@osamasegh8737
@osamasegh8737 4 жыл бұрын
@@marios_ideas I'm already subsecribed ... You have a simple and fluent method to explain ... I will fellow your works to learn more about arduino programing ... Best Regards.
@arshathossain8061
@arshathossain8061 3 жыл бұрын
Same 2 coin use to 1 puls, is it possible
@marios_ideas
@marios_ideas 3 жыл бұрын
Generally it is possible in two cases: First one is if your code is not properly counting impulses. In my code I assumed the impulses are lass then 30ms apart if I am not mistaken , if your device has a different interval. Some have even a switch to control that interval. Fast midum and slow. If code does not correspond to the actual device setup then you can imagine two impulses are interpreted as one. The other case maybe if the learning process was not properly performed e.g you did not use the right sample amount or cheated the process by using the same coin over and over again and you have coin types that are similar. Then the device maybe confusing the types.
@AFerreira1977
@AFerreira1977 3 жыл бұрын
Olá. Dado que já ando um pouco perdido e desesperado...venho pedir aos entendidos na matéria, solução para instalar corretamente este moedeiro de arcade (JY - 926), com correspondente ligação à placa “Zero delay”. Consigo configurar moedas, contigo, não consigo que adicione créditos (não dá pulso). Eternamente grato! Muito obrigado 🍺
@alperduran55
@alperduran55 4 жыл бұрын
Does this work with LCD DIsplay I2C Module ?
@marios_ideas
@marios_ideas 4 жыл бұрын
The dopłat is used just to display the total. Any display can be used but the code would need to be adjusted. I have not used LCD in the past but i do’t imaginacji this would be complicated. Just a change to few lines of code
@alperduran55
@alperduran55 4 жыл бұрын
@@marios_ideas So u couldnt help me to change these few lines of code :(
@marios_ideas
@marios_ideas 4 жыл бұрын
Optimus Prime I would need to first get my hands on LCD display. And play with it
@alperduran55
@alperduran55 4 жыл бұрын
@@marios_ideas okay, but thanks for your answers
@marios_ideas
@marios_ideas 4 жыл бұрын
Connectity like here: howtomechatronics.com/tutorials/arduino/lcd-tutorial/ You do not have to connect potentiometer Then in code: #include // includes the LiquidCrystal Library LiquidCrystal lcd(1, 2, 4, 5, 6, 7); // Creates an LC object. Parameters: (rs, enable, d4, d5, d6, d7) in setup function lcd.begin(16,2); // Initializes the interface to the LCD screen, and specifies the dimensions (width and height) of the display } And the replace if(total_amount
@skostasx
@skostasx 10 ай бұрын
bu güzel videonuz için teşekkür ederim.
@wanzn471
@wanzn471 7 ай бұрын
please make another adruino coin acceptor video with real life aplication , like controlling kids toy car or anything that based on timer countdown
@richardgarcia5926
@richardgarcia5926 4 жыл бұрын
Can you do a coin counter using a coin hopper?
@marios_ideas
@marios_ideas 4 жыл бұрын
Is this the device where you have different slot sizes through which coin drops and this way it gets recognised? I have many projects already planned so even if I will look into this one it will not be in immediate future
@marios_ideas
@marios_ideas 4 жыл бұрын
Aaaa .. just checked what the coin hopper is. Cool looking device. I will do some research. Currently I have no revenue from this channel so I am scaling down on new items bought. But in the future I may look into it.
@carlosbasques4278
@carlosbasques4278 2 жыл бұрын
Hi. Congratulations for this video. It's possible do convert coin input to rest api? I would like to create a digital wallet to my child.
@GusNando
@GusNando 3 жыл бұрын
Thank you, it's very helpful 😁
@marios_ideas
@marios_ideas 3 жыл бұрын
Give it a like if you liked it and found it useful. Would mean a lot to me
@user-be6ls6ox3e
@user-be6ls6ox3e 10 ай бұрын
please i need the fisrt library in the code
@marios_ideas
@marios_ideas 10 ай бұрын
Which library?
@PawanKumar-ct9qe
@PawanKumar-ct9qe 4 ай бұрын
Great video Can you let me know where i can bough thei coin acceptor
@marios_ideas
@marios_ideas 4 ай бұрын
On Aliexpress. Sample link pl.aliexpress.com/item/1005006080235293.html
@othall9949
@othall9949 Жыл бұрын
Mario i love this idea, i have a project that i would love your help on if you're interested, it involves the coin acceptor you're working with
@danielmiller5967
@danielmiller5967 3 жыл бұрын
At the sampling phase my coins are not recognized. Can anyone help?
@jbm168
@jbm168 2 жыл бұрын
Hello and thank you for your explanations. How can we do a total reset please? Thanks in advance
@marios_ideas
@marios_ideas 2 жыл бұрын
By starting a new setup you reset all previous settings
@和氣-p2x
@和氣-p2x 3 жыл бұрын
When the coin is inserted too fast, an error occurs and cannot be judged
@marios_ideas
@marios_ideas 3 жыл бұрын
I did not experience this. This can be an issue with amount of samples when calibrating the device
@knerduno5942
@knerduno5942 3 жыл бұрын
After a hiatus, I have come back on working on this. I just recopied the code, and readjusted the pulse counts and total amounts to reflect my needs. i.e. if (i>=30 and impulsCount==2){ total_amount=total_amount+2; Looking at the serial monitor, I can see the total pulses being counted, but the variable "total_amount" is constantly staying "NaN" even before a coin has been inserted, though I do see you have total_amount already set to 0. This means the display goes to 0 when turned on, and never changes from 0. Any ideas on this?
@marios_ideas
@marios_ideas 3 жыл бұрын
Sorry for a late response but I was skiing this week. Before I can answer you have to clarify. Not sure what you mean by "NaN" This is an float type so it should always have a numerical value. And I do set the initial value to 0 ., so this seems strange to me.
@knerduno5942
@knerduno5942 3 жыл бұрын
@@marios_ideas Hope you had a good time skiing. NaN is a response from the program, or computer meaning "Not a Number."
@knerduno5942
@knerduno5942 3 жыл бұрын
@@marios_ideas Someone in software development shoudl know about "NaN" when the system returns that as a value, or lack of. Here is a line of output from the serial console after just starting the application" i=533 Impulses:0 Total:nan
@solomizan
@solomizan 4 жыл бұрын
Thanks! It helped me a lot.
@marios_ideas
@marios_ideas 4 жыл бұрын
Glad you found it useful:)
@ishackfrg5227
@ishackfrg5227 4 жыл бұрын
Sir pls kindly do one video how to connect coin acceptor controll box in to auotomatic front and top load washing machine (how to set with coin acceptor)🙏
@marios_ideas
@marios_ideas 4 жыл бұрын
Weel. you overrate my skills. I would be able to build a simple vending machine but hacking into existing washing machine to introduce coin acceptor is much more complicated
@MSIUser2012
@MSIUser2012 3 жыл бұрын
I am not sure what exact functionality you want in this control box, but a simple idea that can make integrating this coin acceptor with an automatic washing machine. - You can use a relay module with the Arduino and coin acceptor to turn on the washing machine. For example, to use the machine, user must insert 50 cents in the coin acceptor. Once the coin is inserted and it is equal to 50 cents, then the relay is triggered and the washing machine is turned on for an specific amount of time. After that time passes, the washing machine will automatically turn off and the coin acceptor will reset the amount to ZERO. Again, this is just a simple idea and I haven't tried it practically. But I hope it would help.
@nestormarcelovenece5091
@nestormarcelovenece5091 3 жыл бұрын
Very good work
@marios_ideas
@marios_ideas 3 жыл бұрын
give it a like if you enjoyed it:)
@mdrashadrashad8357
@mdrashadrashad8357 3 жыл бұрын
My machine is jammed, coin not gat in??
@marios_ideas
@marios_ideas 3 жыл бұрын
It must be mechanical problem which I cannot help you with. In unconnected state the coins pass through with no problem
@rcvtv3858
@rcvtv3858 2 жыл бұрын
Good day sir can you make tutorials on how to change price in the arduino vendo machine using buttons? God bless ang keep safe always!
@akshaymane9027
@akshaymane9027 4 жыл бұрын
Sir make a video on coin based water dispenser system👉👉👉
@marios_ideas
@marios_ideas 4 жыл бұрын
I will be doing a wideo to control water pump to water flowers. As to water dispenser I can give you few guidelines. You can get cheap 5v water pumps on Aliexpress pl.aliexpress.com/item/32850821465.html You connect it to GND and the pin you want to control it with. When coin acceptor receives defined amount of coins you recognise it in the code and send the high signal to the water pump pin. You keep it High for as long as you have to to fill the water cup
@elektroaqua7630
@elektroaqua7630 4 жыл бұрын
Good job
@marios_ideas
@marios_ideas 4 жыл бұрын
Thanks:)
@promediag
@promediag Жыл бұрын
I just need to learn this
@LexGoPH
@LexGoPH 3 жыл бұрын
in the in the incomingImpuls function shouldn't there be a "i = 0" above "impulsCount=impulsCount+1" too? that way, it doesnt read the first impulse as only 1 and add the value you set for 1 impulse?
@marios_ideas
@marios_ideas 3 жыл бұрын
This is one major problem with this code. When I was writing it I was not yet familiar with millis function. The use of i variable is a workarund . each time impuls is detected we reset i to 0 in the interrupt function. Then i gets incremented in the loop function. If we have multiple incoming impulses they are close apart. Inbetween each impuls the loop function is executed less then 30 times and we keep increase impulse count. If all impulsess I read then Loop gets executed more then 30 times and then we know there are no more impulses and then we can positivly finish coin recognition process. If I used millis I can meassure the exact interval between impulses and this way I would not need I variable at all.
@4x4Tobi
@4x4Tobi 3 жыл бұрын
@@marios_ideas do we know the cycle time of your Arduino to get a feeling what these 30 times trough the loop stands for or even better do we know the exact interval time between impulses by now?
@marios_ideas
@marios_ideas 3 жыл бұрын
​@@4x4Tobi When I was creating this video I was not familiar with Millis function. This can replace this whole thing with counting cycles. Check my millies tutorial and you can then check the video I created for Eggtimer where I use millies in the interrupt functions to make sure I am not reacting to a single button press twice. This is the same concept I would use in corrected coin acceptor code if I was writing it now. I will be creating some Q&A videos and I may include it in it providing corrected code.
@smert_okupantam
@smert_okupantam Жыл бұрын
10:42 why in the world total_amount is a floating point variable!? at which unholy point the amount turns into non integer ? why two other variable are "int" when they shold be "unsighned int" ? and variable "i" and "impulsCount" must be both declared as "volatile". Mario, you are such newbie.
@marios_ideas
@marios_ideas Жыл бұрын
I hear you... mind you this video is 3 years old and 3,5years ago I did not know what Arduino was. I learn as I go. Apart from the mistakes you pointed , using "i" variable to make sure the impulses are measured in a proper way is a complete disaster. I should have used millis instead. I would need one explanation from you though. Can you let me know why I and ImpulsCount need to be declared as volatile. Did not use that before so would be great if you could share some info on this
@smert_okupantam
@smert_okupantam Жыл бұрын
@@marios_ideas variables which used within an interrups funktion schould be declared as volatile, because they may be removed by optimisator
@marios_ideas
@marios_ideas Жыл бұрын
Does it matter that they are also used in the main code
@smert_okupantam
@smert_okupantam Жыл бұрын
@@marios_ideas yes, but you are not a newbie any more, so should do how it is right to give your visitor good learning
@steamplay29
@steamplay29 4 жыл бұрын
Fajny filmik :)
@marios_ideas
@marios_ideas 4 жыл бұрын
Dzięki:)
@chandandas2041
@chandandas2041 3 жыл бұрын
Awesome
@marios_ideas
@marios_ideas 3 жыл бұрын
Give it a like if you enjoyed it
@Striyka
@Striyka 3 жыл бұрын
Brilliant
@marios_ideas
@marios_ideas 3 жыл бұрын
Give video a like if you liked it:)
@simpasmarykimberly.2874
@simpasmarykimberly.2874 2 жыл бұрын
can I have the components please? thank you :)
@marios_ideas
@marios_ideas 2 жыл бұрын
All info is in the description . Go to the code link.
@Nkanyiso94
@Nkanyiso94 2 жыл бұрын
Hi I have 2 questions 1)Can I add a servo motor? 2)Does coin acceptor work with Arduino UNO?
@marios_ideas
@marios_ideas 2 жыл бұрын
Yes and Yes:)
@Nkanyiso94
@Nkanyiso94 2 жыл бұрын
Can we chat privately via email, I'm struggling with programming functions. I would really appreciate your collaboration 🙏
@abeltiguaavellan1156
@abeltiguaavellan1156 7 ай бұрын
link is down
@troymcdonald
@troymcdonald Жыл бұрын
Thanks
@khellafsamy
@khellafsamy 3 жыл бұрын
THANK U
@marios_ideas
@marios_ideas 3 жыл бұрын
You are welcome
@romekatomek2159
@romekatomek2159 4 жыл бұрын
zainstaluj fizyczną blokadę po wrzuceniu monety "zasówka / zaślepka " - nie będziesz miał monet wrzuconych "so far"
@marios_ideas
@marios_ideas 4 жыл бұрын
Nie wiem czy rozumiem. Wyjasnisz? Jesli wrzucam do pewnej kwoty to chce dorzucac kolejne monety i je zliczac
@beverlyligutom7223
@beverlyligutom7223 2 жыл бұрын
Magkano po yan sir
@marios_ideas
@marios_ideas 2 жыл бұрын
11USD
DIY Coin box with  coin counter with ARDUINO
14:51
AlexGyver
Рет қаралды 2,5 МЛН
Induction Coin Selector with Arduino
12:57
Electronoobs
Рет қаралды 40 М.
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН
Hilarious FAKE TONGUE Prank by WEDNESDAY😏🖤
0:39
La La Life Shorts
Рет қаралды 44 МЛН
"Идеальное" преступление
0:39
Кик Брейнс
Рет қаралды 1,4 МЛН
Coin Acceptor or Coin Sensor Tutorial with arduino (GD-100F)
13:19
How to setup coin acceptor on raspberry pi retropie
11:24
eldon226
Рет қаралды 115 М.
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
Deconstructed - The Coin Changer - How It Works
3:30
Gordon Tendick
Рет қаралды 156 М.
How to program an coin acceptor
6:45
The Creator
Рет қаралды 4,8 М.
I Accidentally Bought the New Arduino UNO R4 (And It's INSANE)
5:15
Connect your Arduino projects with a universal Coin Acceptor
14:11
Venduino, Arduino Vending Machine
7:53
RetroBuiltGames
Рет қаралды 507 М.
RFID Locks are way too easy to "Hack"! Let me show you!
11:41
GreatScott!
Рет қаралды 1,3 МЛН
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН