4 pin configuration of blue plastic coin hopper

hi...im really liittle trouble about the 4 pin configuration of this blue coin hopper..

i link the image below..i hope someone will help me.. :frowning:

https://www.google.com/search?tbm=isch&source=hp&biw=&bih=&ei=ombhW7jkLdiC-QbN67vwDg&btnG=Search&q=coin+hopper#imgrc=e9MQaqtMdZi0bM:

You need to provide a link to technical information about the coin hopper, not a link to an image.
At the very least you need to give the make and model number of the hopper so that people can search for a manual.

Looks like the DST (Da Sheng Technology Enterprise Co., Ltd.) "Blue Hopper" Model DJH-04

I can't find any information about the four pin connector.

I'd guess that one pin is the power supply and one pin is Ground. I'd check for continuity with the power wire to see which is which. I'm guessing that a third pin is used to clear a jam, possibly by rotating backwards. No guess for the fourth pin.

johnwasser:
Looks like the DST (Da Sheng Technology Enterprise Co., Ltd.) "Blue Hopper" Model DJH-04

Blue Hopper DJH-04 - Bill acceptor, Crane machine, Taiwan Horse, pinball, metal casion game cabinet Manufacturer Taiwan Da Sheng Technology DST

I can't find any information about the four pin connector.

I'd guess that one pin is the power supply and one pin is Ground. I'd check for continuity with the power wire to see which is which. I'm guessing that a third pin is used to clear a jam, possibly by rotating backwards. No guess for the fourth pin.

A hopper connoisseur, can you give the year?
Since you have identified the make and model the OP should either be able to find details of the connector or obtain them from the manufacturer. They would certainly sell a lot more if they provided more information.

hi..i need help about my coin hopper...it is still miss count the output of the coins..even though i put pull up resistor..i put resistor 1k..does it really need 10 k? and here's my code..

# define BOUNCE_DURATION 30;    //20 ms
# define SENSOR1 3


volatile int credit = 0;
volatile unsigned long bouncetime = 0;

int relay = 11;
void setup()
{
  Serial.begin(9600); // setup the serial port for communications with the host computer
  pinMode(SENSOR1, INPUT_PULLUP);
 pinMode(relay, OUTPUT);
  digitalWrite(relay, LOW);
  attachInterrupt (digitalPinToInterrupt(SENSOR1), ISR_count, CHANGE);

 }
 void ISR_count(){

  if(millis() > bouncetime){

    if(!digitalRead (SENSOR1)){
      
      
      credit++;
      Serial.println(credit);
    }

   
    
    bouncetime = millis() + BOUNCE_DURATION;
  }
  
}



void loop(){

   while(credit > 9){
      
  digitalWrite(relay, HIGH);
  
   }
    
}

Do your coins go so fast you need interrupts?? No they don't as you have a 30 ms debounce there, meaning it takes longer than 30 ms, and interrupts are a bad idea. Just poll the pin; debounce if you really need (probably not for a photo interrupter) and take a good look at the state change detection example.

Secondly: don't try to print to Serial (which uses interrupts) from an ISR. That won't work well.

hi....pls help me....i have no idea how to code this...i have blue coin hopper and mega arduino...i was thinking how to stop the coin hopper if no more coins coming out in the coin hopper...pls help me ty.. :frowning:

Exactly which one? Link? Datasheet?

There are a lot of blue ones.

Connect the green wire across from the left, to the red connector on the lower righ-hand side.
Guaranteed that will work once you get the code running.

MorganS:
Exactly which one? Link? Datasheet?

OP was asked for that here in mid-December and didn't reply:

Grumpy_Mike:
And a link to the data sheet of this hopper please.