Show Posts
Pages: [1]
1  Using Arduino / General Electronics / Re: Trying to understand pull-up resistors on: November 14, 2012, 07:49:31 pm
I still need to read the resources oric_dan(333) provided, and I'll be the first to admit that I don't understand what's going on here, but using a usb to power adapter (a spare Apple one I had, the little square with 2 prongs on one end, and a usb port on the other (so maybe it is a grounding thing? (the wall adapter is 2 prong, too))) instead of the wall adapter is working. I will keep trying to understand this but for now I'm just glad this is working. FWIW, I tried using both a 1k ohm resistor and a 180 ohm resistor along with the wall adapter, and neither helped.

Andy
2  Using Arduino / General Electronics / Re: Trying to understand pull-up resistors on: November 13, 2012, 10:07:50 pm
One more question to tack on here.

I just got a second ds18b20 and put it on a long-ish run to a spot outdoors. It's connected to the same board as my existing indoor sensor.

Powered by USB, both sensors work. Powered by my 9v 650ma wall wart, they don't. I think I need to get a stronger pull-up resistor (1k vs. 4.6k) to solve this problem, but I want to make sure I understand why that's the case. I'm pretty sure I don't.

I believe that my USB 3.0 port provides less voltage, but more ma than the wall wart. I'm using this as a clue, but maybe I'm using it incorrectly:

I read elsewhere that you need a stronger pull up on longer runs because of cable capacitance. I don't know that I comprehend the impact. Here's a try: the increased capacitance keeps the cable from pulling high, and using a stronger pull-up resistor allows more current down the cable (there I go talking current again), which somehow quiesces the impact of the increase capacitance.

Perhaps?

Thanks. Still trying to learn stuff.
Andy
3  Using Arduino / General Electronics / Re: Trying to understand pull-up resistors on: November 10, 2012, 07:03:22 pm
Thanks again to everyone who replied. I'm still shaky on most of my basics but you all have definitely helped me get a handle on precisely how/why a pull-up resistor works.

Andy
4  Using Arduino / General Electronics / Re: Trying to understand pull-up resistors on: November 09, 2012, 03:47:32 pm
Something that often surprises is the case of a 1 kohm resistor with one end connected to, say, 5V and the other end to one side of an open switch whose other side is connected to ground.
What is the voltage across the open switch?
And if the resistor is 1 Mohm?

Another "I know nothing" question: By "across the open switch" do you mean measuring between each side of the open switch? Essentially closing the switch with the tester?

Andy
5  Using Arduino / General Electronics / Re: Trying to understand pull-up resistors on: November 08, 2012, 04:35:23 pm
I'll need to sit down with this all later, but MarkT, your advice/explanation to ignore current for this discussion has been extremely helpful. I didn't realize that in this context the current wasn't really important, and thinking about where current was flowing was definitely confusing the hell out of me.

So in general then (at least in situations as simple as the one we're examining), is it true that if part of a circuit is connected to more than 1, what I'll call terminator (ex: +5v, GND), measuring voltage at that part will always reflect the connection to the lowest impedance terminator?

Andy
6  Using Arduino / General Electronics / Re: Trying to understand pull-up resistors on: November 08, 2012, 10:16:33 am
Forget using the terms collector and emitter, these are used specifically for transistors.

No problem. I looked up "Vcc" and that's where I picked up "collector" and "emitter".

In that circuit with the switch open the voltage on pin 1 is Vcc,

This I get, because I can see the physical connection between Vcc and pin 1, and there are no other connections (in the schematic) to confuse me.

with the switch closed the voltage on pin 1 is zero or ground.

I accept that this is what is happening, but what I don't understand is why. If pin 1 is connected to both ground and Vcc, why does the connection to ground "overtake" the connection to Vcc, dropping the voltage to 0? Is there not still a potential difference (voltage) between Vcc and pin 1, when it is connected to both Vcc and ground? Maybe I am missing how the resistor impacts the connection to Vcc when pin 1 is connected to both it and ground?

Without the resistor the voltage on pin 1 would be nothing with the switch open. Nothing is diffrent from zero. Zero is a voltage level that can cause current to flow. Nothing is just not connected to anything, no current can flow from Vcc to nothing.

I think I understand what you're saying here to mean that "without the resistor on pin 1" it would be floating when S1 is open. Just for the sake of clarification though, when you say "without the resistor on pin 1", you really mean "without the connection to Vcc (including the resistor) on pin 1", right?

Thanks to all. I feel like I'm getting closer.
Andy
7  Using Arduino / General Electronics / Re: Trying to understand pull-up resistors on: November 07, 2012, 10:10:51 pm
Here's a perfect example of something about this that keeps confusing me.



I'm working on the understanding that to have current flow, you need an emitter (-) on one side of a circuit, and a collector (+) on the other.

If when S1 is open current is flowing between Vcc and pin 1, that means that whatever is on the other side of pin 1 is Vee, right? And ground is an emitter, right? So why would connecting Vee (whatever is on the other side of pin 1) to ground by closing S1 have any impact on how current is flowing between Vcc and pin 1? Even if you then have current flowing from Ground to Vcc, wouldn't current still be flowing from the other side of pin 1 to Vcc, too?

I guess the crux what I don't get is what happens on the line to make pin 1 go low (low voltage/small current, yes?) when S1 is closed.

(source: http://www.seattlerobotics.org/encoder/mar97/basics.html)

Andy
8  Using Arduino / General Electronics / Re: Trying to understand pull-up resistors on: November 07, 2012, 07:31:19 pm
I appreciate the quick and thoughtful replies. I am really trying here but every time I dig into this I just lose a hold on these concepts.

Let me take a big step back and ask a question related to how I'm trying to understand this schematic, aside from the pull-up resistor specifically. This one should really highlight where I'm coming from.

If sensor pin 2 is input/output as the spec sheet explains, does this mean that pin 2 both sources and sinks power at different times depending on what it's doing? Or does power always flow through pin 2 in the same direction (and if so, how does data go the opposite way?). Related: does arduino pin 3 supply power to pin 2, sink power from pin 2, or both at different times?

If that question makes you think I have baked beans for brains, I can assure that when it comes to electricity and electrical engineering, I do. But I'm really trying here.

Andy
9  Using Arduino / General Electronics / Trying to understand pull-up resistors on: November 07, 2012, 05:39:21 pm
I am melting my brain trying to understand a very simple pull-up resistor configuration. I think I'm making this harder than it is.



Here's how I'm trying to think through this. Some or all of this may be wrong.

First off, my understanding of how at least part of this system works, is that sensor pin 2 is switched on and off internally by the sensor. The rest of my "understanding" is based on that, so if that's wrong, then it's all wrong.

* The pull up resistor ensures that when sensor pin 2 is switched off (disconnected) from arduino pin 3, arduino pin 3 still sees a small, consistent amount of current (from +5v) to keep it from floating. The resistor is called a pull-up resistor because the resistance it provides increases the voltage between the +5v output and arduino pin 3.

* When sensor pin 2 is switched on (connected) to arduino pin 3, arduino pin 3 sees a higher amount of current and a lower voltage (from sensor pin 2), because of the lack of resistance (as compared to running through the 4.7k ohm resistor).

Is that much correct?

FWIW, I think I have found the following documents to be helpful, but I'm certainly still not sure of myself.

http://www.thebox.myzen.co.uk/Tutorial/Inputs.html
http://www.seattlerobotics.org/encoder/mar97/basics.html
http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

Thanks so much for any help.
Andy
10  Using Arduino / General Electronics / Re: Just getting started - can't seem to understand this simple schematic... on: November 04, 2012, 08:59:10 pm
Gah. You are totally correct.

For some reason I was interpreting the "bottom view" diagram as a top view. I don't know why. I read the caption each time I looked at it. With the same configuration as in my picture but the sensor flipped around everything is working fine (same as in the parasitic configuration). I do have another one of these sensors, but I guess I'm lucky that I didn't fry the one I have been using so far.

Thanks to all who replied. Please forgive such a stupid mistake.

Andy
11  Using Arduino / General Electronics / Re: Just getting started - can't seem to understand this simple schematic... on: November 04, 2012, 08:43:23 pm
Hi,

5v is coming in on green, but I don't believe I have the sensor backwards. Green is connected to pin 3 (pin 1 is at the top in the picture). When I put the board back into the parasitic configuration, the sensor still appears to be working and accurate when compared to another temp sensor I have in the same space.

Just to clarify further, in that picture Green is connected to 5v and sensor pin 3, Blue is connected to Arduino D3 and sensor pin 2, and White is connected to Arduino GND and sensor pin 1.

Thanks.
Andy
12  Using Arduino / General Electronics / Re: Just getting started - can't seem to understand this simple schematic... on: November 04, 2012, 08:08:46 pm
Thanks for the quick replies. I have reviewed the data sheet (again) and I guess I just don't understand how to read these schematics, or at least not how to translate them to my breadboard. Please see the attached picture of my breadboard configured as I interpreted (apparently incorrectly) the non-parasitic schematic. If it's not clear, the resistor is connecting sensor pins 2 and 3.

If it helps, this is kind of how I am reading the schematic in English:

Connect sensor pin 1 to ground (Arduino GND pin on the side with the digital pins)

Connect sensor pin 2 to Arduino pin D3 (as specified in my sketch)
Connect sensor pin 2 to +5v (Arduino 5v pin) via 4.7k ohm resistor

Connect sensor pin 3 to +5v (Arduino 5v pin)

I imagine I am failing to understand the circuit(s) I have created on the board, even if I theoretically understand what the schematic is telling me to do.

Thanks again.
Andy
13  Using Arduino / General Electronics / Just getting started - can't seem to understand this simple schematic... on: November 04, 2012, 07:18:07 pm
Hey All,

I am just getting started with my Arduino Duemilanove. I have already successfully wired up a ds18b20 temp sensor and am graphing it via cricket on my Macbook. The trouble is, I had to use an alternate wiring method (parasitic, I think) to the one I originally planned to, and although it works, I want to understand the original plans and how to make them work.

Ultimately I used the wiring scheme found in this document:

http://www.hobbytronics.co.uk/ds18b20-arduino

and I see (around the net) that others that have used it too. Maybe it's even superior to the one I was going to use originally, but still, I'd like to understand how to make the original work.

Here's the original tutorial I tried to follow:

http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html

When I wire up my breadboard the way I think the schematic instructs me to, I can't read the sensor and if I leave it connected too long, things start to smoke (!). I have spent a few hours today reading on how to read wiring schematics, understanding pull-up/pull-down resistors, etc, and no matter what I try, I just can't get that hacktronics schematic to make sense to me (or at least, what I end up doing on the breadboard is just wrong). I think my confusion lies in how to tie in the pull-up resistor since that at least appears to be the only part that isn't 100% straight forward (for a beginner).

Would it be possible for someone to take a photo of a breadboard, or produce an image of one, wired how they interpret the hacktronics schematic? Alternatively I can provide a picture of what I think I should be doing, which isn't working.

Thanks a ton. I really want to make sure I understand what I'm doing, and am not just painting by number, but after hours of reading today, things aren't any more clear. I searched the forums and found mentions of the tutorial I am trying to understand, but none that shed light on my issue.

Andy
Pages: [1]