Jukebox Mike
Posts: 17
Joined: Fri Jul 06, 2018 3:19 pm
Location: FRANCE

Illuminated push button

Wed Sep 12, 2018 3:56 pm

Hi all.
I bought one of those small panel mounted push buttons from China ( what choice do we have for most things?)
The button is good. Well finished and robust. 4 conectors - 2 for button and 2 for lamp. I tested the lamp on a couple of 1,5 volt batteries to give it 3 volts and it lit up. Strange thing is, if I reverse polarity it still lights up!. my thinking is that it is not an LED, although that is what the description said it was. I can't physically check it as there is no way to get the unit apart. Next I left the lamp on for 12 hours connected to a 5 volt supply. it still works.
If, as I suspect, this is a small filament lamp or similar, can I still use it as a status lamp on Pi GPIO pins in the same way as an LED?

pfletch101
Posts: 159
Joined: Sat Feb 24, 2018 4:09 am

Re: Illuminated push button

Wed Sep 12, 2018 4:14 pm

It could conceivably have a diode 'bridge' surrounding an LED to make it insensitive to supply polarity, though that is more complexity than I would expect from a cheap device, and would introduce two extra diode voltage drops, which one would normally expect to cause problems in practice. Your guess that it actually includes a small incandescent bulb is probably right. The important question is whether it will work while drawing no more current than a GPIO pin can safely source (16 mA absolute max for a single pin). If you don't have a sensitive ammeter to measure the current it draws directly, you should be able to run it in series with a battery and a known resistance, measure the voltages, and thus calculate its resistance and go from there.

drgeoff
Posts: 8438
Joined: Wed Jan 25, 2012 6:39 pm

Re: Illuminated push button

Wed Sep 12, 2018 4:21 pm

Jukebox Mike wrote:
Wed Sep 12, 2018 3:56 pm
If, as I suspect, this is a small filament lamp or similar, can I still use it as a status lamp on Pi GPIO pins in the same way as an LED?
Probably not.

You should not have a GPIO source or sink more than 16 mA. A filament lamp running at 3.3 volts and 16 mA is likely to be exceeding dim. Also I expect a filament lamp will attempt to take more than 16 mA if connected to a GPIO.

ejolson
Posts: 1831
Joined: Tue Mar 18, 2014 11:47 am

Re: Illuminated push button

Wed Sep 12, 2018 4:42 pm

Jukebox Mike wrote:
Wed Sep 12, 2018 3:56 pm
Strange thing is, if I reverse polarity it still lights up!
Is the colour of the light the same when you reverse the polarity?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10835
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Illuminated push button

Wed Sep 12, 2018 4:49 pm

If the lamp still lights with reversed polarity (and the lamp polarity is not specified), its simply a cheap filament light (99% sure of that).
Especially if the switch is an arcade button (very conservative people arcade designers, they stick by what works).
It will probably use 5V at 100mA or so, so you will need a transistor to switch it on and off.

klricks
Posts: 5764
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Illuminated push button

Wed Sep 12, 2018 5:10 pm

Give a link to the switch datasheet or sellers website.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Stretch w/ Desktop OS.

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

Re: Illuminated push button

Wed Sep 12, 2018 6:41 pm

drgeoff wrote:
Wed Sep 12, 2018 4:21 pm
... Also I expect a filament lamp will attempt to take more than 16 mA if connected to a GPIO.
Also of interest in these circumstances: the filament will be tungsten, and the operating temperature will be in the region of 2000 C
Like most substances, its resistance is temperature dependant, so at switch-on its resistance will be very low, so even though at working temperature it might not take much current, at room temperature the current could be massive.

An interesting observation: if you want a cheap constant-current source, a filament lamp isn't a bad starting point - as the voltage changes, so does the temperature and therefore resistance, and the current stays relatively constant!

Jukebox Mike
Posts: 17
Joined: Fri Jul 06, 2018 3:19 pm
Location: FRANCE

Re: Illuminated push button

Thu Sep 13, 2018 10:47 am

OK. Many thanks for all of the feedback
My first thoughts were also that it may contain a diode bridge. I am assuming that the led ( if it is an led ) is of the small rectangular type often seen on p.c.b.'s

This is what I have establishes.

1. The lamp is the same brightness and colour whichever way I connect it.

2. It is not a gaming switch but a small switch with a power symbol on the front which lights up blue when the voltage is applied across lamp
terminals.

3. I ran it again for 5 hours and the metal casing stayed stone cold - it is all metal and very small, so I would have expected some warming up to occur if it contained a filament lamp.

4. When I powered it up with my meter in series for a further 3 hours, it drew a current of 1540 micro-amps (1.54 milliamps) constantly from the start.

5. I purchased the unit from Bangood and it's product description is Excellway® 12V 4 Pin Led Metal Push Button Switch Momentary Power Switch Waterproof I do not have a product number.

I am now going to see what happens with different supply voltages. I think from the description that it may be intended to be illuminated by a 12 volt supply although I would be quite happy with the brightness at 5 volts

pfletch101
Posts: 159
Joined: Sat Feb 24, 2018 4:09 am

Re: Illuminated push button

Thu Sep 13, 2018 2:04 pm

Jukebox Mike wrote:
Thu Sep 13, 2018 10:47 am
3. I ran it again for 5 hours and the metal casing stayed stone cold - it is all metal and very small, so I would have expected some warming up to occur if it contained a filament lamp.
It depends on how sensitive your temperature measuring instrument was. "Not hot to the touch" might not be a sufficient test.
4. When I powered it up with my meter in series for a further 3 hours, it drew a current of 1540 micro-amps (1.54 milliamps) constantly from the start.
That certainly does seem more consistent with it being an LED with a diode bridge. The "constantly from the start" aspect is less important, since the inrush current referred to by drgeoff is very transient. It might well be enough to damage a small electronic device, but you wouldn't see it with a standard ammeter.
I am now going to see what happens with different supply voltages. I think from the description that it may be intended to be illuminated by a 12 volt supply although I would be quite happy with the brightness at 5 volts
Don't forget that you will only have 3.3V to play with if you are running it directly off a GPIO pin, almost half of which (if it is an LED with a bridge rectifier) will be absorbed by diode voltage drops. You may still need to add a transistor circuit to get sufficient driving voltage.

User avatar
tlfong01
Posts: 440
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Illuminated push button

Thu Sep 13, 2018 2:25 pm

Jukebox Mike wrote:
Thu Sep 13, 2018 10:47 am
5. I purchased the unit from Bangood and it's product description is Excellway® 12V 4 Pin Led Metal Push Button Switch Momentary Power Switch Waterproof

Something like this?

12V 19MM Waterproof Car AUTO Metal Momentary Engine Start Push Button Switch LED - Green
https://www.banggood.com/12V-19MM-Water ... B4QAvD_BwE
I am an electronics hobbyist, started playing relays 3 months ago. I found things confusing. Luckily Google my friend makes me great again! :)

Jukebox Mike
Posts: 17
Joined: Fri Jul 06, 2018 3:19 pm
Location: FRANCE

Re: Illuminated push button

Fri Sep 14, 2018 11:47 am


drgeoff
Posts: 8438
Joined: Wed Jan 25, 2012 6:39 pm

Re: Illuminated push button

Fri Sep 14, 2018 1:29 pm

Jukebox Mike wrote:
Fri Sep 14, 2018 11:47 am
Hi.
Like this one - https://www.ebay.co.uk/itm/12mm-Silver- ... -Momentary
Incomplete link.

User avatar
tlfong01
Posts: 440
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Illuminated push button

Fri Sep 14, 2018 2:46 pm

drgeoff wrote:
Fri Sep 14, 2018 1:29 pm
Jukebox Mike wrote:
Fri Sep 14, 2018 11:47 am
Hi.
Like this one - https://www.ebay.co.uk/itm/12mm-Silver- ... -Momentary
Incomplete link.

This one?
https://www.ebay.com/sch/?_nkw=12mm+silver+momentary
I am an electronics hobbyist, started playing relays 3 months ago. I found things confusing. Luckily Google my friend makes me great again! :)

Jukebox Mike
Posts: 17
Joined: Fri Jul 06, 2018 3:19 pm
Location: FRANCE

Re: Illuminated push button

Fri Sep 14, 2018 3:40 pm

Yes that's the one. The second one on the page with the power symbol -blue

User avatar
tlfong01
Posts: 440
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Illuminated push button

Sat Sep 15, 2018 12:09 am

Jukebox Mike wrote:
Fri Sep 14, 2018 3:40 pm
Yes that's the one. The second one on the page with the power symbol -blue

Wow, big button little money. :)

Silver 12mm Metal Momentary Push Button Switch 4Pin Blue LED Power Symbol 12V (USD2.42)
https://www.ebay.com/itm/Silver-12mm-Me ... SwIJlaFBk8
Attachments
big_button_little_money_2018sep1501.jpg
big_button_little_money_2018sep1501.jpg (82.51 KiB) Viewed 271 times
I am an electronics hobbyist, started playing relays 3 months ago. I found things confusing. Luckily Google my friend makes me great again! :)

Jukebox Mike
Posts: 17
Joined: Fri Jul 06, 2018 3:19 pm
Location: FRANCE

Re: Illuminated push button

Sat Sep 15, 2018 8:42 am

Hi

Now that we have established that the switch does contain an led light and not a filament lamp, am I safe to use it as a status lamp without a resistor given that it only has a current draw of around 1.54 Ma.
It also seems likely that it is fitted with some sort of diode bridge as it will illuminate whichever way round it is connected.

User avatar
tlfong01
Posts: 440
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Illuminated push button

Sat Sep 15, 2018 9:14 am

Jukebox Mike wrote:
Sat Sep 15, 2018 8:42 am
Hi

Now that we have established that the switch does contain an led light and not a filament lamp, am I safe to use it as a status lamp without a resistor given that it only has a current draw of around 1.54 Ma.
It also seems likely that it is fitted with some sort of diode bridge as it will illuminate whichever way round it is connected.

eBay 12V Switch

I don't understand why the ad says it is a 12V switch. This contradicts with the spec saying that LED voltage is 3V.

...

Errata - Duplicated Post

I made a careless mistake and duplicated this post. Please ignore this post and read the next one which is more up to date. My apologies for any confusion.
Last edited by tlfong01 on Sat Sep 15, 2018 9:44 am, edited 2 times in total.
I am an electronics hobbyist, started playing relays 3 months ago. I found things confusing. Luckily Google my friend makes me great again! :)

User avatar
tlfong01
Posts: 440
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Illuminated push button

Sat Sep 15, 2018 9:28 am

Jukebox Mike wrote:
Sat Sep 15, 2018 8:42 am
Hi

Now that we have established that the switch does contain an led light and not a filament lamp, am I safe to use it as a status lamp without a resistor given that it only has a current draw of around 1.54 Ma.
It also seems likely that it is fitted with some sort of diode bridge as it will illuminate whichever way round it is connected.

eBay 12V Switch
https://www.ebay.co.uk/itm/Silver-12mm- ... 100623.m-1

I don't understand why the ad says it is a 12V switch. This contradicts with the spec saying that LED voltage is 3V.

If you already tested the LED is 3V and less than 2mA, then the LED is 99% 3V compatible.

Rpi GPIO pin output voltage is around 3V to 3.3V, and safe driving a LED at or below 2mA. So there is only 5% chance that your Rpi will fry or explode. :lol:

But if you use the other two terminals to switch a current bigger than that specified 2A, then there is 0.1% chance that your nuclear plant might melt down, and any terrible thing that can happen will happen.

And if you are a forgetful and careless guy, and always mix up or wrongly cutting a time bomb's blue wire instead of the right red wire etc, then you Rpi might also explode! :mrgreen:
Attachments
ebay_12v_switch_2018sep1501.jpg
ebay_12v_switch_2018sep1501.jpg (58.13 KiB) Viewed 235 times
Last edited by tlfong01 on Sat Sep 15, 2018 9:46 am, edited 1 time in total.
I am an electronics hobbyist, started playing relays 3 months ago. I found things confusing. Luckily Google my friend makes me great again! :)

B.Goode
Posts: 6335
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Illuminated push button

Sat Sep 15, 2018 9:38 am

I don't understand why the ad says it is a 12V switch. This contradicts with the spec saying that LED voltage is 3V.



There are TWO component parts to this device: a switch and a light.

Maybe the description "12v switch" is an indication of the maximum voltage that the switch component can safely handle?

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

Re: Illuminated push button

Sat Sep 15, 2018 9:48 am

B.Goode wrote:
Sat Sep 15, 2018 9:38 am
Maybe the description "12v switch" is an indication of the maximum voltage that the switch component can safely handle?
@tlfong01quoted the relevant line of the spec, but in de-duplicating his post has since deleted it.
Switch Rating: 2A 36V
[Edit] And since replaced....
Last edited by davidcoton on Sat Sep 15, 2018 10:32 am, edited 1 time in total.
"Thanks for saving my life." See https://www.raspberrypi.org/forums/viewtopic.php?p=1327656#p1327656
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”

B.Goode
Posts: 6335
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Illuminated push button

Sat Sep 15, 2018 10:22 am

OK. Thanks for clarifying. Not that then...

User avatar
tlfong01
Posts: 440
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Illuminated push button

Sun Sep 16, 2018 2:43 am

tlfong01 wrote:
Sat Sep 15, 2018 9:28 am
eBay 12V Switch
https://www.ebay.co.uk/itm/Silver-12mm- ... 100623.m-1
I don't understand why the ad says it is a 12V switch. This contradicts with the spec saying that LED voltage is 3V.

Why eBay big button ad says it is a 12V switch?

This morning I got up from bed, still dizzy, but first thing first was by instinct pressed my PC's power on button. As soon as I saw light bulb brightening, I had an eureka. I know why the eBay says it is a 12V switch!

Now I am 99% sure that the big button switch was designed for PC users to switch on/off the PC power. Nowadays almost all PCs use the ATX 12V power supply which outputs main power 12V (along with 5V and 3.3V).

The ATX PSU has an input signal pin for the 'Power On/Off' signal, which is generated when the user presses the button and shorts the ATX PSU power on/off signal pin to ground. The ATX PSU then switches itself on. If the user presses the button again, power pin is open or high voltage, the PSU switches itself off.

Because 99.9% of the tens of millions of button switches manufactured every year are used in PC ATX 12V PSU, it is a tradition or natural to call the switch 12V, even though you can use it for other purposes.

How to Manually Turn on an ATX Computer Power Supply
https://www.youtube.com/watch?v=29vhuKbwLno

PC Sales Statistics
https://www.statista.com/statistics/263 ... by-vendor/
I am an electronics hobbyist, started playing relays 3 months ago. I found things confusing. Luckily Google my friend makes me great again! :)

Jukebox Mike
Posts: 17
Joined: Fri Jul 06, 2018 3:19 pm
Location: FRANCE

Re: Illuminated push button

Sun Sep 16, 2018 9:03 am

You are probably right on that.
Back to my LED question
I was intending to use it as a status lamp, ie LED on when Pi is active and LED off to tell me that Pi has gone to bed and I can pull the supply if I want to.
Two potential issues have come up -
1. over-current and the possible need for a resistor in series
2. under voltage and the need for a transistor

Any suggestions?

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

Re: Illuminated push button

Sun Sep 16, 2018 9:24 am

If it were me, and if they're really that cheap, I'd be buying more than one, then tearing one apart to find out what's really inside.
But that's just me.

Jukebox Mike
Posts: 17
Joined: Fri Jul 06, 2018 3:19 pm
Location: FRANCE

Re: Illuminated push button

Sun Sep 16, 2018 11:18 am

hi burngate.

I have done just that. Problem is they come from China and I do not expect to receive it for another 5 weeks

Return to “Beginners”

Who is online

Users browsing this forum: Baidu [Spider], Jalebi and 32 guests