You are here

Help with metr bluetooth Vesc does Not react

48 posts / 0 new
Last post
Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37
Help with metr bluetooth Vesc does Not react

Hi i Hope i dont kill one Vesc.

I Spoke with Roman from metr.at and he Said Vesc6 Works, only i Must change two pins rx and tx. So i do and connect the metr doggle with the Master Vesc .
I connect the Vesc with the Tool change ppm to ppm and uart and i Looking for the right frequenz. Everything fine. Restart the Vesc, the red LED switch on. I Switch the Vesc of, disconnected the metr doggle and restart the Vesc. Only the Blue LED light is on and the Vesc does not react. I cant connect the Vesc with the PC, nothing. I Hope for help.

hexakopter
Offline
Last seen: 1 year 6 months ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

Do you updated the app to the newest version first? I got a BETA version from him so I don't know if the newest version is already in the App Store available.
When you were using an old app it is possible that you have bricked your STM32s firmware as I have described in an other thread here on this form.

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Fuck!! I dont now about the App Software.Roman has Said it works ,only i have to change the pins.
When the stm is brick,can i do something?

hexakopter
Offline
Last seen: 1 year 6 months ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

Thats why I wrote in the other thread: "SO TO ALL BETAs. DONT USE ANY OLD SMARTPHONE APP TO CONNECT TO YOUR VESC OVER BLUETOOTH, WHEN YOU DONT WANT TO RISK TO BRICK YOUR NEW VESC 6." You should know what you are doing first.
Flash it again with an STLink. I can't believe that Roman told you that it works with an old app version. I told him about that issue that the protocol has changed and with the old app it would brick the STMs software. At least in my case.
What app version did you use?

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Mmmhhh fuck Iam a dummy...I have not read your post so exactly.the App hat fw 1.5.16 and This is not an Upgradet Version...i Can see it,Fuck! But i wrote 5 Mails with Roman and he dont Say that the App can brick my Vesc.i send him a picture of the Vesc so he has noted that the pins are changed.
But no matter, this is now my problem and I hope to solve it.
Which STLinkv2 i need?
Hexa can you give me please a Little Guide how i Flash the stm over jtag. I Never do this before.

hexakopter
Offline
Last seen: 1 year 6 months ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

My STlink looks like this: http://www.electrodragon.com/product/st-link-v2-programmer-for-stm8-stm32/
Will cost you around 2 dollar from aliexpress or ebay. Just search for STLink.
You can find a guide here: http://vedder.se/2015/01/vesc-open-source-esc/

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Thanks man! i order an stlink v2
is this STM32 ST-LINK utility(http://www.st.com/en/embedded-software/stsw-link004.html) ok? or must i use a another program?
Which firmware did you use and where i can find it?
Thanks for your Help!!

hexakopter
Offline
Last seen: 1 year 6 months ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

I used Mac OSX so I can not help you with windows and I had the problem with VESC HW4.12, so different firmware.

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Ok than i use this Tool. But where can i get the Firmware file. I Look at the Vesc Tool but i dont find a Way to compile the out of the Tool.
@ frank can you help?

hexakopter
Offline
Last seen: 1 year 6 months ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

I think you could flash the boot loader (https://github.com/vedderb/bldc-bootloader) and then use the GUI to flash the newest firmware.

Roger Wolff
Offline
Last seen: 2 years 3 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

I don't think you can just flash the bootloader. On Arduino the bootloader runs first and boots onwards towards the app if no bootloading is going on. Here the app (VESC-firmware) runs and when so requested it jumps to a bootloader somewhere else in memory that can upgrade the main application. Thus if the main application doesn't work you can't ask it to jump to the bootloader.

If you're thinking about an "about $10" STLINK programmer, consider buying a nucleo or stm32 discovery. They are about the same price range, include an STLINK, but offer a development board as well. A bit more clunky. For connecting to the VESC6 you'll need a conversion from 2.54mm pitch wires to a 2mm pitch connector.

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Thx for the Info Roger! The mainproblem is, how i get the right Firmware or bootloader?
What is the different between a normal stlink and two other models?

Roger Wolff
Offline
Last seen: 2 years 3 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

You can buy the official STLINK from ST: $50 or so.
You can buy a development kit from ST: $10 for the cheap ones,$20 for the most expensive nucleo I could find.
These include an "official" STLINK embedded on the board.
Or you can buy a chinese clone of the STLINK. Those are the most compact and the cheapest. They start at $2, but then you have to wait 3 weeks before you get one. If you're buying one of those and paying for the privilege of getting it soon, you could, if you can buy from Mouser, Digikey or Farnell, get one of the nucleo's and have it tomorrow (well Tuesday because it's Sunday now).

The $8 link is one of the $2 chinese clones, where, the $6 extra is, I hope, necessary for "getting it soon".

All of them work to program the VESC.
You do need to have a 2mm connector that fits on the VESC. I have a strip of 2mm female headers. I cut off the right length and soldered some wires on and a 2.54mm connector. So now I can use normal DUPONT wires to connect to that connector. In my case I did this for the HALL sensors connector. I'd do it again with one pin less if I'd need to connect to the SWD connector to program the VESC because the bootloader and/or firmware is messed up.

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Ah thx Roger.
My stlink reaches me monday, I did not want to wait so long.

Boesila
Offline
Last seen: 3 years 6 months ago
VESC Original
Joined: 2017-05-24 12:24
Posts: 18

Since Friday I having the same problem like Necromenz, so I need to flash the bootloader, too. To do that I have 3 questions. I'm happy for an help.

1) I'm not sure how to connect the ST-link in the right way, because Frak postet "Do not connect the 3.3V pin, using a simple ebay ST-Link!". I have only such a cheap ebay ST-Link so I need to connect it like this:
RST --> RST
SWDIO --> IO
GND --> GND
SWCLK --> CLK
right?

2) Next issue is that I don't have a Linux distribution installed, so I'm looking for a way to falsh it under windows. Like it is shown in this video https://www.youtube.com/watch?v=H4sbDhRcaOQ. But I can not get a connection to the ST-Link with the STM32-ST-LINK Utilitiy tool. I always get the error :
"Can not connect to target!
Please select "Connect Under Reset" mode from Target->Settings menu and try again. If you're trying to connect to a low frequency application , please select a lower SWD Frequency mode from Target->Settings menu.
No target connected"

3) Which file exatly should I upload?

Sorry If my questions are very stupid, but that's the first time for me to doing something link this... I tried to find an follow some introductions the last two days but I still need more help. Thanks in advance

Have a nice day,
boesila

Roger Wolff
Offline
Last seen: 2 years 3 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

1) It might not work to connect the RST. As in, the chinese clones that I have run the same firmware as the official STLINK, but the RST pin is on a different pin of the processor. It could very well work without it. I've modified only one or two of the chinese clones that I have.

2) the cannot connect to target is that it can't find the "to be programmed" CPU. Is your VESC connected?

3) The one somehow embedded in the VESC_TOOL. I don't know how to get it out.

Boesila
Offline
Last seen: 3 years 6 months ago
VESC Original
Joined: 2017-05-24 12:24
Posts: 18

Thanks fro your help :-)

1) Okay, I'll try it with only 3 Pins SWDIO --> IO, GND --> GND, SWCLK --> CLK
2) Do you mean connect to the battery or to the PC? I didn't connect a battery / power supply to the VESC, should I? The VESC ist only connected to the PC via ST-LINK, nothing else.
3) It isn't in the github repository? I thought I can take a file from here: https://github.com/vedderb/bldc-bootloader

frank
Offline
Last seen: 2 weeks 2 hours ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 847
Please make sure not to connect the 3.3V pin, when using the ebay sticks! Otherwise you have a real problem. There is a ST-LINK WARNING thread up. Frank
Roger Wolff
Offline
Last seen: 2 years 3 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

Re: 2)
Yeah, if you don't connect the 3.3V, the CPU is not powered. So it can't be flashed. With my design you can hook up the 3.3V from the chinese STlink and flash things. But in the VESC6 an unexpected complication happens: The 3.3V regulator blows itself up. So you'll have to power the VESC from the battery leads. Anything above 8V should work. I'd recommend a lab powersupply currentlimited to 100mA or so. That means that if you do something wrong, hopefully nothing dies.

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Hi

My stlink has reached me today. With the old bootloader it should work, but which bootloader files are needed? Need the files still compiled? Which libs are used if necessary. So Many noob-questions.

Boesila
Offline
Last seen: 3 years 6 months ago
VESC Original
Joined: 2017-05-24 12:24
Posts: 18

THX that works :D Now I'm able to connect the VESC successfully with the PC over ST-LINK.
But I still need the right file for upload :( I tried with the ld_bootloader.ld from here https://github.com/vedderb/bldc-bootloader but the ST-LINK utility says it has to be an hex or bin file.

benjamin
Offline
Last seen: 1 week 3 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

You have to upload the firmware and not the bootloader to get it running again. Here is a link to a HW60 fw bin file:

http://home.vedder.se/tmp2/982347289347209837_VESC_default.bin

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Hi boesila,
That is my Problem too.
I think you have to compile the entire folder, but I'm not completely sure. There are many compilers for c. And h. But which is what I have no idea.
I will use ubuntu on my Laptop, It could be easier.

My post is outdated.
Thanks ben !!

Boesila
Offline
Last seen: 3 years 6 months ago
VESC Original
Joined: 2017-05-24 12:24
Posts: 18

Muchas gracias, Roger and Ben.
The VESC is alive again :-)
I'm so happy.

PS: good luck Necromenz

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Thx Boesila!!

HE STILL ALIVE!!
Wtf...iam so happy too. Thx to all for Help, Hexa, Roger,Ben and Frank

A short Guide summary for all Windows User with the same problem:

Here a Youtube link: https://www.youtube.com/watch?v=H4sbDhRcaOQ

You Need: STlink V2, 2.54mm to 2mm connecter

1. Download STlink Utility (http://www.st.com/en/embedded-software/stsw-link004.html)
2. Download the last FW from Benjamin for HW6.0 (http://home.vedder.se/tmp2/982347289347209837_VESC_default.bin)
3. Install STlink Utility (it is inlc. drivers for the STlink)
4. Connenct the STlink to the Vesc with only 3 Pins SWDIO --> IO, GND --> GND, SWCLK --> CLK (NEVER connect the 3.3v pin, RTS no need)
5. Power on the Vesc
6. Open STlink Utility
7. Open the tap TARGET and klick Connect --> the program show you the infos of your VESC
8. Open the Tap FILE and klick open --> search for the file "982347289347209837_VESC_default.bin" and select
9. Use the write button (The second on the right)
10. Press Start at the open window --> the programm will flash your Vesc
11.After finisch close the Programm, power off your Vesc and disconnect the STlink
12. Connect the Vesc via USB and open the Vesc Tool to upgrade the FW

hexakopter
Offline
Last seen: 1 year 6 months ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

Glad to see both of you were able to rescue their VESCs. :D It looks like Necromenz instruction for windows is also useful for beginners and easier than compiling the source first with some terminal commands and a UNIX system.
Thumbs up.

Boesila
Offline
Last seen: 3 years 6 months ago
VESC Original
Joined: 2017-05-24 12:24
Posts: 18

Nice idea to write a brief guidance Necromenz, thx for that.
The next question is how to get the metr app running with the VESC6. Hexakopter I guess u already have this in use, right? Which software version of the app do you have? And how did you connect the metr dongle to the VESC? I dont want to brick the VESC again ;-)

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Roman Has update their App 2 days ago and it works. You have to change the rx and tx Pin told me Roman. He send me a Video
https://youtu.be/IlUW_rRT6Jc

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

My First track with metr. I Drive carfully at the first Time :)
https://metr.at/r/igmuo

Roger Wolff
Offline
Last seen: 2 years 3 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

62 Wh, is that right? I prefer SI units. So a Wh = 3600J, right? So 62Wh is 62*3600 = 223kJ.

For traveling 3.3km on my bike I almost never exceed 30kJ. Oh, wait. I do pedal myself. This trip you let the motor do everything?

On my bike, yesterday I counted 12 sec between increases of the "kJ consumed" figure on my display. This while using about 160W. i.e. one of the two is off-by-a-factor-of-two.

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Hi Roger,

I can not interpret this value exactly but I think it fits already. I drive a mountainboard with 2 x 118kv 2600W motors. My motors have to do everything alone, because iam a bit lazy. ;D

Roger Wolff
Offline
Last seen: 2 years 3 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

Oh. Just for comparison: I drove home today without any biking myself and I used 78kJ. or 22Wh. (across 3.3km).

hexakopter
Offline
Last seen: 1 year 6 months ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

When driving crazy with my ebike I sometimes use 74Wh for 3.0km as you can see here: https://metr.at/r/4VYCT That is valid data. But I also hit a lot higher battery currents than Necromenz and was going uphill a lot. I think maybe Necromenz distance data is wrong. You can see in the map that there are just a few GPS values available.
I think Necromenz phone had a bad GPS fix. That would also explain, why it just says 3.7km after almost an hour of riding. With the average speed of more then 10kmh that seams odd. I was driving the 3.3km in 6 minutes.

@Necromenz Maybe you could deactivate the "Use location" and also disable the "Prefer GPS" in the app, so that you use RPM calculated distance and speed. You need to be accurate with the motor poles, wheel diameter and pulley data so that you get valid data. You could also activate both GPS speed and RPM speed in the realtime data display and compare the values. Maybe your phones GPS isn't that good or you hide your phone in your bag or something like that, so not enough satellites where found for a good fix.

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

HiHo,

I checked the track after rogers post again, yes the gps did not record the track correctly. The track was more than 6km.
I have driven a few stretches today and none of the length has voted.

@hexa I have now set all the data in the program and will try again tomorrow. I am missing only the exact number of the pole. But I also unfortunately do not know how to determine.
Where I live the gps is always bad. Here hardly works a mobilefon but for my mountainboard it is a paradise. ;)

hexakopter
Offline
Last seen: 1 year 6 months ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

When you can not see it from the outside because your motor is fully closed maybe my thread in the other vedder forum can help you: http://vedder.se/forums/viewtopic.php?f=6&t=704

Can't see much what should block the satellites except for a few trees (the rest are wide fields), but when you say the GPS data isn't that good I believe you. :D

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

I asked frank how many Poles are at the Trampamotors. (14 poles) It was a little Bit easier.
My new track at this morning
https://metr.at/r/YE0N7

Grimjovv
Offline
Last seen: 1 week 6 days ago
VESC Original
Joined: 2017-06-09 15:32
Posts: 17

Sorry if I missed the info in this post but what version firmware is needed on the Vesc 6 to run with the new metr dongle? I'm def interested in knowing this info in real time I tried a few voltage meter's and they all failed. Thanks in advance I always appreciate the help you guys provide.

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Hi grim 

the latest fw 3.26 and the newest Version of the metr App at the Play Ort AppStore . Roman has updaten his App, you only have to change the tx and rx Pin Likör this https://youtu.be/IlUW_rRT6Jc.

Grimjovv
Offline
Last seen: 1 week 6 days ago
VESC Original
Joined: 2017-06-09 15:32
Posts: 17

What about the GND and VCC wires they don't match up either with the one I purchased from him?

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Black 5v

white gnd

green rx

red tx

at my is everything fine

Grimjovv
Offline
Last seen: 1 week 6 days ago
VESC Original
Joined: 2017-06-09 15:32
Posts: 17

Ok thank you got it running just having trouble with it reading anything. Do you have to wire up the ballance leads to the vesc some how when running lipo I haven't finished my Li ion yet been waiting on the place in china to finish updating they're BMS I haven't been able to buy a good BMS to finish the battery yet.

Sorry I tend to ramble lol

Long story short I am not getting any data through the app they all stay at 0 but connects through BT.

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

Mhhh

one question. Do you set the Option to UART/PPM at the App settings? I Forgot this one Time and it was the same Problem like yours.

(at Dual Vesc only the Master)

Grimjovv
Offline
Last seen: 1 week 6 days ago
VESC Original
Joined: 2017-06-09 15:32
Posts: 17

Yes but currently have both VESC set to UART/PPM, perhaps that's causing an interference most likely not though.

Necromenz
Offline
Last seen: 2 years 7 months ago
VESC Original
Joined: 2017-06-02 22:36
Posts: 37

only the master vesc.

have you enable "Can Fwd" at the metr-app? When you enable that, everything not work too.

 

 

Grimjovv
Offline
Last seen: 1 week 6 days ago
VESC Original
Joined: 2017-06-09 15:32
Posts: 17

Yeah I enabled "Can Fwd" on the metr-app. Still no details, doesn't read a thing. Tried both ways activated and not activated, also tried to name change the Can channel name in the Vesc app and in metr-app switched them all back to standard after trying them all.

rodread
rodread's picture
Offline
Last seen: 5 months 1 week ago
Joined: 2018-01-12 11:08
Posts: 12

Necromenz Benjamin Boesila Thank You Thank You Thank You x million

I'm such a noob, Can't believe I duffed my firmware. SWD reflashing worked as described. PHEWEY!!

One wee hint to anyone following the instructions for windows above. The VESC 6 firmware file is at https://github.com/vedderb/bldc/raw/master/build_all/60/VESC_default.bin

The kite turbine builder

sebixy
Offline
Last seen: 1 year 7 months ago
VESC Free
Joined: 2021-11-03 14:23
Posts: 2

Hello, I think I bricked my vesc, the light powers on but it is not detected by the vesc tool, I have tried usb, uart and BT they all power on but do not get detected. 

So I have bought a cheap st-link v2 and am trying to load a new firmware with stm32cubeprogrammer following the steps abowe but it always tells me "No stm32 target found". I powered the vesc with the battery and only connected SWC, GND and SWD as stated above. Any help is appreciated at this point, it is a flipsky 7550 if this information helps somehow

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