Fix Cloned Arduino NANO CNC Shield

25,429

48

76

Introduction: Fix Cloned Arduino NANO CNC Shield

Modifying Clone Keyes CNC Shield.

On the web are Chinese cloned Keyes CNC Shields for the Arduino NANO.

They are cheep and good value. BUT.

If you want to set Micro Stepping as they are, you can't.

Who ever cloned/made this shield made a mistake and put the pins that should go to Vcc, to GND.

As the pins that set the Micro Step Mode are already pulled down to GND internally as default, and to change there state, they need pulling up to Vcc.

Step 1: Ways to Identify a Cloned Arduino NANO CNC Shield

1. The original Keyes Nano CNC Shield has a dark solder mask. (it looks blackish)

2. there are some print errors. Pins D9 and D10 are incorrectly identified. Control is spelt Contr01.

3. Look at the circuit track and see if the pins are connected to GND.

Step 2: Isolating Pins Top Side

The first step to put things right, is to isolate the pins from the GND rail.

This needs doing in Eight places.

First Two are on the top side.

I found, warming the header pins, made it easier to slide off the plastic supports.

Step 3: Isolating Pins Bottom Side

The next Six are underneath.

Step 4: Check That the Pins Have Been Isolated

After isolating the pins, check that they Are Isolated, using a circuit tester.

Check that they are no longer connected to ground.

Step 5: Connect Broken Ground Track

Isolating the pins from the GND track has separated the GND track and need reconnecting in two places.

Solder two pieces of tined copper wire in the place shown.

Step 6: Connecting Pins to Vcc

Now the isolated pins need connecting to the Vcc circuit.

Luckily there are pins connected to this circuit close by to the isolated pins.

Using tined copper wire make solder bridges to these pins as shown.

Be sure to keep the tined wire away from the track that runs under the bridge.

Step 7: All Finished

That's it.

The Micro-Step jumper Header Pins should now work as they should.

Step 8: GRBL Code

I write my own code when using this board, BUT.

As pointed out by FrancescP2 (in comments), If you are going to use gbrl firmware some changes to the code need making.

When you download the gbrl-master and unzip the file, in the folder you will find a folder called grbl, inside that folder you find a folder called cpu_map, inside that folder you will find 2 files, cpu_map_atmega328p.h and cpu_map_atmega2560.h.

As this shield is for the Arduino NANO, the file that needs changing is: cpu_map_atmega328p.h.

Open the file and you should see as shown (or similar) in the screenshot.

There are 2 ways to do this:

1. Only use cloned shield. If you don't intend to use a shield that is configured correctly.

Using screenshot as reference:

Line 39, change 2 to 5.

Line 40, change 3 to 6.

Line 41, change 4 to 7.

Line 47, change 5 to 2.

Line 48, change 6 to 3.

Line 49, change 7 to 4.

2. If you want to be able to quickly change from one type of shield to the other. (as shown by FrancescP2)

I will do this higher line numbers first so original line numbers (screenshot) I reference stay same for a time.

Lines 47,48 & 49 need replacing with:

#ifdef KEYS_CLONE
#define X_DIRECTION_BIT   2  // CLONE NANO Digital Pin 2
#define Y_DIRECTION_BIT   3  // CLONE NANO Digital Pin 3
#define Z_DIRECTION_BIT   4  // CLONE NANO Digital Pin 4
#else
#define X_DIRECTION_BIT   5  // Uno Digital Pin 5
#define Y_DIRECTION_BIT   6  // Uno Digital Pin 6
#define Z_DIRECTION_BIT   7  // Uno Digital Pin 7
#endif // KEYS_CLONE

Lines 39, 40 & 41need replacing with:

#ifdef KEYS_CLONE
#define X_STEP_BIT      5  // CLONE NANO Digital Pin 5
#define Y_STEP_BIT      6  // CLONE NANO Digital Pin 6
#define Z_STEP_BIT      7  // CLONE NANO Digital Pin 7
#else
#define X_STEP_BIT      2  // Uno Digital Pin 2
#define Y_STEP_BIT      3  // Uno Digital Pin 3
#define Z_STEP_BIT      4  // Uno Digital Pin 4
#endif // KEYS_CLONE

After line 30 insert a variable that can be changed to decide which shied is used?

#define GRBL_PLATFORM "Atmega328p"
#define KEYS_CLONE true

Changing the value of KEYS_CLONE:

true = using clone

false = using correct shield.

(FrancescP2 has given a link to a file he has alterd)

Step 9: Some Pin Changes in Grbl

If using the latest version of grbl, check there web site for some pin changes.

Step 10: Take a Photo of Your Work

Lets see how many "I Made It"s on this little instruction we can get.

I am sure there are a lot of these modules sold on the net.

  • Sign up (If you haven't).
  • Take a photo of your work.
  • Click the I Made It button.
  • Add your photo.
  • Click Post.
1 Hour Challenge

Participated in the
1 Hour Challenge

7 People Made This Project!

Recommendations

  • Make It Modular: Student Design Challenge

    Make It Modular: Student Design Challenge
  • Stick It Challenge

    Stick It Challenge
  • Trash to Treasure Contest

    Trash to Treasure Contest

76 Comments

0
FrancescP2
FrancescP2

Question 2 years ago

Using GRBL, I need to do also that change in code (on cpu_map_atmega328p.h) for a normal use because this PINs are also wrong in comparison with the original Keyes board.

I not tested changing micro-stepping, is not needed for me at this time. But you know if this 2 changes are needed to work as the original board?

Screenshot-2019-08-11-15-15-55-491x425.png
0
Palingenesis
Palingenesis

Answer 2 years ago

You are correct. Both changes will be needed.
I have not noticed this because I do not use GRBL.
I use this board because it is cheep. (obviously for these reasons)
I write my own code, and have written it to suit the shield.
Thank you for pointing this out.
Do you mind if I use you Picture?
And I will edit and add the information to the end of the Instruction.

0
FrancescP2
FrancescP2

Reply 2 years ago

Of course you can use it, maybe the full file for copy&paste content was better for new users reading this.

My "modified" file:
https://drive.google.com/file/d/1LgeL0ouESdkTK9Pks...
The original file: https://github.com/grbl/grbl/blob/master/grbl/cpu_map/cpu_map_atmega328p.h

And thanks to this post I learn a little more. I compare your fix with another project that I'm following called ESP32Controller from Simon Jouet, and as you can expect, the image contains the same you explain step by step to fix it.

I see some time before on Youtube about this problems, but I don't understand well what they are explaining, now I can also fix it.

The important conclusion all of us must to learn: Don't buy clones, they are bad copies of the original ;)

Screenshot-2019-08-11-20-54-55-538x690.png
0
DavidF15
DavidF15

Reply 5 weeks ago

The page at https://osoyoo.com/2017/04/07/arduino-nano-cnc-shi... has links to a grbl configuration with swapped and un-swapped pins: https://osoyoo.com/wp-content/uploads/2017/04/grbl... as well as a replacement config.h file with them swapped again: https://osoyoo.com/wp-content/uploads/2017/04/conf...

From looking at the code differences and comments, I think someone copied a Protoneer CNC V3 Shield Uno setup from the https://github.com/Protoneer/GRBL-Arduino-Library fork, and then swapped the pins for a Nano configuration, and then swapped them again.

GRBL is a confusing system of forks. If you wanted to use the more recent gnea/grbl fork for these nano shields, the code suggests doing the changes in cpu_map.h or config.h.

0
Palingenesis
Palingenesis

Reply 4 weeks ago

Hi DavidF15, osoyoo is just look like a seller.
Keyestudio was the the original maker of this board, it was made open source, when it was copied by Chinese manufactures they made some mistakes.
The original by (Keyestudio) was designed for GRBL.
If you by an original Keyestudio version you will have no problems.
This is about making the clone, Stepper Timing Selection work. (jumpers)
Using GRBL on the clone is a second problem, which is easier to fix through the firmware, shown in Step 8, yes by changing the CPU Map.
It does not mater which fork you use, you have to change the CPU map, this is because some Arduino pins have been connected to the wrong pins of the Stepper Driver pins.

0
Palingenesis
Palingenesis

Reply 2 years ago

Thanks, I decided to write instruction on how to change the original file from grbl, just in case the file is ever revised.
Note to others reading this: Just change the file with the one FrancescP2 has given, the original hasn't change in the last 4 years.

I imagine now that all is sorted, there is an assembly line in China doing the alterations. hahaha

0
matt759537
matt759537

Question 2 months ago

how do you isolate a pin? i get desoldering a pin, unsure what isolating means

0
Palingenesis
Palingenesis

Answer 2 months ago

To Isolate = Cause to be or remain alone or apart from others.
Basically: In step 4. Check that the shown pins are not connected to the GND (ground) pin of the circuit. That there are separated from the rest of the circuit.

0
tefoster11
tefoster11

2 months ago

Hi - Thanks so much for this instructable, it is exactly what I am looking for. I understand all of the work that needs to be done on the bottom, but can you help me with the top part? I can't see the pictures clear enough to do the work on the top. I am so frustrated with this, I expected it to work, now I'm stuck with a book end unless I can figure out how to correct the top. Thanks, Tom

0
Palingenesis
Palingenesis

Reply 2 months ago

I have done a new image for you, hope it helps.
The cuts are between the yellow lines.

EnlargedTop Cuts.png
0
tefoster11
tefoster11

Reply 2 months ago

Thank you so much! I can't believe I didn't see it the first time, but this makes it clear. Thanks so much for the update and for posting this in the first place.

Tom

0
Lorie1907
Lorie1907

4 months ago on Step 5

After modified this shield exactly like this guide, except one thing: I short circuit all 3 micro step pins (to use one jumper each driver instead of 3). After that I plugin a 5dcv power supply in the "Mot-vcc" and "Mot-gnd" then boom! I've lost a ps. I check these two "mot" power pins and they are connected! That is really careless of me to not check these pin before power on, but please tell me where's my gravely mistake.

z3084345925115_ff9dae80f222142c58ac2c4a1dbdf605.jpgz3084422684030_bf67a9bda8e958edd0ad47860c0b684b.jpg
0
Palingenesis
Palingenesis

Reply 4 months ago

Looks like you have a wire connecting the wrong header pin.

correction.png
0
Lorie1907
Lorie1907

Reply 4 months ago

oops...now my 5dc power supply can rest in peace...but actually in pieces...thank you sir.

0
Lorie1907
Lorie1907

Reply 4 months ago

Sir, I just bought a new, and a correct one, but when I try to test the conductivity of two "Mot-" pins they are still connected, front side and back side, I still cannot figure out why? If these two connected, the power supply my explode again. Now I am very confused.

z3085846764601_9d6a5ff4077fcf2e30eceb1112d23aa8.jpgz3085846769478_e56c6781688ea17e97f3796cb965fd6d.jpg
0
Lorie1907
Lorie1907

Reply 3 months ago

Thank you for sharing and helping sir, I did try to fix things after that, blew up something more, got some minor injuries but, the result of the project is somewhat satisfy :D

z3141280535805_87938f95061d1ec77ad97ae4dff4f359.jpg
0
Palingenesis
Palingenesis

Reply 3 months ago

That looks cool.
Glad you got thing sorted.

0
Palingenesis
Palingenesis

Reply 4 months ago

What type of power supply is it?
May be it can be repaired?
Most have some sort of short protection.

0
fafechucky
fafechucky

Question 8 months ago

Thank you, saved my clone board! One question, can I use the Z axis as Y axis clone?