Cheap FOCer! (VESC compatible 4.12 redesign)

I don’t think I can cut 1cm from any dimension here. I’m already going to switch to 2 680uF caps instead of the taller 1000uF so that it fits in the hammond enclosure properly.

2 Likes

But can’t the caps simply be laid sideways and longer not taller? A different heatsink? At 45mm tall that’s an obstacle for a lot of people fitting it in their board.

1 Like

L92mm x W45mm x H23mm(approx). It’s only going to be about 23mm tall as it is. I have considered the ability to lay the caps down over the board but I don’t like that for some reason. It’s a weird OCD or something.

4 Likes

23mm. Sorry I’m wasting your time thought it was fatter! Sounds great! I wrote u on endless sphere. Hope we can make something go in the future together. Hope to get u the money u need.

3 Likes

Now worries! PM sent on the sphere btw.

Project Update

I’ve got good news and bad news.

Good news: I got the software loaded up. I was able to see real time temperature and stuff.

Bad news: No spinning motors yet. I have a weird situation surrounding the USB and ST link connection. The VESC tool only maintains a connection when both the ST link AND the USB cable are plugged in. Removing one or the other causes the VESC tool to lose connection. Don’t know if it’s a software/driver issue or a hardware issue. Probably the latter. I can still probably spin a motor tomorrow even under this condition. Will have to eventually resolve this issue though.

I want to verify that the USB 5V power does not actually connect to anything on the VESC right?

1 Like

Sounds like a GND problem. Ie your USB ground is not connected or something similar.

3 Likes

Yes, it sounds like ground is coming from one connection and power coming from the other connection.

Try putting a 9V battery on the VESC power wires to keep it on

3 Likes

To clarify, power has been coming from a separate bench top power supply straight to the main DC power input. I will still verify if the USB is grounded tomorrow. I’ll fix that if it is. If not, more debugging to follow.

1 Like

So the ground seems ok after doing continuity checks. I may try a different computer with a clean install of the STM drivers, bootloader, and vesc tool. I have a spare STM32 if comes down to swapping that out. I may not make much progress until next week as I’ll be out of town starting today.

3 Likes

Just seems like a good ol fashioned “turn it off and back on again” did the trick. Now I’ve issues with the current sense part of the system.

I get a weird “ghost current” reading from the Real Time data. It shows motor current at 0.35A when everything is idle and no motor is connected. My power supply doesn’t register this much current being drawn. I believe there’s something up with the current sense portion of the system. Could be a bad reference voltage or solder bridge somewhere. Could also be the DRV. I’ll be troubleshooting this today and on into the week if need be.

3 Likes

So I went through an elaborate debug to try and fix the “ghost current” issue. Swapped out both the DRV and STM32 without much improvement. I did discover the TRUE reason why I was having the USB/STlink issue. Simply leaving the STlink connected to the VESC even without being plugged into the computer hijacks the reset pin. Must remove STlink completely after loading bootloader.

Nothing I did resolved the “ghost current” and minute amount of duty cycle percentage that was being displayed. I found out that this seems like normal behavior of an idle VESC after viewing the video from the link below and other screen shots of people’s VESC real time data. Real time data at 1:18 in the video is the same as mine showing approx. 0.3A and 0.1% duty cycle.

Can anyone else confirm that this normal behavior?

4 Likes

So I made a mistake on the schematics. I accidentally mixed up the phase and current sense signals. I have SENS1 to H1_VS, SENS2 to H2_VS, and SENS3 to H3_VS. I have SH1_A and SH1_B measuring H1 current and SH2_A/B measuring H3 current.

The correct schematics have SENS1 to H3_VS, SENS2 to H2_VS, and SENS3 to H1_VS along with the current sense opposite of mine.

It bothers me that I didn’t catch this with as many hours I spent staring at the schematics of both my controller and the official VESC 4.12. I don’t think this is contributing do the “ghost current” readings but we’ll see.

Regardless, I’ll have to do either a hardware fix by doing PCB surgery to swap the signals paths around or modify the firmware to accept the hardware configuration as is. Just know that is solvable and not project killing. Either way, I’m fixing my schematics and PCB design so that they align with the original VESC 4.12. I don’t want people to have to upload custom firmware for my controller if it’s not necessary.

10 Likes

I’m not replying much because I can’t help with stuff like this but I am reading every response :grin:

15 Likes

No worries. I’m glad people are still interested enough to read!

8 Likes

second that

1 Like

@moon is not the only one :wink: Please keep updating us. Even if we can’t help much it’s very interesting to follow your progress :+1:

3 Likes

No problem! Will do!

1 Like

aaaaand this is why the review is done by someone else then the creator 9/10 times :smiley: (but you know this :wink: )

4 Likes

You got me there! :grin: