FOCBOX with AS5047 - serial error

I’m trying to get an AS5047 to work with the focbox and I’m getting this error during calibration, after it does all the slow motions, right before it begins the fast jumps:

Serial port error: The I/O operation has been aborted because of either a thread exit or an application request.

And I can audibly hear the serial port become disconnected in windows. Several seconds later it reconnects. I realized I probably had to remove R8-R13, and C5-C7, and jump R8-R10, which I then did. (See this thread). Still didn’t work. I also noticed H1 and H3 are switched on the Focbox connector from the VESC6, which I’ve successfully used with the AS5047. I switched them and that didn’t work either. I also tried it on as second Focbox to no avail. Any thoughts or ideas?

Thanks, -Josh

This sounds like an EMC issue, the noise generated by controlling the motor makes the USB crash. You can improve the immunity by connecting the ESC with the beefiest USB cable you have (preferably with those ferrite beads) and use a laptop that is only connected to the ESC and nothing else.

2 Likes

wow, that actually worked. I didn’t have a cable with ferrite beads, but I was using a hub, which I removed, and I physically moved the controller as far from the motor as the cable would allow.

1 Like

@jgeating can you help me with this error? I have the same problem with my VESC torqueboards.

I never found a great fix actually. The hub doesn’t actually help usually. For certain versions (pre 6.0 I think) you have to mod the board, removing a few resistors and capacitors. If you’re using an AS5047, have you modded your board yet? What version of board are you using?

Hello @jgeating this is my Vesc https:///products/torque-esc-bldc-electronic-speed-controller the currently version firmware installed is 3.34

Yeah, thats 4.XX hardware, so you need to desolder and jumper some things to make it work. You can use this tutorial here: https://www.electric-skateboard.builders/t/my-vesc-with-as5047-sensor-setup/6568

Let me know if you have any questions, but that’s probably why it’s giving you an error.

1 Like

I was sawing the tutorial but I dont understand. I attachment some pictures and setup for my VESC.

Try taking a look at Vedder’s own tutorial here. If that still doesn’t make sense, I’ll write up something more detailed and post it here.

https://www.youtube.com/watch?v=8CcqD5sw90U

Also looks like you might have a separate problem of the firmware not uploading (I just skimmed through your video). I vaguely recall that there was some build of the VESC 4.XX hardware that wouldn’t let you upload new firmware. I vaguely remember trying to find/download an outdated GUI that would let me tune my motor. I’m pretty sure it was for Enertion though, not DIYElectricSkateboard.