Duke Nukem yeah baby!
Oh that’s interesting thanks for the information.
You’re welcome
But the bms I sent is for a 12s LifePO4 pack, not Lipo Graphenes iirc.
Really liking this build! Looks so clean with the electronics in a backpack, the whole setup gives me a sci-fi bladerunner/cyberpunk vibe
Thanks mate, really appreciate the comment! Hopefully as time (and graphics) goes on, it’ll be more of that sci-fi feel.
i head some people having issues with cable length when using these. something to be aware of with your setup.
Do you have any more info or a link?
i dont but i remember trampa saying it in a video somewhere, maybe one of @Lee_Wright or Jay Bostons recently.
If i remember correct, their new motor cages have mounting space for the AS5047 sensors but as the VESC6 is mounted in the middle of the board it is not reliable over that length of cable, but i think they were working on a way of making it possible maybe?
Maybe @Trampa knows better if its possible?
Found this after a quick search, might need to just go with shielding.
Noise is found in all circuits, life is just about figuring out if it is preventing your system from working. Lots of users have no problems with noise interfering with their odrive operation, others will tell you “ I’ve been using the same encoder as you with no problems ”. Power to ‘em, that may be true, but it doesn’t mean it will work for you. If you are concerned about noise, there are several possible sources:
- Importantly, encoder wires may be too close to motor wires, avoid overlap as much as possible
- Long wires between encoder and ODrive
- Use of ribbon cable
The following might mitigate noise problems. Use shielded cable, or use twisted pairs, where one side of each twisted pair is tied to ground, the other side is tied to your signal.
I know they are trying t o make the encoders over long distance
If you have to chose between making the battery or phase wires long, go to long phase ones, the inductance increase of the long wires when compared to the motor inductance is almost irrelevant
I don’t know how normal sensors behave over long distance
This was my point, motors have a LOT of capacity to absorb voltage spikes.
HALL can be pretty long, encoder wires should be short. With some software we can make the AS5047 encoder work like a HALL.
Do you know why? I mean, a signal travels pretty frickin fast.
It’s not about the speed is about interference. When dealing with high speed signals each wire acts like an antenna and can pick up electrical noise.
Hall sensor send a single on/of signal each time they change which is relativity low frequency so quite robust. The as5047 is a digital sensor so regularly sends back a digital message containing the rotation data.
Depending on if your using i2c or spi the data is encoded at a minimum of 100 kbit/s, but could be up to 1mbit/s. That’s 1,000,000 pulses a second, none of which can be missed without causing reading errors.
So the secret is properly insulated / screened wires and choosing the protocol with a lower baud rate?
Your average Arduino can do 4Mbps in slave and 8Mbps in master SPI mode. On other controllers 20Mbps is not uncommon.
Shielded cables are only part of the solution as the capacitance of the wires becomes a problem with longer cables.
You can try using twisted cables, that helps. But better would be using CAN or something similar that uses differential lines. Or put your own protocol on top of i2c/spi that uses CRC to detect bit errors.
Looks like the vesc is using spi for these sensors.
/*** @brief Maximum SPI/I2S clock frequency.
*/
#define STM32_SPII2S_MAX 45000000
#endif
According to the VESC code it looks like the SPI is set to run at 45Mbit/s.
#define AS5047_SAMPLE_RATE_HZ 20000 //25MHz max spi clk
With the sensor being sampled at 20Khz.
These speeds explain why this component is sensitive to cable length.
The problem with this is that when you lower the baud rate, you will have to lower the sample frequency and at some point this well start to affect performance.
Unfortunately the “secret” is to put the sensors close to the vesc.