SDA and SCL not analog pins

Nevertheless, unless you post links to these, there is no way for anyone here to confirm your claims. :crazy_face:

Would be good if you could post a picture of the board.

I would not fault the official documentation, because all the Arduino branded boards use A4 and A5.

What can get confusing is that analogRead() will accept both the Ax designation and x without the A to refer to the same analog pin (as an example A4 or 4), but the other I/O functions (pinMode, digitalRead, digitalWrite) use x to refer to a digital pin, needing the Ax designation for digital use of the analog pins. (there are digital pin numbers for the analog pins, but they are not portable across different boards).

Thanks. Herewith a report of my progress, or lack thereof. 1. I was using a Nano clone, a servo controller clone, and a power supply for each. Controller power is just for the servos, it gets chip power from the Arduino. I'm using the standard Adafruit test software. And I've used the controller clone before with success, so I don't think there's a design flaw there. 2. I've replaced each hardware piece with another, one at a time. No joy. I've tried SDA/SCL on the analog pins and on the digital pins. No joy. I've run the I2C scanner on both pin sets and found nothing. I've checked all the wiring for continuity and even looked for bad solder joints. Nothing. 3. I did find that the servo power supplies I tried tested at 5.9v and 6.2v at the connector plug. Once I plugged them in they both dropped to something under a volt. On both servo controllers. Probably normal, since I've seen it on multiple boards. 4. Finally, I replaced the nano with a uno. Still get no movement out of the servos, but at least the scanner found the board! So I'm assuming there's a design flaw in the nano clones. They've worked fine for everything else, but I2C seems to have been left out. FWIW, the nanos used a chip labelled Atmel Mega328P, and the uno had an Atmel ATMega328P-PU. Doesn't mean anything to me, but might to some of you. I'm going to try one more time tomorrow, with a uno and a servo controller with nothing but the wires shown in the Adafruit manual. I'll post the results. If it doesn't work I'll just break the task down to subunits and use multiple nanos running the software servo control. If it does, I've got a lot more head scratching to do :-). Again, thanks for the scanner code - at least I know a little more than I did before.

I guess you should know how to find and read a data sheet then. Check the sections on alternate pin functions.

I suppose would be disappointed, but I have never owned a true Nano, only clones. Dozens of them. Scads of projects using I2C. Never have I seen one that didn't work. Ever.

From your project descriptions, I guess that you're probably overloading the Nano power supply.

Edit - there certainly have been pirated IC's with flaws. Generally, it is not so easy to make a fake, so in the quantities that must be made for the perpetrators to make a profit, most fakes are known and you can index them online. I may have seen 328 clones mentioned somewhere, but I can tell you that the price of real 328s in the say, 100,000's quantity, is so low that most "order online" Nanos have at least a genuine 328, even if maybe it is gray shift or "borrowed". So, it's possible you've been bitten, but some swapping with other Nanos would seem to be the key to being sure, assuming that is what you want to be.

WRT pinouts, I expect to see labels on the PCB itself that are accurate. I can work it out from there.

The closest I ever got to a data sheet was assembler coding for an 8080 and a GE425. Mostly I used Fortran and Cobol until C came along. I did look at the Atmel data sheet, but the I2C section was something like 7 pages - I'm a software type :-). Could be. So I took a completely bare Nano and hooked it up to the servo controller using only 5V,GND, SDA, and SCL as per the diagram in the AdaFruit instructions. Then hooked up a separate 6V supply to the controller to power the servos.. And yes, the I2C sniffer found the controller. But running the AdaFruit test program no servo movement occurred. SO: I tested the servo power plug to make sure it was indeed 6V. But testing the connection point on the controller, with both boards powered up, I was getting only some fractional voltage. No wonder the servos weren't moving :-). So just on a whim, I removed the power (USB) from the Nano. Lo and behold I now had the full 6V on the controller. There is absolutely no connection between the 6V servo supply and the 5V and I2C on the Nano. Unless it's all the way back at the wall sockets. Gremlins flourish! I'm going to try again with a wall wart instead of USB power, and then with a Uno instead of the Nano. Is it possible that the I2C pins on the Nano are somehow being treated as analog inputs?

It's far more likely that you made a wiring or component error. So please post a complete wiring diagram.

That's why I checked very carefully, including checking for connectivity. There's only 6 wires! VCC,GND, SDA,SCL and 5V + and - for the servo array. And the wall wart for the Nano/Uno. I hooked up one servo only for the test. Not a lot of room for error there. And I'm using the Adafruit software to test with. I've gotten the same results with two different Nanos and an Uno, and two different servo controllers. Today I got really paranoid and switched to a different powerstrip and wall circuit. I've got the Adafruit source and my next step is to reactivate the debug print statements in it. But I think I'll do something else for a few days and come back to the wiring after a rest. Thanks for the suggestions.

Ah, so you refuse to post a diagram? Okay good luck.

The grounds of the two power supplies must be connected together.
Power Supplies

There is absolutely no connection between the 6V servo supply and the 5V and I2C on the Nano.

The grounds of the two power supplies must be connected together.

I agree. But the only possible connections are through the ground from the Nano to the controller (as per the AdaFruit wiring diagram) and/or through the house power and the wall warts. Those don't seem likely.

But hope arises! The sample program calls the Adafruit driver which in turn calls the Wire I2C library. I never read up on that library because I figured the manufacturer of the board knew how to use it. Well, I finally read up on Wire/I2C and found reference to pullup resistors. The Adafruit documentation makes no mention of those, so I looked to see if they were built into the controller board. Didn't seem to be. So I'll install them and see what happens.

I thought a simple written description of four wires would suffice. But if you simply have to have a visual depiction just look at:


So where is it?

A schematic is the only way to communicate unambiguously what wiring you have.
You repeated this

given your description means you have not connected the grounds together. In this context ground is not the mains ground, it is the negative of both power supplies use should be connected together. You have to do this in your wiring, we need to see which is wrong, your words or your wiring.

You haven’t even looked at the link I posted.

Sorry, I am aware that grounds are usually connected. But the diagram which Adafruit provided (and which I sent you a link to), did not show any such connection. Since both grounds are present on the controller board, I presumed they were connected internally. Maybe not. I'll try connecting them externally.

And again, the Adafruit diagram should suffice for a schematic - the same link will also lead you to a diagram of the board's internals if you're interested.

OK - The point is to show YOUR wiring, not adafruits! How can we be sure you know what you are talking about if all you say is "And again, the Adafruit diagram should suffice for a schematic".

As others will testify, linking to an external schematic, then showing your own wiring has resolved errors on many occasions.

If you don't post YOUR WIRING as an image, I'm out!

Me too. You are not showing the right attitude for some one asking the questions.

Where is this link? It is customary to say what reply number this link was in.

OK, final post. All of the grounds are connected together, and connectivity tested with a meter. The controller board has pull up resistors on SDA and SCL included, although they are 10K and most docs I could find say 4.7K is ideal.

So I've got better things to do with my time. I'll go back to the software servo control, probably using something similar to the "sensor shield" so I'll have the 3 wire connection. Someday when I've gor everything running and I'm bored, I'll go back and pursue the problem just out of curiosity.

Bye for now.

By George, I think I've got it! (couldn't resist). Remember I'm using an adafruit test program to test an adafruit clone 16 channel servo controller. The test program has a comment that says "called this way it uses the default address or 0x40." Hmmm. In 40+ years of programming, I've been caught by accepting defaults before. So I put in the 0x40. Voila! Everything works.

I'm just suspicious enough to wonder if the default only works on "real" Adafruit boards, but I can't see how they'd know.

Would all the people who told me I wired it wrong please stand up :-).

I like your name !

If you had posted a diagram as requested, we could have moved past that impression faster.

1 Like

So just to clarify things , are you now connecting SDA and SCL to pins A4 & A5, or D4 & D5?