element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum SN754410
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 8 replies
  • Answers 2 answers
  • Subscribers 666 subscribers
  • Views 836 views
  • Users 0 members are here
  • sn754410
  • raspberrypi
Related

SN754410

aezdropzz
aezdropzz over 10 years ago

Hello,

 

 

I am trying to build an alarm-clock with my Pi and my plan is to use the following button as a snooze button: https://www.modmypi.com/60mm-arcade-button-red?filter_name=arcade%20button

The LED that is inside of the button can be powered with max 12V due to the internal resistor. I am planning to use a 9V battery. But as soon as I ordered my parts, I realised that the LED from the buzzer would always be on if I connected it directly. That is not what I want, I would like to have the LED light up when the alarm goes off. And since the battery is 9V, I can't safely use my Pi to control the LED. Then I thought about using the SN754410 to control it.

 

 

Now I don't know if this is possible, if there are other chips that would be more appropriate etc.

Since I have never used a chip like this, I also don't have any idea on how to wire it and use it... (Looking at the tech-sheet didn't help me out either)

Could anyone help me out a little?

  • Sign in to reply
  • Cancel
  • royleith
    0 royleith over 10 years ago

    Gosh!

     

    I have not come across that IC before, but it looks like fun. It is a driver that can be supplied with anything from around 5V to 35V. It has four drivers and, when a logical '1' is applied to the input 'A' to a driver (and to an enable pin, 'EN') it can pass up to 1 Amp at close to the supply voltage to the device connected to the output. I am not sure it would work with the logic voltages of GPIO pins.

     

    This is an inappropriate chip for your project since the buzzer and LED should require 20-30 milliamps at most. You need to consider the push-button as two independent components and to add a buzzer as the third component.

     

    MagPi Magazine, issue 4 has all the circuitry you need. The article entitled 'IN CONTROL' has an LED that can be lit by the Pi, a buzzer that can be sounded by the Pi and a button that can be detected by the Pi. All the components are powered by the GPIO 3.3v supply.

     

    LEDs are used with a series resistor to limit the current. The 3.3v supply requires a 470 Ohm resistor, a 5v supply would require something like 1kOhm. Since your switch LED is intended for up to 12v it probably has something like a 2.2k resistor built-in. That would make the LED rather dim using the 3.3 v in bright light, but could be ideal for an alarm clock unless you are a very late riser!

     

    The buzzer is designed for 3.3v, but the GPIO pins cannot supply enough milliamps to make it work. A 2N2222 transistor (one of the industry's general purpose workhorses, almost any other NPN transistor should work) is used to drive the buzzer. I found this buzzer,

     

    PKB24SPCH3601-B0 - MURATA - BUZZER 3.6KHZ | CPC

     

    that should be suitable although it would be running very close to its minimum rated voltage because of the voltage drop across the transistor. It works at up to 15v and so, if it is too quiet at 3.3v, you can use a 9v battery in place of the 3.3v supply. Start with a 4.7kΩ series resistor to limit the noise and the current and then reduce it towards no less than 560Ω to get the required volume.

     

    In fact, if the LED proves too dim at 3.3v, you could use a similar circuit connected to the 9v battery rather than the 3.3v supply and another 2N2222 driver transistor. Use a series resistor in the range 1k to 10k if you want to reduce the brightness of the LED (or pulse width modulate the 'ON' signal on the GPIO pin).

     

    The article also makes it clear that the push-button switch MUST have a 1kOhm resistor between it and the GPIO input pin and also have a 10kOhm 'pull-up' resistor.

     

    I hope that helps

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • aezdropzz
    0 aezdropzz over 10 years ago in reply to royleith

    Thank you for the reply!


    I did not formulate my post correctly, for which I apologise ("LED in the buzzer always on" should have been "LED in the button.."). Nonetheless, the info you have given me about the buzzer may be very useful towards future projects!

     

    My idea was to use that button with the LED (for modmypi) as a button to stop the alarm. I would also hook up a speaker to my Pi for the sound-part.

    My main question was about the LED in the push-button (LED and pushbutton have separate connections). That LED can take at most 12V because of the internal resistor and I would like to control the LED with my Pi.

    Since the Pi can't take 12V or supply it, I was looking for some sort of chip that can be controlled with the Pi and uses an external power supply (such as a 9V battery) to supply power to the LED.

    I was planning (as you also stated) to use the button with a pull-up resistor and connecting it to a GPIO.

     

    The other forum told me about the following chip (ULN2003A): http://be.farnell.com/stmicroelectronics/uln2003a/darlington-array-7npn-2003-dip16/dp/1094421?storeId=10154&langId=32&catalogId=15001&krypto=WHH4%2Bvky8Bdvu6Yii6fGhqJUt8eNAAeorOxA07wBtsw5kOT5Qw8uNgLNU4kZlTIcuhuDTkYd1Fc%3D&ddkey=http:InvalidCookie

    It's a Darlington Array and apparently I should be able to control the LED with the Pi but supply the power with the 9V battery, but I have no clue as to how I should wire it and use it.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago in reply to aezdropzz

    Hi Ruben,

     

    Perhaps even 5V will light it sufficiently for your needs (easy to test). It will definitely light at 5V, it is just whether the brightness is enough for your needs.

    Often LEDs are quite bright even at a few milliamps.

    If so, then you could take the 5V supply from your RPI, since 5V is on the header pins. A darlington array is not needed, a single transistor and resistor will work, i.e. use the circuit here:

    http://elinux.org/File:EGHS-LEDhigh_output2.jpg

    where R2 is 1k, and R1 is the existing resistor built-in to your switch. The transistor can be (say) 2N2222 or BC547, either will be appropriate.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • aezdropzz
    0 aezdropzz over 10 years ago in reply to shabaz

    Thanks! I will most certainly also try this out. So with the 2N2222 it should also be possible to use the 9V battery or am I getting the function of the transistor wrong?

    And say I really wanted to use a Darlington array, what would be the best way to do it? (I'm sorry if I'm being annoying image)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago in reply to aezdropzz

    The supply can be 9V too, the circuit doesn't need to change. It should be quite bright at 9V. The buzzer can work from an identical copy of the same circuit too, i.e. just swap out the LED and R1 with the buzzer.

    A darlington is not needed, their use-case is for high current loads (and an LED and small buzzer for alarm clock level of volume don't apply - assuming your buzzer needs 100mA or so).

    The circuit for a darlington would be the same, just swap out the transistor. But an NPN transistor like 2N2222 or similar is a generic thing that you can pick up from anywhere. (I have hundreds of NPNs, but

    zero darlingtons at home probably).


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • gadget.iom
    0 gadget.iom over 10 years ago

    The button looks like it takes standard arcade button lamps.

    Arcade World UK supply 5v LEDs as a straight forward retrofit.

    AWUK 5V 10mm Wedge Base LED - Arcade World UK

    no doubt you can find them elsewhere too.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • aezdropzz
    0 aezdropzz over 10 years ago in reply to shabaz

    Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • aezdropzz
    0 aezdropzz over 10 years ago in reply to gadget.iom

    Thank you! I'll be looking at that too image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube