Powering 5v SD card reader and Barcode reader with Core

I have been working on this project for almost 4 weeks now. I havent had any issues with Arduino Leonardo. I recieved the Core last week and I was playing with it and now I am running into few issues.

  1. I tried to powerup the core with 3v3 and Gnd, which ended up me fully flashing the device. Now it works fine with no issues. From this day onwards I have been powering it up via Vin [Resolved i believe]

  2. I introduced PS2 barcode to Core and I ran into few problems, which I am trying to solve with the help of ScruffR. I am getting weird characters [In progress]

  3. Here is the new challenge I came across and I need your help to resolve it. Setup is provided below.
    a. The barcode reader requires 5V so we powered up the barcode
    b. Both arduino boards are powered by USB
    c. After doing all these, I am not able to upload/flash code to the Core via Web IDE
    d. I am getting Error 500 or its blinking Cyan

  4. I assumed the problem was with network and then tried it at a different place and the problem persisted. I flashed the device using DFU mode and things were back to normal.

  5. I tried to do something with an SD card which requires 5V. I took the similiar approach to this project. I connected the Arduino Leonardo for 5V. I got the same problem as before. I couldnt flash the the code through Web IDE. I then flashed the particle core using CLI and things were back to normal.

  6. Can anyone let me know what I am doing wrong here? I am thinking of trying the following option:
    a. Use voltage booster on 3V3 to boost 5v

I am open to suggestions at the moment. I would really appreciate any feedbacks or leads on this matter.

Thanks!

I just read about Logic Level Shifter, could it be the issue here?

Level shifting should not be neccessary when using D0/D1 since they are 5V tolerant and 3.3V is safely detected as HIGH even by 5V devices.
But it wouldn’t harm either :wink:

Then why I am getting this issue? is it because I am supplying 5V from a different source and dont have a common ground?

@boniface316,

  • Since the Core can take up to 300ma, powering it with 5v via Vin is a good idea. The Leonardo 3.3v pin can only supply 50ma!

  • The PS2 scanner issue may be related to the fact that you seem to be powering a lot from the Arduino. If you power the Leonardo, the scanner and the Core from a single USB port, it may be pushing its limit. You may want to reconsider your power distribution.

  • The SD card you have is designed for 5v operation and uses voltage dividing resistors for the SPI lines. This will not work with the Core. You are better off making your own this way.

  • Oh, and YES all your grounds should be tied!

:smile:

2 Likes

My core is spitting out value, but its just random characters. I dont know how to go foward :frowning:

Hi @boniface316

Have you tied the two grounds together yet?

That’s the first thing to try since you won’t get good results without that.

What are you actually using the Arduino for?

If you are not using it as controler but only as power source (which your diagram suggests), you’d be better off powering the Core directly off a 5V/2A wall wart or such and power the scanner off the Vin pin of the Core (unless its max current draw is greater than 100mA).

If it’s more than 100mA, you might have to power the Core and scanner in parallel off the wall wart (into Vin of the Core).


Before going into the “corrupted” data in the other thread, you’ll have to get the power sorted, since inadequate power setup might be causing the corruption.

1 Like

I tried two grounds together but no luck still. I didnt get much chance to work with it on weekend. I will do that today.

I am using the Arduino to powerup the barcode scanner. I am going to try with Vin today to see whats happening with the data.

Thanks!

@boniface316, any news on your problem?

As I’m in the middle of playing with a PS/2 keyboard test sketch for another thread, this might be interesting for you too.

Keyboard input for Particle

ScruffR,

My friend Bryan was able to figure it out. Apparently it was an issue with the library I loaded. We are able to read the barcode on the serial right now.

I really appreciate your input!

Thanks,

Boiface (Yogi)

1 Like

@boniface316, can you share the library you used for members who may read this topic? :smile:

1 Like

The library I used can be found here:

https://dl.dropboxusercontent.com/u/36134145/PS2Keyboard.zip

Provided by the wonderful kennethlimcp

2 Likes

This is for newbies:
I just learned how to flash a code through DOS prompt. You can easily upload a library using a command prompt.

  1. You have to put all the library into a folder with the *.ino file
  2. Goto Cmd
  3. Goto the folder before
  4. Enter the following command: particle flash Device_name folder_name

I used this method to upload @kennethlimcp’s library to my device to make it work!

More details are here

1 Like

With your help. I finally figured out how to put things together and draw schematics :smile:

1 Like

@kennethlimcp, Thanks for the parts!

2 Likes