Go Down

Topic: Can you tell me what this means and (Read 1 time) previous topic - next topic

hextejas

Thanks again to all who are trying to help me understand this.
And no offense meant Raschemmel, but I am hoping that I will not have to dig too deeply into why and how transistors work in order to get a sketch to work.
My background is that I have a lot of experience designing programs((sketches) and making them work and I didn't need nor want to know what was needed (a. Pull rexistor) on the wire that connects the devices that will need to talk to each other.
As Perry said, this is not ethernet but that was how I was coming at this. As if I were plugging a new slave device into a network and I might or might not need something called a resistor on the connection.
That bit is a whole new concept and I cannot imagine why my simple little temperature sensor would need a resistance between me and the master. And what the heck do I do when I need 3, SDA and SCL connections and there is only 1 tiny little hole in the Master? Does that mean that I will need to tie them together somehow? I understand the addressing bit so that's a start, and  the above schematic helps a bit.
When I have tried  something similar before,, it would had lead to smoke.
Electronics stuff is weird and that bit about VCC (collector) being at the top of the page is very interesting.  That explains why it is not V+
VCC must share a place with North. Isn't N(North) always at the top :=)  ?
Enough for now, I am going to go think about this in light of what y'all have tried to explain to me.
Yes, Google is my friend but you need to know what to ask.

raschemmel

#31
Nov 24, 2020, 01:44 pm Last Edit: Nov 24, 2020, 03:58 pm by raschemmel
" Does that mean that I will need to tie them together somehow? I "
Yes. They are all tied together on the 'bus'. Google it.
That's the function of open collector. All devices share the SDA & SCL lines.
Vcc is V+ but your schematic is a MOS schemaic so it uses Vdd (Drain Supply) because mosfets don't have collectors. They have Drains. But maybe that's TMI.  No one can force you to learn anything until you are ready to learn it. As you recall, you asked us what it means. It's almost impossible to explain why pullups are needed for I2C without talking  about 'open-collector' and it's hard to discuss 'open-collector' without discussing transistors.  Some people like to be perfectly correct so they will insist it's 'open-drain' not 'open-collector' but most people just call it open-collector when talking about I2C. Each signal needs one resistor so if you have less than 10 'little things'  then you only need to put pull-UP  resistors on one of them.  Also, there probably won't be any 'holes' because 'through-hole' technology has been mostly replaced by surface mount so there will be pads for SMD resistors that will have numbers instead of colored stripes. That's progress...

hextejas

Thanks again for your patience. My TMI starts when you start talking about drain vs collector. I am only interested in SDA and SCL as they are my interface to the sketch (program). The sketch is complicated enough.
Referring to the sketch that I posted, it shows VDD connected to the SDA and SCL buss. I am only aware of +5V and +3.3V as furnished by the Arduino, or the +5V as furnished by my external power supply. There are no VDD and VCC indicated on the board.
So, using a breadboard, i guess that I will wire the SDA from the ESP32, and the SDA from each device to the breadboard, and then wire the breadboard to a 4.7k resistor to the +5V. And keep a fire extinguisher handy.
We'll see what happens.

TheMemberFormerlyKnownAsAWOL

#33
Nov 24, 2020, 05:35 pm Last Edit: Nov 24, 2020, 05:37 pm by TheMemberFormerlyKnownAsAWOL
What makes you think pulling a 3.3V-only capable pin to 5V is a good idea?

Don't have a fire-extinguisher on standby, just a credit card.
Please don't PM technical questions - post them on the forum, then everyone benefits/suffers equally

raschemmel

#34
Nov 24, 2020, 05:38 pm Last Edit: Nov 24, 2020, 05:40 pm by raschemmel
Quote
There are no VDD and VCC indicated on the board.
As mentioned before, your boards are MOS so Vcc does not apply,
Also, "Vdd" and "Vcc" are generic terms that represent whatever power supply you are using.
The 'little things' have some specific power supply voltage that they operate at, and whatever that is, that is "Vdd".
It's really that simple.
I looked at your OP and I didn't see any link for the 'little things'.
Please post a vendor link so we can look at the supply voltage of the 'little things'.
Quote
What makes you think pulling a 3.3V-only capable pin to 5V is a good idea?

Don't have a fire-extinguisher on standby, just a credit card.
I was trying to get to that detail but I have to edge the information in little by little to avoid TMI.

TheMemberFormerlyKnownAsAWOL

Sometimes it is better to have TMI than TLM
Please don't PM technical questions - post them on the forum, then everyone benefits/suffers equally

raschemmel


TheMemberFormerlyKnownAsAWOL

Please don't PM technical questions - post them on the forum, then everyone benefits/suffers equally

hextejas

What makes you think pulling a 3.3V-only capable pin to 5V is a good idea?

Don't have a fire-extinguisher on standby, just a credit card.
Hahah, that is probably why I have spent way too much $$$ on this "intermediate" grade project.
And I don't usually do just guess and plug.. What I do is look at the pin descriptions for the addon devices to see what they say as to voltage.
Mine are:
BNO055 VIN 3.3-5.0V (easy to understand)
PCA9685 VCC This is the logic power pin, connect this to the logic level you want to use for the PCA9685 output, should be 3 - 5V max! 
==============================================
So it sounded like I could use either 3.3 or 5
==============================================
However when I read the following it gave me pause cause I had no idea what I had to do if anything.
=================================================
It's also used for the 10K pullups on SCL/SDA so unless you have your own pullups, have it match the microcontroller's logic level too!
Does this mean that whatever voltage the Feather ESP32 or Feather Huzzah uses as a logic level, I should use the same ? Never mind that I have no idea what that means.
I know of only 1, voltage on my microcontroller. 5V from the USB or battery, though the board does furnish 3.3V output.
HAH ! I just did a google search of Feather ESP32 and Feather Huzzah, logic level and it came back as 3.3V.
So maybe I will need to do some rewiring.
I think writing programs is easier.

raschemmel


hextejas

#40
Nov 25, 2020, 04:55 am Last Edit: Nov 25, 2020, 05:03 am by hextejas
Well, I am back to my original post.
I want to connect a PCA9685 to a Feather ESP32, SDA and SCL and here is what is said about those 2 devices.
ESP32:
Note that the I2C pins do not have pullup resistors already! You must add them if you want to communicate

PCA9685 
SCL - I2C clock pin, connect to your microcontrollers I2C clock line. Can use 3V or 5V logic, and has a weak pullup to VCC
SDA - I2C data pin, connect to your microcontrollers I2C data line. Can use 3V or 5V logic, and has a weak pullup to VCC

It sounds like the pullup resistors is there. Being weak is probably important but I sure don't know why or if it is important.

This is getting me nowhere as I can't seem to get a straight answer.

Let me see if I can re-phrase it.

Given the above 2 devices that I want to connect via SDA and SCL, do I need a resistor in series with the connection? If yes, what value?







PerryBebbington

The resistors don't go in series with anything, they go between Vcc and SDA and similarly to SCL. If it has weak pull up resistors it might work ok. If not try maybe 2k2 to 4k, exact value unimportant.

hextejas

The resistors don't go in series with anything, they go between Vcc and SDA and similarly to SCL. If it has weak pull up resistors it might work ok. If not try maybe 2k2 to 4k, exact value unimportant.
Thank you Perry, your answers are clear and to the point. Though they lead me to ask this.
I have 1 SDA connector on the Feather and I need to connect it to both VCC and the SDA on the slave device.
Doesn't that describe a parallel circuit ?

TheMemberFormerlyKnownAsAWOL

You don't ever connect SDA directly to Vcc; how would you pull it down if you did?
Please don't PM technical questions - post them on the forum, then everyone benefits/suffers equally

aarg

#44
Nov 26, 2020, 04:09 pm Last Edit: Nov 26, 2020, 04:10 pm by aarg
From the Adafruit PCA9685 page,

Quote
R3 and later Arduino wiring (Uno, Mega & Leonardo):
(These boards have dedicated SDA & SCL pins on the header nearest the USB connector)

    +5v -> VCC (this is power for the BREAKOUT only, NOT the servo power!)
    GND -> GND
    SDA -> SDA
    SCL -> SCL
Try it and come back if you have any problem.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

Go Up