You are here

Design custom VESC 6 Hardware

6 posts / 0 new
Last post
brightlightbeam
Offline
Last seen: 5 months 3 weeks ago
Joined: 2018-09-27 11:10
Posts: 4
Design custom VESC 6 Hardware

Hello everyone



my name is Clément and unlike the most popular use case for the VESC I want to introduce this awesome project to a new hobby, namely passenger carrying model trains.

At least here in Germany we use a lot of brushed DC motors to drive our locomotives but the resources for usable motors are getting low nowadays.

Therefore, I want to use BLDC motors to create compact and powerful direct drive bogies. The motors that I plan to use are rated from 24V to 48V < 20A0.

Because all the available VESC derivatives do not provide sufficient robust connectors I want to layout my own version of the VESC 6.

I have already finished a first layout but before ordering the PCBs I wanted to make sure, that I did not miss anything important.

For reference, I used the schematic v6.4 of the Documentation page but I have a few questions left:

1. I have discovered that for the external encoder options the connections "TX_SCL_MOSI" and "RX_SDA_NSS" are connected to two pins on the STM32. Is this necessary or optional and I choose my two pins in the configuration before compiling the software?

2. The AD8418 amplifiers are quite expensive and currently out of stock at the usual Chinese parts service. But on the vesc_75_300 schematic I saw that the INA240 is used instead. Can I simply swap the AD8418 with the INA240?

3. Which copper thickness is usually recommended?

I hope someone can guide me for the last steps.

Regards

Clément

TechAUmNu
Offline
Last seen: 3 months 1 week ago
Joined: 2017-09-22 01:27
Posts: 575

1. The pins are probably those ones because that is the pins the peripherals are connected to inside the MCU. You can check the STM32F405RGT6 datasheet to see which pins can be used. But easier to just use the same ones that Vesc 6 uses.



2. You can use any bidirectional amplifier. Just make sure the output is at 1.65v when no current is flowing. You can set the gain of the amplifier and the resistance of the shunt easily in firmware.

3. 1oz is usually fine for most boards. If you have long thin tracks carrying current then maybe go 2oz+ but it is much more expensive.

Avin Raikwar
Offline
Last seen: 3 years 9 months ago
Joined: 2020-10-26 15:45
Posts: 3

Hi, TechAUmNu , can you please explain how we can set our own custom current gain and shunt values , i am too working on a custom VESC but i am not using the DVR chip , I have good amount of knowledge about the hardware but zero about software . can you please guide me through firmware part .

CTSchorsch
Offline
Last seen: 4 months 2 weeks ago
VESC Free
Joined: 2018-07-13 09:55
Posts: 101

Hi Avin,

you have to build (compile) the firmware for your custom hardware by yourself.

Fast way:

- clone the source code from github

-add or copy/modify  the config files (.c and .h) for your hardware

- modify conf_general.h

- make; make upload

the values for gain and shunt are in the hw_<yourconfig>.h

Georg

Koxx
Offline
Last seen: 1 year 2 months ago
Joined: 2020-11-28 17:31
Posts: 2

Hello, this seems to have changed to a new architecture. can someone explain the new process ?

conf_general.h doesn't contain all hw_***.h anymore

Gatze
Offline
Last seen: 1 year 7 months ago
Joined: 2018-02-03 18:06
Posts: 55

If you look at the explanation on https://github.com/vedderb/bldc hardware choice is not done any more by selecting the right header file in conf_general.h by uncomment or comment, but giving make the right command/attribute (I don't know the right englisch name) and thus the compiler.

It is stated by giving the command 'make' you get back all the hardware possibility's.

All of them!

Check the supported boards by typing make

[Firmware]
     fw   - Build firmware for default target
                            supported boards are: 100_250 100_250_no_limits 100_500...

There are also many other options that can be changed in conf_general.h.

Alle the header/c files are in /hwconf