Problems Building VESC

Hey guys, I have 3 questions who don’t let me finish my VESC.

1 In which direction should the 8Mhz Quarz look? (He got 4 pins)

2 In which direction should the LEDs look? (Can’t see on my plan)

3 A resistor (the number e.g R16) is hiding so I can’t see on the plan: See here:

I am using this one:

I would be very happy if someone could helpe me :slight_smile:

Regards!

maybe check the schematics? you can get them from vedder’s github

1 Like
  1. I believe I put it so the text on the chip was right side from how you have the PCB oriented in the picture above, but the truth is that it doesn’t matter. Given the orientation of the crystal I am almost positive it will work either way (just not upside down) since it’s a crystal that just oscillates (doesn’t have polarity) and the grounds are in opposite corners. I can check it in the morning for you to be sure, if no one beats me to it. edit: The spec sheet (found via Mouser here indicates that usually pad 1 has a slight chamfer (think “cut corner”), on the inside, as you can see in this screenshot from the spec sheet.

    Pad 1 is the one that goes in top right of the board in the orientation of the pictures you posted (the closest pad to C5)

  2. Gnd is up. Here’s a screenshot I just took from Vedder’s schematics. Just note that it shows them in the mirror as you see them (D1 to D3 right to left, instead of left to right as is seen from that side of the board) .

  3. The one right above R401 is R17, and the one just to the left (in your picture) is R18.

2 Likes

There no right way to place the crystal, it’s symmetric.

Also these might picture might help you with the placement (they are suppose to be in Vedder files)

You need to cross-reference it with the BOM.

1 Like

Tried to check what I did, but I can’t see through my shrink wrap and behind my red wire…but I’m still fairly confident that it doesn’t matter, just as @JohnnyMeduse said.

1 Like

Thanks to all of you! fot searching and figuring out the problem. You helped me a lot. I was too stupid to check the shematics…

I try to continue with the last few components next week. then i will give a feedback :wink:

Regards

You got it! I built two for myself and helped diagnose an few issues a friend of mine had after he built his, so feel free to reach out!

@rpn314 thank you maybe I will write you an PN if I get stuck again.

I soldered mine today. And I hope now I am finished. So I can Programm in a few days.

Do you program with Linux or windows?

To flash the VESC with the bootloader and default firmware I used Windows 10. I think the stlink software I found first ran on windows, so I wen with it, but I’ve done stuff since with Linux. I flashed my nunchuckrf in ubuntu.

1 Like

Ok thanks, then maybe you can help me. I have the ST-Link2 the withe one. And I also want to flash with windows. But I don’t know where I can get the hex file for the 4.12. And also someone said I need 2 hex files one for the software and one for the bootloader. Other ones said there is a single hex file with both.

How do you do it? And can you maybe upload the hex? Or give me a link :slight_smile:?

Regards!

Problems problems problems

I hope someone of you can help me… @rpn314 @JTAG

Today I tried to connect the controller and tried to program it. But it doesn’t work :frowning2: I measured some things and saw that the power input of the programer was not 3.3 V It was 1.5 V Also there was no high signal on reset pin while programming.

And I know that the ST link is fine because I programmed some other electronics with it

That’s what I get when I try to connect…

What can I do next? And If i did not get it will someone buy the VESC from me? Otherwise it will lay around years :smiley: Or maybe could check the problem? I would buy for it… (I am from Germany)

My job is electronics and i have equipment. So if u have an advice what to measure I can do it with oscilloscope e.g.

Best Regards!

I followed this: VESC firmware/bootloader flashing windows stlink (credit to @jacobbloy)

Did you find the hex file? I think there’s some with the bootloader (to allow to flash over USB in the future) and some without. At the bottom of that video, he has this link to hex files: http://vesc.net.au/flash/ Just double check after flashing if they have the current ramp bug, cause I think they might…and it’ll fry your drv. If it does have it, just reflash with the USB to a known good ones (no need for hex now, since the bug isn’t in the bootloader). That’s pretty much what happened to me, but I fried my DRV before I found it cause I was stupid and didn’t check after flashing.

You don’t see a light on the VESC do you? The blue light should come on if I remember…

No i can’t see any reaction when I connect to the St Link programmer. That’s what i did: Connect:

Connect… 3,3v to pin 1 - MCU VDD CLK to pin 9 - SWCLK DIO to pin 7 - SWDIO RST to pin 15 - NRST GND to pin 3 - GND(2)

Then connect the VESC to the programer via Cables, then connect programmer via USB, then start ST Link Utilities, then press Connect -> Error

No flashing LED on VESC… Only 1.5V on MCU VDD No High Reset pin (STM need high at flash progress I think)

But now I see… Do I connect to the wrong GND? There is a (2) behind and it sais: Connect: Connect to GND for noise reduction.?..

you probably don’t have 3.3v coming from the stlink

you can try to connect your vesc to a power supply

Yeah, you definitely need 3.3v coming from the ST-Link. Which one do you have exactly? I used one of those super cheap flash-drive looking ones

Jeah I will try, then I will see how much amps will flow :smiley:. Maybe i have a Shorting (short-circuit) on the PCB. But I don’t know…

But then I see where it’s getting hot and can find the problem :smile:

But don’t know what to do else, because it’s a ST Link In our company they program every day with it… so it should work

@rpn314

The left one :wink:

Try Pin 19 for vcc instead of pin 1. Page 12 in the manual for that st-link unit shows that pin 19 is 3.3 on the target.

1 Like

@rpn314 thanks i will try :slight_smile: and write tomorrow if it worked.

Ok thanks to all! @rpn314 @Blasto @JohnnyMeduse @chinzw
It is now working! The problem was the connection of the programer.

But I have one more question… Is it normal that I got misfires with that little BL-Motor? 2000kv or sth. I only had that one around and tested it with it. And when I give throttle the motor stops at highspeed. Then won’t move. First I must go back to zero then I can throttle up again. What could that be? Or do you think it’s only because this little motor is too fast?

Regards!