You are here

about reference hardware

11 posts / 0 new
Last post
qdxiatao
Offline
Last seen: 9 hours 49 min ago
VESC Original
Joined: 2017-05-24 12:40
Posts: 13
about reference hardware

I want to design a higher voltage VESC based the reference hardware and want to know when will the reference hardware will be published.

Thanks!

TheFallen
Offline
Last seen: 4 days 22 hours ago
VESC FreeVESC Original
Joined: 2017-09-11 11:46
Posts: 222

Bump!

ThierryGTLTS
Offline
Last seen: 3 years 11 months ago
Joined: 2017-09-06 14:18
Posts: 116

At least 3 members have done a project like your wanna do.

Paltatech among others.

Have a Nice Day.

Thierry

qdxiatao
Offline
Last seen: 9 hours 49 min ago
VESC Original
Joined: 2017-05-24 12:40
Posts: 13

Thanks!

TheFallen
Offline
Last seen: 4 days 22 hours ago
VESC FreeVESC Original
Joined: 2017-09-11 11:46
Posts: 222

I was more interested in the reference hardware. I'm finding that my weird logic & power board v4.12s seem to be completely unsupported by the new VESC-Tool and I'm a little weary of hacking about.

josh
josh's picture
Offline
Last seen: 8 months 2 weeks ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 92

I am also very much looking forward to the reference design release since I have some custom ideas brewing. It would be awesome to get an official update on this.

Cheers!

benjamin
Offline
Last seen: 15 hours 40 min ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 485

I will finish it soon, sorry about the delay. Here is another link to the schematic of the VESC6 for convenience:

http://vedder.se/forums/download/file.php?id=438

Essentially the reference hw will be the vesc6, but with a rectangular PCB with SMD electrolytic capacitors instead of the through-hole ones. This way it can be wrapped in heatshrink without worrying about bending the leads of the through-hole caps.

josh
josh's picture
Offline
Last seen: 8 months 2 weeks ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 92

Awesome news! Thanks for the update Ben. I can't wait to see the new design!

lizardmech
Offline
Last seen: 9 months 2 weeks ago
VESC Original
Joined: 2017-06-02 19:21
Posts: 81

Do you have any code that shows how to use the mpu9150 you added in a control application? I still haven't been able to find any freelance programmers that could figure out how to make a control app using an IMU after 12 months.

benjamin
Offline
Last seen: 15 hours 40 min ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 485

This code uses the MPU9150:

https://github.com/vedderb/rise_sdvp/blob/master/Embedded/RC_Controller/...

https://github.com/vedderb/rise_sdvp/blob/master/Embedded/RC_Controller/...

You can set USE_MAGNETOMETER to 0 and use a MPU6050 as well, which is easier to buy.

Remove the i2c initialization from mpu9150.c and use instead

void hw_start_i2c(void);

also set I2C_DEV to HW_I2C_DEV in mpu9150.c

You can set a callback for when new readings are received:

mpu9150_set_read_callback(mpu9150_read);

Which can be implemented something like this

static void mpu9150_read(void) {
    float accel[3], gyro[3], mag[3];
    mpu9150_get_accel_gyro_mag(accel, gyro, mag);
}

Those values are raw sensor readings. If you want to get an orientation you can use

https://github.com/vedderb/rise_sdvp/blob/master/Embedded/RC_Controller/...

https://github.com/vedderb/rise_sdvp/blob/master/Embedded/RC_Controller/...

with this function

static ATTITUDE_INFO m_att;

ahrs_update_madgwick_imu(gyro, accel, dt, m_att);

dt is the iteration time in seconds, which you can get from chibios. Then you can get euler angles with

float roll = ahrs_get_roll((ATTITUDE_INFO*)&m_att);
float pitch = ahrs_get_pitch((ATTITUDE_INFO*)&m_att);
float yaw = ahrs_get_yaw((ATTITUDE_INFO*)&m_att);

I will probably add support for that in the firmware soon, but first I'm waiting for a PCB with a MPU 9250 to see if I can update the driver so that it works for both.

lizardmech
Offline
Last seen: 9 months 2 weeks ago
VESC Original
Joined: 2017-06-02 19:21
Posts: 81

Thanks for the info, the main thing I don't quite understand is how to connect the MPU to the VESC app, assuming I had an mpu9050, I want to run a kalman filter and then use the result in an app. Do I just place mpu9050.c & mpu9050.h in the root directory and add them to includes in the main.c file? Would the kalman filter be performed in the control app or in the mpu9050 c file?