Data isnt written to SD-Card when plugged off from pc while using a Battery

Hello community!

i am facing problem which i couldt solve the last hours.

So my setup is:

  • arduino Zero
  • with a IMU Shield
  • inserted sd Card
    -3,7 V 900mAh Lipo

I attached my Code…

So the problem is:

The code works while the arduino is connected to the pc. It writes to the SD card.
But when i unplug it, it stops doing that while being coneccted to the LiPo.

Any advice? :slight_smile:

Thanks!

data_read_and_calibration_with_LED_and_save_data_to_SD_txt.ino (6.26 KB)

"But when i unplug it, it stops doing that while being coneccted to the LiPo."
That is because there is NO power to the Arduino while you are making the change.
Paul

Sorry I dont really understand what you mean.

Why is there no power? It is plugged into the pc and also already to the Lipo connected?

And what change do you mean?

xeonus:
Sorry I dont really understand what you mean.

Why is there no power? It is plugged into the pc and also already to the Lipo connected?

And what change do you mean?

Sorry, I read your description to mean you unplugged the PC and then connected the battery. What about the third setup when it is only connected to the battery?
Paul

So when it is connected to only the battery the DL1 LED on the IMU shield lights up but it isnt writing data on the sd as before when connected to the pc.

I could not find out what does it mean when the DL1 LED is lit.
But what is strange is. When i unplug the IMU shield from the Arduono MKR Zero, while the battery is still connected to the Zero, there is no LED at all.

Not sure what is happenening. I think the LiPo with 900mAh 3,7 should work.

Edit:

Okay so I tested the charge of the LiPo.. it is fine.
I tested the Blink script and it works even with out getting power from the pc.. so LiPo is confirmed working.

Maybe my code isnt working when is cut the power to the pc?

Okay it is working fine now.. I am not sure what the problem was. Thanks anyways for the replies :slight_smile: