Arduino Uno R3 burned out QMC5883L sensor

So I need to integrate a knob potentiometer,5kOhm, with a magnetometer sensor on a breadboard with an Arduino. The knob potentiometer and magnetometer worked when tested separately. The knob potentiometer's middle prong is connected to the A0 pin and the qmc5883L is connected as directed. The potentiometer code, which displays the value of resistance on the potentiometer, successfully returned values of 0-1023. The problem occurred when I connected them both on the breadboard as shown in the attachments. I ran the magnetometer code for about half a minute when I smelled the notorious "funny smell". I quickly ran the I2C to see if the sensor would still be detected, but it was not. Interestingly, the I2C scanner code would be "stuck" when the sensor was connected, but would continuously display the "Scanning..." when it was disconnected. Also the VCC port on the sensor was a little scorched. After I burnt the sensor, I ran the potentiometer code(with the burnt sensor still connected) and then the values would be offset by 1 or 2, topping at 1021-1022 and hitting the minimum at 2-3, which is obviously erroneous. I am connecting the magnetoemeter sensor's VCC and GRD after the potentiometer which is the only clue I have to solve this. I am receiving a second sensor so I don't wanna kill this one. Thanks in advance. (FYI I'm not an electrical engineering major so sorry if I misunderstand simple EE concepts.)

Your connection of wires between arduino and the magnetometer don't appear to give anybody a clear picture/idea of the connections ----- because the photos just don't show exactly where the wires run.

The snippets of images you have doesn't provide very clear details of the interconnections. It's like driving a car with somebody putting a tube in front of our face to peer through, so that we can't see ALL the details outside of the visual window of that tube.

My initial guess about the issue is ----- your Vcc pin of your magnetometer is erroneously connected to GND of the arduino. And your Gnd pin of your magnetometer is erroneously connected to the 5V pin of the arduino. This means the power applied to your magnetometer is probably in a reversed polarity, which could or maybe have damaged your magnetometer.

To try cut down on wiring errors ..... you could in future use colour coding of wires. Eg. red or orange colours for positive supply wires. And colours like green or brown or black for GND wires. If you use a colour code for wiring, then it can help reduce chances of issues like this. Otherwise, if you don't use colour coding --- then that's ok too --- as long as you check and double-check that you have the CORRECT wiring between devices.

Referring to the topic title of this thread -- it's not the arduino that burned out the device. It's probably 'you' burned out the device due to a mistake with wiring. But that's ok ----- this is only a point about placement of blame.

QMC5883 is a 3.6 volt chip, did you connect 5 volts to it?

JCA34F:
QMC5883 is a 3.6 volt chip, did you connect 5 volts to it?

That information above is correct. Although, the module board allows a DC supply voltage in the range 3 volt up to 5 volt DC.

My wiring was set up correctly. If it wasn’t, the sensor would never have worked separately, which it did. The magnetometer worked for half a minute, if I had the VCC and GRD connections reversed it wouldn’t have given any data. Here are addition images. I have rewired with white wires for - and black wires for +. All I did was combine the potentiometer and sensor on the same breadboard, with no interconnecting wires between the two.

And yeah I connected it to 5V.

kevinmed:
My wiring was set up correctly. If it wasn't, the sensor would never have worked separately, which it did.

Then could you please explain this .... in the diagrams seen below?

The left-most pin of the sensor is supposed to be a Vcc pin, right? If so, then please explain why your diagrams appear to have that pin connected to GND pin of the arduino.

It also appears that your GND pin of your sensor (in the photo) is connected to the 5V pin of your arduino. Your black coloured wire.

Oh you're right! Please excuse this wiring mistake as this setup and the setup that caused the sensor to burn out are the exact same except for the placement of the + and - pins of the potentiometer and sensor's VCC and GRD. I have not used the magnetometer code but the potentiometer code does still work if that is relevant. Thanks for your help

kevinmed:
Oh you're right! Please excuse this wiring mistake as this setup and the setup that caused the sensor to burn out are the exact same except for the placement of the + and - pins of the potentiometer and sensor's VCC and GRD. I have not used the magnetometer code but the potentiometer code does still work if that is relevant. Thanks for your help

Most welcome kevin.

@kevinmed

Your DUPLICATE post has been DELETED.

I suggest READ THIS please.
It will help you avoid the ire of both other users and moderators.

Bob.