AezDropZz
Posts: 29
Joined: Tue Dec 23, 2014 2:16 pm

SN754410

Sat Jan 10, 2015 10:59 am

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-but ... e%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?

User avatar
Burngate
Posts: 6302
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: SN754410

Sat Jan 10, 2015 12:06 pm

Reading between the lines, it would seem you want your Pi to control both a buzzer (powered from 9v) and the LED (also powered from 9v), with an input to the Pi from the micro-switch.

The info on that ModMyPi page isn't ever-so clear, but I assume that the LED can be driven separately from the switch. It may even be possible to change the resistor; if so it could be driven from 3v3 and so not require any extra electronics.

The SN754410 is a quad-half-H chip. It's main use is to drive stepper-motors, and motors that can be reversed, that require current to be either sourced or sunk.
You are only requiring to sink current through each of the buzzer and the LED; the top half of each half-H would be un-used. A darlington array would be better.

AezDropZz
Posts: 29
Joined: Tue Dec 23, 2014 2:16 pm

Re: SN754410

Sat Jan 10, 2015 12:30 pm

Burngate wrote:Reading between the lines, it would seem you want your Pi to control both a buzzer (powered from 9v) and the LED (also powered from 9v), with an input to the Pi from the micro-switch.

The info on that ModMyPi page isn't ever-so clear, but I assume that the LED can be driven separately from the switch. It may even be possible to change the resistor; if so it could be driven from 3v3 and so not require any extra electronics.

The SN754410 is a quad-half-H chip. It's main use is to drive stepper-motors, and motors that can be reversed, that require current to be either sourced or sunk.
You are only requiring to sink current through each of the buzzer and the LED; the top half of each half-H would be un-used. A darlington array would be better.
It is pushbutton with an LED (for sound i'll attach a speaker directly to the Pi) it could be indeed that I can detach the resistor and power it from the 3V3 but I doubt it (I haven't received my parts yet). The button itself will not be powered but attached to a GPIO with pull-up resistor. The LED and button are controlled separately as you stated.
As to that Darlington Array, do you have any sites were I could purchase it and information on how to use it correctly?

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: SN754410

Sat Jan 10, 2015 12:49 pm

If you're buying that illuminated button frrom modmypi, they'll also sell you a suitable darlington array:

https://www.modmypi.com/uln2803-darlington-ic @ £1.20

8 outputs - I tend to use the cheaper uln2003A which has 7 outputs and is only 37p ;)
http://cpc.farnell.com/stmicroelectroni ... is%20Range
Android app - Raspi Card Imager - download and image SD cards - No PC required !

AezDropZz
Posts: 29
Joined: Tue Dec 23, 2014 2:16 pm

Re: SN754410

Sat Jan 10, 2015 1:02 pm

mikerr wrote:If you're buying that illuminated button frrom modmypi, they'll also sell you a suitable darlington array:

https://www.modmypi.com/uln2803-darlington-ic @ £1.20

8 outputs - I tend to use the cheaper uln2003A which has 7 outputs and is only 37p ;)
http://cpc.farnell.com/stmicroelectroni ... is%20Range
Thanks for the info! Would you also happen to have any kind of information as to how to use one of these? As I have been looking for it but haven't been successful at finding anything?

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: SN754410

Sat Jan 10, 2015 1:29 pm

Something like this:
Image
Last edited by mikerr on Sat Jan 10, 2015 1:52 pm, edited 2 times in total.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

AezDropZz
Posts: 29
Joined: Tue Dec 23, 2014 2:16 pm

Re: SN754410

Sat Jan 10, 2015 1:41 pm

mikerr wrote:Something like this:
Image
Thank you very much! I will certainly be trying this :)

mike_p
Posts: 30
Joined: Fri Aug 01, 2014 2:35 pm
Location: Surrey, UK

Re: SN754410

Sat Jan 10, 2015 1:48 pm

mikerr wrote:Something like this:
Image
Nice diagram, but doesn't the uln2803 require +ve supply to pin 10?

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: SN754410

Sat Jan 10, 2015 2:09 pm

mike_p wrote:Nice diagram, but doesn't the uln2803 require +ve supply to pin 10?
Pin 10 (COM) connects the internal flyback diode - only really necessary for inductive loads like coils - relays or motors.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

mike_p
Posts: 30
Joined: Fri Aug 01, 2014 2:35 pm
Location: Surrey, UK

Re: SN754410

Sat Jan 10, 2015 2:17 pm

mikerr wrote:Pin 10 (COM) connects the internal flyback diode - only really necessary for inductive loads like coils - relays or motors.
Thanks!

AezDropZz
Posts: 29
Joined: Tue Dec 23, 2014 2:16 pm

Re: SN754410

Sat Jan 10, 2015 2:23 pm

mikerr wrote:
mike_p wrote:Nice diagram, but doesn't the uln2803 require +ve supply to pin 10?
Pin 10 (COM) connects the internal flyback diode - only really necessary for inductive loads like coils - relays or motors.
I'm sorry for my ignorance but I don't understand a word of what all this means :?:

User avatar
Burngate
Posts: 6302
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: SN754410

Sat Jan 10, 2015 6:10 pm

2803a-part.png
2803a-part.png (7.51 KiB) Viewed 3203 times
If you connect COM to the most positive supply rail and drive anything which isn't inductive, the diode is always going to be reverse-biased so won't do anything.

If the load is inductive, such as a relay or motor, when current through it drops, its voltage can go higher than the positive rail. That could damage the chip or something else.
The diode prevents that voltage from rising (much) above the rail, providing a path for the current to decay gently.

AezDropZz
Posts: 29
Joined: Tue Dec 23, 2014 2:16 pm

Re: SN754410

Sun Jan 11, 2015 8:12 am

Burngate wrote:
2803a-part.png
If you connect COM to the most positive supply rail and drive anything which isn't inductive, the diode is always going to be reverse-biased so won't do anything.

If the load is inductive, such as a relay or motor, when current through it drops, its voltage can go higher than the positive rail. That could damage the chip or something else.
The diode prevents that voltage from rising (much) above the rail, providing a path for the current to decay gently.
So COM has to be connected to the 3V3 if you use the 3V3 as a power supply? I always thought that COM was the negative rail? For example when using a Multimeter?

User avatar
davidcoton
Posts: 5026
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: SN754410

Sun Jan 11, 2015 9:17 am

AezDropZz wrote: So COM has to be connected to the 3V3 if you use the 3V3 as a power supply? I always thought that COM was the negative rail? For example when using a Multimeter?
"COM" is short for "Common" -- a single connection for all the parts of the chip. While it is often the 0V rail, that is not necessarily so. You need to check and understand the chip's internal circuit, and/or the larger circuit you are working with
Signature retired

AezDropZz
Posts: 29
Joined: Tue Dec 23, 2014 2:16 pm

Re: SN754410

Sun Jan 11, 2015 9:22 am

davidcoton wrote:
AezDropZz wrote: So COM has to be connected to the 3V3 if you use the 3V3 as a power supply? I always thought that COM was the negative rail? For example when using a Multimeter?
"COM" is short for "Common" -- a single connection for all the parts of the chip. While it is often the 0V rail, that is not necessarily so. You need to check and understand the chip's internal circuit, and/or the larger circuit you are working with
Any place where I can learn about how to understand to read those schedules for the internal circuit of a chip?

User avatar
Burngate
Posts: 6302
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: SN754410

Sun Jan 11, 2015 11:26 am

AezDropZz wrote:So COM has to be connected to the 3V3 if you use the 3V3 as a power supply? I always thought that COM was the negative rail? For example when using a Multimeter?
As stated, COM short for common.
On a multimeter, the COM connection is either the one you use together with one of the others (mine has two others - one labelled "V kΩ nS" and the other "mA") or the one you connect to the reference point, usually the most negative point if its "single rail" or the centre if its got positive and negative rails.

On an RGB LED, or seven-segment display, it would be where all the LEDs are connected together - common anode has all the anodes connected together, so it'll be positive, compared to common cathode.

On a light switch or relay, COM is the terminal that's always connected to one or the other of NO and NC. What else it's connected to is up to you.

In this chip, there are several circuits, each with its own input, but all connected to a common ground pin, and with the diodes all connected to another common pin. The ground pin has its own symbol,* but the one the diodes connect to needs another name. COM is not quite as bad a name as some others.

If you don't connect it to anything, nothing bad will happen.
If you connect it to 3v3 or 5v, and none of the outputs are going to rise above that, it'll be ok.
If you happen to have a 48v supply, you could connect COM to that, but why would you bother, unless you are driving a relay connected to that supply?


* Ground is sometimes called Vss, because the sources of at least some FETs are connected here. CMOS logic has both N & P channel FETs and is fairly symetrical, using suffixes ss and dd to label the supplies is nonsensical

AezDropZz
Posts: 29
Joined: Tue Dec 23, 2014 2:16 pm

Re: SN754410

Sun Jan 11, 2015 11:33 am

Burngate wrote:
AezDropZz wrote:So COM has to be connected to the 3V3 if you use the 3V3 as a power supply? I always thought that COM was the negative rail? For example when using a Multimeter?
As stated, COM short for common.
On a multimeter, the COM connection is either the one you use together with one of the others (mine has two others - one labelled "V kΩ nS" and the other "mA") or the one you connect to the reference point, usually the most negative point if its "single rail" or the centre if its got positive and negative rails.

On an RGB LED, or seven-segment display, it would be where all the LEDs are connected together - common anode has all the anodes connected together, so it'll be positive, compared to common cathode.

On a light switch or relay, COM is the terminal that's always connected to one or the other of NO and NC. What else it's connected to is up to you.

In this chip, there are several circuits, each with its own input, but all connected to a common ground pin, and with the diodes all connected to another common pin. The ground pin has its own symbol,* but the one the diodes connect to needs another name. COM is not quite as bad a name as some others.

If you don't connect it to anything, nothing bad will happen.
If you connect it to 3v3 or 5v, and none of the outputs are going to rise above that, it'll be ok.
If you happen to have a 48v supply, you could connect COM to that, but why would you bother, unless you are driving a relay connected to that supply?


* Ground is sometimes called Vss, because the sources of at least some FETs are connected here. CMOS logic has both N & P channel FETs and is fairly symetrical, using suffixes ss and dd to label the supplies is nonsensical
So if I understand correctly, the COM isn't a necessary connection on this chip? You could just connect it to the highest power supply you use with the chip or an ever higher but separate supply or just nothing at all? But to me that raises the question as to why it even exists in this chip? To prevent short-circuit when using higher power supplies?

User avatar
Burngate
Posts: 6302
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: SN754410

Sun Jan 11, 2015 12:32 pm

AezDropZz wrote:But to me that raises the question as to why it even exists in this chip? To prevent short-circuit when using higher power supplies?
The designers of the chip integrated that diode into it as a convenience for the user.
It adds very little cost, and makes the chip more valuable if you need the diode - saves board space and components.
If you don't need to use it, the extra cost to you is minimal.

When driving relays, etc. a diode is necessary.
consider this:
selection.png
selection.png (1.7 KiB) Viewed 3050 times
When the switch closes, current starts building up. Energy is being stored in the magnetic field. V = L dI/Dt
When the switch opens, that energy has to go somewhere. The collapsing magnetic field induces a voltage that makes the lower end positive - the quicker the current drops, the faster the field collapses, the greater the voltage induced.
The diode provides a path for the current to flow while it falls gently. In fact, the coil will have 0.6v across it, so knowing the inductance will let you calculate how fast the current will fall.

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: SN754410

Sun Jan 11, 2015 1:09 pm

AezDropZz wrote: So if I understand correctly, the COM isn't a necessary connection on this chip? You could just connect it to the highest power supply you use with the chip or an ever higher but separate supply or just nothing at all? But to me that raises the question as to why it even exists in this chip? To prevent short-circuit when using higher power supplies?
It's not necessary when connecting LEDs, buzzers etc.

It offers protection when connecting motors or coils.
http://www.douglaskrantz.com/Flyback_Diode.html
Android app - Raspi Card Imager - download and image SD cards - No PC required !

AezDropZz
Posts: 29
Joined: Tue Dec 23, 2014 2:16 pm

Re: SN754410

Mon Jan 12, 2015 7:31 am

Thanks everyone!

Return to “Advanced users”