Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Pull Down Resistor

I have a switch that is always closed. If it becomes open that is a condition that I take some action. I put together a pull down resistor (based off the attached picture from another post). But I noticed that it gets really warm to the touch. Is that expected? Should I use a larger resistor (or smaller).

Thanks in advance.
User-inserted image

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
PRO
USA
#12  
There has been no smoke.

I have smaller resistors.

I am not an electrician either and browsed many threads talking about the pull down resistor.

So is my solution to install a smaller resistor and make sure the GND and White goto the switch.

My switch has two wires. I want to set it up so that as long as the button is pressed so switch is closed I take no actions, but if the switch is open (or no longer pressed) I want to take an action.
PRO
USA
#13  
Sorry, work call.

To avoid doubts:

User-inserted image
PRO
USA
#14  

Quote:


But I noticed that it gets really warm to the touch. Is that expected


P (Watts) = I * I * R = V * V \ R
P = 7.4 * 7.4 \ 47 = 1.16 w
your resistor can handle 1/2 = 0.5 W, so eventually will get harm and then black smoke.

P (Watts) = I * I * R = V * V \ R
P = 3.3 * 3.3 \ 1000 = 0.01 W

P (Watts) = I * I * R = V * V \ R
P = 3.3 * 3.3 \ 4700 = 0.002 W

Like i said i use 4.7K but it can work with 1K, the consumption is not relevant.

Note: you can use the 47 ohm:

P (Watts) = I * I * R = V * V \ R
P = 3.3 * 3.3 \ 47 = 0.2 W

You are wasting 0.2W it's your battery:)
PRO
USA
#15  
Ok. Will change to 4.7 or 1, whichever I have.

One more stupid question. I want to wire with the button pushed, so it will probably be pushed most of the time. Will this be an issue or if I have it wired correctly with the right resistor I should be OK?

And some low level heat is expected just based on the way a resistor works, but it shouldn't be to hot to handle, correct?
PRO
USA
#16  
the above scenario:
1) always open (Input Pin = GND)
2) Pushed (Input Pin = 3.3 and power consumption)

If you keep the button pushed for a long time, makes sense a weak resistor to avoid battery draining, and is expected the heat dissipated but with 1/2 W or 1/4 resistors you can't fry anything:)

If you want a different logic e.g. always closed, I would work the logic at the script level, to avoid power consumption.
#17  
What are you doing with this button? Are you turning power on and off? What's it's purpose? What do you mean by "take action"?
PRO
USA
#18  
You can change the wiring to always "on":

User-inserted image


VCC = ideal 3.3v, no more than 5V.
Resistor = same rules

@Dave:
I believe you can use that logic for robot bumper switches, imagine the robot hits the wall.

If the idea is to monitor switches states, can be problematic if the verification code takes longer and misses a transition.
#19  
I am asking what the op is doing with this switch. I think it's important to find out to offer the right answer and solution. It's odd that he first had it attached to a digital port.
PRO
USA
#20  
Attached to digital port because that is what I thought it should be, but maybe not.

It is a stationary robot and I am using to determine if it gets lifted, knocked over, etc..
PRO
USA
#21  
@Dave
you're right, my initial concern was the voltage on the red pin, before serious damage.

but i missed something:

Quote:


I have a switch that is always closed. If it becomes open that is a condition that I take some action.


I would change the wiring (post 19)

Quote:


It's odd that he first had it attached to a digital port.


I have 6 bumper switches, 3 front, 3 back, you have more digital ports than analog ports so why not ?

@dbeard
Can you provide more details ? you have our attention:)
PRO
USA
#22  
It is a stationary robot and I am using to determine if it gets lifted, knocked over, etc..
PRO
USA
#23  
also, why change to D19 instead of D20?

Trying to understand.
PRO
USA
#24  
post 19 related to this conversation, not port 19.
#25  
Great thread guys,following this, in all my testing the sonar just can't always see everything when it moves at an angle there are blind spots to the sonar sensor.I have some contact switches salvaged from some wow wee toy robots that seem to work great! Nice to see other people working on these switches and sharing the info! For the newer people that don't have much electronics experience there should be a tutorial on basic wiring setup to the EZB-4,I'm sure there must be more info but the searching is time consuming sometimes.Although with me the answers always pop up quickly with the way EZ Robot web pages work,great job on those that designed the web page! :)
PRO
USA
#26  
PTP

I know you must be getting tired of me. But I have a question about post 19.

So there are 3 pins coming off of the EZB. Black Red White, with Black being ground, Red is VCC, and white is signal.

So based on your drawing the Switch gets connected to Black and White.

I put the resistor on Red and connect inline with the white pin.
PRO
Synthiam
#27  
Keep your existing setup and use any of the ADC ports instead. Your resistor wire mod will work fine if connected to ADC port.

1) disconnect the cable/plug mod you showed in the picture from the Digital port

2) connect the cable/plug mod to ADC port 0

Voila.
PRO
USA
#28  
ADC Port it is. Have plenty not in use.

It would be really cool if one of the electronics people would put together a tutorial on this. I think there is some assumed knowledge around electronics that some of us don't have, especially how this wiring stuff relates to the ports on the EzB.

PTP - Thanks for you time and hanging in there with me. I appreciate the help.

Also, thanks to everyone else who jumped in and added support.
#29  
@Ptp, "odd" may have been the wrong word for me to use. I should have said that attaching to the digital ports raised some questions in my mind as to how he was using this button and the best port to attach to. ;)
PRO
Synthiam
#30  
When the button is pressed, it's connecting 3.3v provided by the ADC to the white wire, which is ADC input. The code would have a threshold and look like..

Code:


If (GetADC(adc0) > 100)
say("Button is pressed")
endif
#31  

Quote:

It would be really cool if one of the electronics people would put together a tutorial on this. I think there is some assumed knowledge around electronics that some of us don't have, especially how this wiring stuff relates to the ports on the EzB.


I agree. A tutorial on pull up/pull down resistors and why and where they are used would be great.

Alan