Connect with us

I'm back - a new circuit for the mini-golf course

Discussion in 'General Electronics Discussion' started by Lance Mannion, Jun 20, 2014.

Scroll to continue with content
  1. Lance Mannion

    Lance Mannion

    37
    2
    Jun 9, 2014
    For those of you who helped me with the sensor project for my friend's mini golf course, a new project has arisen :) My sensor worked fine and everything was cool - then an electrician accidentally fried the boards on the 19th holes and now the alarms in the clubhouse no longer work :( This stuff was installed many years ago. There is no documentation and no one to contact who knows anything about it. I told my friend that he should consider something new and SIMPLE.

    So here's the new project. His requirement is that once the golf ball passes the sensor, an alarm would be triggered in the clubhouse that indicates a hole-in-one on the 19th hole was made and that the person gets a free game. The alarm in the clubhouse would continue to sound until the employee presses a reset button. This process would repeat for the next hole-in-one.

    I have the following circuit from the sensor

    upload_2014-6-20_13-39-41.png


    When the sensor is clear, the voltage on the white wire is about 200mV. When the sensor is triggered, the voltage jumps up on my volt meter to around 600mV for a split second. I need the voltage on the white wire to trigger the alarm (which will have it's own 12V power supply in the clubhouse). I then need a momentary switch that the clubhouse employee pushes to shut the alarm off.

    I have a few ideas but since I'm new at this I don't want to go down a rabbit hole if there is an easier design I should be concentrating my efforts on considering he wants to get this working on his course asap. Obviously, the white wire would need to trigger the alarm but what components do I need that would see a 200mV signal as 'off' and a 600mV signal as 'on'? Then how do I keep the alarm on once the voltage on the white wire drops back to 200mV (almost immediately)?

    Any help would be greatly appreciated.
     
  2. chopnhack

    chopnhack

    1,573
    354
    Apr 28, 2014
    Lance, is there more to this circuit than one sensor? How does the system discern between the ball going in on the hole on the 2nd, 3rd or further strokes? Is there a sensor at the tee-off area of the final hole which is high and then rest of the circuit is live? (i.e. - first stroke would be taken from the tee off area, sensor plate? circuit would be momentarily complete letting the rest of the circuit go live such that if the ball would pass the IR sensor while the person was still standing in the tee off area = hole in one)
     
  3. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    There's no problem with detecting a short pulse. You can use any kind of latch or flip-flop. You can make one from two transistors (Google bistable multivibrator), logic gates (Google SR latch or SR flip-flop) or an IC such as the CD4013, CD4027, or 74(HC)74.

    The voltage on your white wire should go all the way up to 5V when the light is blocked from the sensor. If it's only going up to 0.6V there must be something wrong - perhaps the light is too bright and isn't being fully blocked. If that's the voltage you measure on a multimeter when you drop a ball through the pipe, it's probably not the actual "high" voltage on the white wire; the multimeter does not respond to the peak value of a very short pulse. Try holding the ball in the pipe instead of dropping it through.

    And as chopnhack says, AFAIK you'll need some way to detect whether the ball is a hole-in-one.
     
  4. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    I suspect that the 19th hole allows you only one shot. It either goes in the hole, or goes away somewhere else, ending your game.

    Bob
     
  5. Lance Mannion

    Lance Mannion

    37
    2
    Jun 9, 2014
    There is only one circuit. You only get one shot. Either it goes into the hole or it drops down and get collected underneath (out of reach)
     
    chopnhack likes this.
  6. Lance Mannion

    Lance Mannion

    37
    2
    Jun 9, 2014
    Hi Kris -
    When I block the sensor, the voltage does go up to 5V. I was talking about what I can see on the multimeter when the ball drops through. There may be a nanosecond when the voltage goes up to 5V but the multimeter only sees in the 600-700 mV range for that split second. So based on what you've said, it sounds like the sensor is fine.

    I'm not familiar with a latch or flip-flop so I'll have to read up on them. I'll google what you've suggested. Can I just use two of the transistors (2N3904)?

    Thanks
     
  7. Lance Mannion

    Lance Mannion

    37
    2
    Jun 9, 2014
    You are correct, sir!
     
  8. kpatz

    kpatz

    318
    84
    Feb 24, 2014
    Do you have a pic of the original boards? I'm curious as to what's on them.

    I 2nd the suggestion for a SR (aka bistable) flip flop. Another option is a relay wired to latch itself: have the 5V pulse from the sensor energize a relay, and then the relay contacts themselves keep the relay (and buzzer) on. A normally-closed pushbutton would break the circuit to deactivate the alarm.

    If you go the relay route, you'll need a transistor to amplify the current since you'll only get a couple mA from the phototransistor. If you go the flip-flop route, use a comparator or Schmitt trigger buffer to condition the signal and make it more logic-friendly. A simple RC filter would help with noise immunity--you don't want the alarm going on everytime the air conditioner cycles on or off. How far away are the 19th hole sensors from the clubhouse where the alarms are?

    Also, does he want a single alarm for both holes or a separate one for each?

    If the circuit used a 12V power supply, and you're expecting 5V at your sensors, you'll need to use a 5V regulator (especially if you're going to use logic ICs), or you could increase the value of your current limiting resistors to use a 12V circuit with transistors/relay.
     
    Last edited: Jun 20, 2014
  9. Lance Mannion

    Lance Mannion

    37
    2
    Jun 9, 2014
    I'll post a picture of the board when I get back. In the meantime, what you describe above is EXACTLY what is needed. Do you know what type of relay I need?

    Thanks
     
  10. kpatz

    kpatz

    318
    84
    Feb 24, 2014
    A relay with a 12v coil and SPST or SPDT contacts is fine. It doesn't have to be heavy duty or anything, just enough to power the buzzer and the relay coil, so even a small relay with 1 amp contacts will be plenty.
     
  11. Lance Mannion

    Lance Mannion

    37
    2
    Jun 9, 2014
    So, I assume you're talking about an electromechanical relay, right?

    I'm in the hobby of fixing electromechanical pinball machines so earlier tonight I built a small prototype out of switches and an electromechanical relay. It works fine but I have to check out the wiring at the course to see if I can get enough power from the clubhouse down to the hole (probably 100 ft away) and back again to power the relay, buzzer and a light/LED.

    Thanks
     
  12. kpatz

    kpatz

    318
    84
    Feb 24, 2014
    It's possible that the phototransistor circuit won't have enough current to energize the relay by itself (looking at your other thread, it has a 10k resistor). You'll probably need a transistor to amplify the current at the clubhouse end. I'll be out all day but can post a schematic later, or someone else here will.
     
  13. Lance Mannion

    Lance Mannion

    37
    2
    Jun 9, 2014
    Here are some pics of the board...
     

    Attached Files:

  14. kpatz

    kpatz

    318
    84
    Feb 24, 2014
    BASIC Stamp..OMG! That was the first microcontroller I ever played with. I have one of those development boards kicking around.

    For what the circuit does, it's huge overkill (unless it does other things besides just sound a buzzer when someone sinks a hole on the 19th). A latching relay will do the same thing without requiring firmware.

    What's that ELK-800 amplifier used for? An amplifier for the "buzzer"?
     
  15. kpatz

    kpatz

    318
    84
    Feb 24, 2014
    Here's a quick schematic I drew up. It's not the neatest but it gets the point across.

    Q1 amplifies the signal from the phototransistor and energizes the relay. Once it's energized, the contacts ground out the circuit so that the buzzer and LED stay lit until momentary normally-closed button SW1 is pressed.

    R3 adds additional current limiting for the IR LED in the hole, since it'll be seeing 12v instead of 5V. Alternatively, increase the 220 ohm resistor in the hole to something higher like 470 or 680 ohms.

    D1 is a flyback diode to protect the transistor from back EMF when the relay turns on/off. R2 limits current through the LED. I marked Wht, Grn, and Red for the wires going to the hole sensor.

    If the buzzer is an electromechanical one (I prefer piezo buzzers), put another diode across the buzzer terminals with the cathode toward the 12V side, like the one on the relay.

    There's no filtering in this circuit, a capacitor or two in a few places may help reduce noise or false triggers. Golfcourse.JPG
     
  16. Lance Mannion

    Lance Mannion

    37
    2
    Jun 9, 2014
    From what I've been told, in its heyday when a hole-in-one was made, strings of LEDs along the hole would light, a large light on the top of the hole would spin around, and music would play. All that happened at the hole. The only thing that occurred in the clubhouse was the buzzer, an LED, and a pushbutton to shut the buzzer off.

    At this point, since there is no documentation on exactly how the circuit board was set up, no schematics, etc., the owner now would just like a simple set up with the buzzer going off in the clubhouse. I'm going to try to tackle that first and then worry about what happens at the hole later.

    Any guess on how old this stuff might be?? The owner has no idea and the person responsible for this set up is no longer with us.

    Thanks.
     
  17. Lance Mannion

    Lance Mannion

    37
    2
    Jun 9, 2014
    Thanks much for the schematic! Looks daunting for a newbie but I'll give it a shot :)

    I did buy a piezo buzzer.
     
  18. kpatz

    kpatz

    318
    84
    Feb 24, 2014
    It's hard to know how old the setup is, as BASIC Stamps have existed since the 1990s are are still made today.

    So, it could be 20 years old, or just a few years. But the added music and lights at the hole explains why they used a microcontroller in the first place. The flashing lights and music are probably generated in firmware (written in a dialect of Basic) and the chip plays the sequence when the hole sensor is triggered.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-