Project circuit guidance

I do understand your point

I tried it on a test rig using one stepper motor and it seemed to work fine, I also added 2 100uf 16v bypass capacitors (I don't have any 0.1 mf capacitors ) to the 5v side as I noticed it been mentioned in the data sheet.

1 Like

p.s. the DM542T definately needs 5v

That is a typo, it should be 0.1uF not 0.1mF and the modules you are using already have the bypass capacitors on them, so remove any additional capacitors you have added, they may cause other problems.

Do you have it set-up for common Anode or common Cathode connection.

Kicad, DesignSpark PCB, pencil & paper - to name a few. There are plenty of others, too.

Runs on 3.3V as well.

image

image
page 20

In case that happens again, it may be worthwhile actually troubleshooting the problem. The workaround you chose now resulted in a large increase in complexity, and that's now biting you in several ways.

PS: adding the decoupling caps isn't going to help for the simple reason that they're already on the modules you're using.
PPS: 1000uF doesn't work well as a decoupling cap.

I believe it is common Cathode because ENA -, DIR - & PUL - goes to GND and ENA +, DIR + & PUL + goes to the ESP32 via the logic level converter. I also have the switch on the DM542T set to 5v (the switch has 5v and 24v).

Then I have no idea how it ever worked.
The DM542T inputs require about 10mA of current. Those level shifters only have a 10K pull-up on the 5V side, so can only provide 500uA max
The pull-ups on the 3.3V side are not seen by the 5V side so they do nothing.
I would imagine you have some erratic behavior with the steppers.

I'm going to go through all of the other components once again to see whether they can run on 3.3v, if it is the case then I will change the voltage of my buck converter to 3.3v so that I don't put the strain on the ESp32 powering so many components.

I started this project two years ago with zero electronic knowledge, hopefully I can build my robot to function better with all of the knowledge I have received since I started.

The DM542T motors worked fine ( prior to adding the two new BTS7960 motors), however when the one of the new BTS7960 motors were running the DM542T motor would move forward but not reverse until the BTS7960 motor stopped moving. And that would also cause one of the steppers on the cnc shield to act erratically.

That's always a good idea, although I don't think that's part of your problem right now. The parts shown in the schematic won't draw much power from the 3.3V rail, certainly not how they're wired up presently. Still, I'd try to run the whole thing on 3.3V logic if you can.

I think you were somehow very lucky
I'm just pointing out all the obvious errors.

Just because they may 'work' on 3.3V logic levels doesn't necessarily mean it's a good idea to operate them at 3.3V

I think you should fix all the obvious problems first before you make any drastic changes.

Sounds like the logical thing to do

What would you suggest? Because I do need to convert the logic to 3.3v

Unfortunately there are no ready made translation modules with high output current.
You have two choices:

  1. Continue to use the CYT1076 but change the DM542 connections to common anode. You would then have to modify your code to invert all the DIR and STEP outputs.

  2. Use an IC. CD74ACT541E or SN74ACT244N, available from Digi-Key and Mouser

I don't know anything about a CD74ACT541E or SN74ACT244N, so I would prefer to work with what I have if that's possible.

If I choose option 1 (common anode connection) that would mean I wired ENA -, DIR - & PUL - to the logic level converter and ENA +, DIR + & PUL + to 5v but I don't know what you mean by invert DIR and STEP outputs, do you mean change digitalWrite LOW to HIGH & visa versa in my code? Also, I currently have ENA+ going to the MCP23017 and DIR + & PUL + going to the logic level converter. So if I changed my connection to common anode I don't know if ENA - would work using the MCP23017

If I choose option 1 (common anode connection) that would mean I wired ENA -, DIR - & PUL - to the logic level converter and ENA +, DIR + & PUL + to 5v

Yes

Yes.

So if I changed my connection to common anode I don't know if ENA - would work using the MCP23017.

Yes it will and it will also be inverted like DIR and STEP

If you change your mind and don't feel like editing and debugging several thousand lines of code, you only need to solder together one of these.

Thank you