EG2133 not working

Hello everybody. I am building a board using the stm32f103 and eg2133 to drive the motors of my quadruped robot. The circuit is basically identical to other boards I have seen on the internet, but I can’t get it to work.
Has anybody here managed to get it working? I don’t know any specific details to give, since I kind of got into a dead-end. The driver circuit is down below. Any help is appreciated :slight_smile:

Well, what does not work?

Sorry for the poor explanation. I am kind of stressed with this not working.

The eg2133 (mosfet driver) receives the signal from the stm32, running velocity open loop, but the motors don’t turn, since there is no voltage at the gates of the mosfets. The part that isn’t working is the EG2133, which I have seen @Valentine talk about not working with his board in a 2022 post. This mosfet driver is the same one used in MKS Dual Plus, which was a heavy inspiration for mine.

I have replaced the ic twice, and the behavior is the same, no output at all, which leads me to think of a design problem, but since it is basically the same circuit, how could it be?

EG2133 has inverted inputs

I dont know, if it works, but you could try #define SIMPLEFOC_PWM_LOWSIDE_ACTIVE_HIGH false

Or try EG2134

edit: better search for PWM_LOWSIDE_ACTIVE_HIGH, how others have done it, so you dont fry your board by mistake

Yeah, that is a thing in the EG2133. I found out about that line a few days ago, but that didn’t solve the problem. On Monday I will use an oscilloscope to see if the signals are actually correct, and not trying to switch both mosfets of the same phase.

Wow, your edit on the last reply made me think about something I was doing a few days ago. I was trying to activate SIMPLEFOC_STM32_DEBUG, which is done by defining that, but adding “#define SIMPLEFOC_STM32_DEBUG” on the main code didn’t work, but uncommenting that line inside the library did the trick. Well, it is the same thing here, it only worked when I changed that inside the library, on the file hardware_api.h, not adding it on the first line of the main arduino code.

It freaking runs now. THANK YOU!

2 Likes

I don’t know what IDE you are using, but in platformio, using the following build_flag in the platformio.ini will declare this option in all the files:

-D SIMPLEFOC_PWM_LOWSIDE_ACTIVE_HIGH=false

I think that’s what the build_opt.h is for with Arduino IDE.

You don’t have to edit SimpleFOC source files.

I normally use platformio, but I had some problems with no psram esp32-s3 in an older version of my board, so I went back to arduino ide for now. I reversed what I changed in SimpleFOC source files and added that line in the build_opt.h, and it worked the same. Thank you.