Uno - Using 5v and 3.3v pins at the same time?

That's completely irrelevant. The circuits inside the controller convert the analog joystick readings to digital. From the outside, from the Arduino's perspective, it's a digital device.

Thanks for the clarity, sorry for the confusion! Any idea why I might be having those issues with the data being off then? Any way to troubleshoot it? :slight_smile:

Can you post links to the actual interface you are using between the UNO and the nunchuk, and a diagram or pictures of the actual wiring. Posting your code would also help.

The fact that you are asking about the 3.3V pin, while a level shifter would have needed that to work properly anyway, tends to indicate you did not wire things properly.

Hello!

I've been researching and designing my first big project over the last couple weeks, and would really appreciate getting to check my plans before I start to build, as I've never tried to use two i2c devices at once. If anyone has any tutorials for doing this without a breadboard I'd be very thankful.

For some context, I have made a quick wiring diagram in PowerPoint. I'm hoping to use my Arduino Uno to control 10 servos through a dedicated servo board, given instruction through the use of an official Wii nunchuck. Rarely all servos would be active at once, and so I figured a 7100mah battery would work well, put through a 5V UBEC to reduce the voltage before it reaches the circuit. I've had to also include a level shifter between the servo board and nunchuk as the controller operates on 3.3vs as apposed to the 5v everything else uses. I can give more detail on the specs of my components if needed.

On the other hand, if this isn't possible, I'd really appreciate being directed towards alternatives to the i2c based nunchuk. Hopefully without having to wire and design my own controller, as I have limited time.

Many thanks!

if both devices has identical address, you should change it on the one

What dictates the address? I was about to put together a quick test circuit with just the one servo to test for the address names :slight_smile:

wait,

Two different i2c devices into one Arduino

you will definitely get no problem with it.

I've just had a look, it seems like the nunchuk is a 0x52, while the servo board is between 0x60-0x80. There shouldn't be any conflict of address at least! Will my circuit work if I wire it like in my diagram? Thanks for responding so far :slight_smile:

i will say yes.

You have not connected the Vcc pin of the servo board, it's chip will have no power. It is not internally connected to the V+ pin, so you will need to connect it to 5V.


I hadn't noticed, thank you! I've fixed the diagram now :slight_smile:

Now there is no power to the Uno!


Does it not come through the servo board sorry? I'm using this tutorial image as my main reference for the board wiring, I can provide the YouTube video if it'll help

Yes, it does come through. But it comes to the V+ pin, not the Vcc pin.

In your diagram in post #1, the Uno would be powered but the chip on the servo board would not.

In the above diagram, the Uno would power the chip on the servo board, as long as the Uno has its own power source, but no such power source is shown. The motors would be powered from the 5V power through the servo board, not from the 5V supply from the Uno.

Bugger! I hadn't even noticed that before, thank you! I was planning on powering the board using the large battery, will I need a second one just for the board?

No, you just need to connect the V+ and Vcc pins together.

The servo board was designed to be flexible, so that the servo motors could be run from a higher voltage like 12V for example. But the main chip on the servo board would be damaged by anything over 5V, and the board does not have it's own regulator, so that's why it has separate V+ and Vcc pins and they are not connected together on the board. But it's ok for you to connect them because you are powering the motors with 5V.

Alrighty, I'll give it a go tomorrow! I've also just seen on my UNO that there's actually two dedicated pins for SCL and SDA, can I use those pins as well as A4 and A5? Or will I need to connect the wires like in my diagram just to A4 and A5.

If you have SCL and SDA pins, those are the ones you should use. They most sure will work with an I²C library. No idea in using additional pins for I²C, just because you have two devices, since they are on different addresses. I think we would need more pins only if the two devices have the same I²C address and they can't be changed.

Those pins are connected together on the Uno board (A4 == SDA, A5 == SCL). They are not separate pins. It doesn't matter which 2 you connect your devices to.

@Johan_Ha if both i²c devices had the same address, connecting one to A4/A5 and the other to SDA/SCL would still not work. They are not separate pins.

I'm asking if I can use all 4 pins at once to save me from cutting and soldering more wires together, sorry :slight_smile: From the 10 minutes or so of searching online, it seems like it's okay to as they're connected already.

Edit: Fairly certain I'm working with different addresses, worst comes to worst my servo board seems to have the option to solder an address to change it if I somehow need to

1 Like