STM32 ESC PCB Schematic Design - KiCAD ESC Project (DeepDrive v1.0)

  Рет қаралды 15,094

DeepBlueMbedded

DeepBlueMbedded

Күн бұрын

Пікірлер: 53
@i70da_12
@i70da_12 3 күн бұрын
I am so fortunate to have found this helpful video. I was completely overwhelmed by the lack of videos covering this topic. Thank you, Khaled.
@khaledmagdy
@khaledmagdy 3 күн бұрын
Thanks for your kind words, really appreciate it and glad you found it helpful! Wish I had the time to follow up on lots of projects, this one included.
@DeMaxize
@DeMaxize Жыл бұрын
amazing , waiting for more ! this type of videos are gonna blow up , very good
@khaledmagdy
@khaledmagdy Жыл бұрын
Thanks a lot!
@konturgestalter
@konturgestalter 7 ай бұрын
amazing content! I hope you will produce more videos like this
@mustafa_mah
@mustafa_mah 4 ай бұрын
ما شاء الله عليك يا خالد ربنا ينفع بك ويوفقك ❤
@dhairyapanchal7887
@dhairyapanchal7887 8 ай бұрын
I'm developing ESC for ebike and found your video its very helpful and guided through my mistakes and helps me a lot if I just changed the FETs to drive at higher voltage along with power sections it's possible to implicate same configuration of your circuit for my project. Waiting for your follow-up video related to drivers and testing 😊
@kumaylmoosavi9353
@kumaylmoosavi9353 9 ай бұрын
Amazing guide to BLDC motor driver. Thankyou! I just have a some small questions, any way you can guide would be very much appreciated a) What maximum current rating of a BLDC motor this driver can drive? b) What changes would you suggest I look into to make it a 24V DC supply operated system c) Can you share or make a video on the firmware that you developed in this video at the end for the six step commutation system? Did you use an FOC algorithm?
@khaledmagdy
@khaledmagdy 8 ай бұрын
I'm really glad you found it helpful! a. This should handle up to 30A DC. I've tested it for 15A and it didn't show any sign of developing any heat. b. The protections, buck circuit, mosfet devices, and voltage feedback attenuators. Not so many changes actually. c. I did complete the bringup back then when i received the boards, tested it with an FOC implementation as well. It worked so well despite the fact that i'm itching to optimize it (in terms of HW) more so it becomes more accessible to people when the design is released. I wasn't able to take the time to document this work and shoot some videos to show the progress. I hope this comes out in the near future!
@amerhk4245
@amerhk4245 2 ай бұрын
An Amazing video!! waiting for more similiar videos.
@kulaniscap
@kulaniscap 2 ай бұрын
Give us more videos - this is really good work.
@davidbalderrrama
@davidbalderrrama Жыл бұрын
Amazing video. Thank you for posting this!
@khaledmagdy
@khaledmagdy Жыл бұрын
Glad you liked it!
@Fadelabdalkhalik
@Fadelabdalkhalik 7 ай бұрын
Finally Eng Khaled is back
@abdelrahmantawfik9504
@abdelrahmantawfik9504 8 ай бұрын
very very useful, keep going ❤❤❤❤
@giantbee9763
@giantbee9763 6 ай бұрын
Hello! How's the project going? :) Any updates? :D Thanks for the video comprehensively walking through your thought process!
@nimasalehi5197
@nimasalehi5197 4 ай бұрын
is there any software coding design video released yet for this project? will you do it?
@mohamedsafy305
@mohamedsafy305 6 ай бұрын
Amazing content as always and looking forward to hear about the consolidated version for cheap skates folks LOL ! I had a question tho regarding the shipment, duty fees and taxes on such boards in Egypt, and was it a smooth process importing such board ?
@khaledmagdy
@khaledmagdy 6 ай бұрын
Thanks! Really glad you found it helpful, unfortunately, the economic version of this project has been on my to-do list for ages, and never had the time to complete it, I hope I will get back to it soon. Regarding the boards' import clearance, it was a total nightmare! I would have given up on it and let them take it if I hadn't promised the sponsor of this video to create it. It went through all sorts of inspections (national security, explosions committee, NTRA, ...). Each inspection of those has its own fees + some misc fees + voice call with someone literally negotiating with me for the maximum fees I'm willing to pay to clear my shipment. All in all, it was chaotic! I had to pay about 170$ just to receive my order which costs 160$ on its own. Keep in mind, all of this was back in 08/2023 before "floating", now the custom's USD price has skyrocketed and maybe some new fees have been added because why not! xD
@mohamedsafy305
@mohamedsafy305 6 ай бұрын
@@khaledmagdy Just what I've expected, maybe if the board and components were imported separately it wouldn't be as difficult ? after all in the eyes of the government you're importing an unregulated device/product. I'm thinking about ordering a pcb board lately and my planned approach is : PCB -> JLCPCB Components -> Mouser, as I've heard that they deal with all of this mess + free shipping & duty for 60$+ orders ! although I'd have to pay for double shipment and of course soldering the parts (hot air rework for the rescue!).
@khaledmagdy
@khaledmagdy 6 ай бұрын
Exactly! That's the challenge i've chosen. Importing fully assembled boards, for us, is asking for troubles and a very risky business. But i've chosen to fight for my package instead of frying the poor smd ICs which i hate doing. Your approach is very cautious and is going to work ISA, i've done that as well and it's much easier to import bare boards and components in separate packages. Please be advised, even free shipping can still be subject to clearance fees (at least 20-25$ for a 60$ worth of goods). Good Luck!
@mohamedsafy305
@mohamedsafy305 6 ай бұрын
Thanks that was really helpful! Thanks also for wishing me good luck I really need it 😅. Ramadan kareem 🙏
@kolyankorolev963
@kolyankorolev963 8 ай бұрын
Hello. I'm trying to understand the necessity of the ZCD circuit. We generate Back Electromotive Force (BEMF) from each phase using resistor dividers, and then feed it to comparators for comparison with a virtual ground. Is it necessary to implement the ZCD node with comparators, or would it be better to use the MCU's ADC, where we can programmatically compare the readings of virtual_n and phv?
@khaledmagdy
@khaledmagdy 8 ай бұрын
The microcontroller's ADC can do it but it will load the CPU too much to process this at the required rate of conversions. If there are internal analog comparators in the MCU it would be perfect to use, otherwise we'd go for an external analog comparator circuit like the shown in this video. Instead of doing continuous ADC conversions and voltage comparison in software, I just get an interrupt on EXTI pins on every ZCD event.
@kolyankorolev963
@kolyankorolev963 8 ай бұрын
thanks for the answer, I understand why it's better to use a comparator. I have a few questions. 1) I'm using an internal buck regulator to convert 6s-12s, i.e., 48 volts to 5 volts. For compactness, I choose a higher frequency because it affects the size of the inductor. So, at a frequency of 750 kHz, the inductance is about 15 µH. However, it's not entirely clear how to choose the decoupling for the COMP pin. Texas Instruments suggests calculating it in WEBENCH, but due to sanctions, I can't register. In the video, you mentioned that you're already working on a new version. Have you encountered choosing RT-CLK and COMP? 2) Regarding the question about ZCD and BEMF. Why then connect the PHV_U (V and W) and Virtual_N pins to the microcontroller if they are only needed for the comparator to determine the position of the motor's phase angle? Then why do we need to connect BEMF to the MCU? And how did you calculate the dividers in BEMF? 3)In the DRV8302 documentation, there is a connection to the MCU's ADC - PVDDSENSE. Do I understand correctly that this is battery discharge control? I just didn't see anything similar in your project. Overall, it's not clear why they use SENSE formation without comparators.@@khaledmagdy
@khaledmagdy
@khaledmagdy 8 ай бұрын
@@kolyankorolev963 1) I've used WEBENCH a few times in the past for Ti-based converters, I guess you can use another datasheet for a similar device where you may find a an example for the same values you're designing for or at least find an equation to calculate it. 2) The phase voltages PHV_x & Virtual_N are connected to the microcontroller's ADC as well as the external comparators. The external comparators are for ZCD as we agreed on. But the connection to the ADC is for something else which is operating in sensorless FOC mode instead of six-step commutation. The intention behind designing this board is to be a dev board that should support so many control schemes. One of which is the "Windmilling Mode For Sensorless FOC" this is a non-Motoring mode where the BLDC will be spinning due to inertia or external wind without any given power from our ECU, therefore we need to monitor the phase voltages while the inverter bridge is fully opened. Designing a good observer can help us detect the motor speed & angle and consequently starting the motor successfully while it's spining (windmilling) without the need to completely stop the motor and move it to a "known vector" before attempting to start. TLDR: you don't have to do it unless you're building something similar to mine so you can try different control techniques on the same board. 3) This is just for monitoring the VDD line in software and making sure it's operating within range. I do have a logic supply & battery voltage supply dividers that send those voltages to the MCU's ADC maybe the naming is different but essentially they're the same. Hope this helps!
@prasanthchigurupatii
@prasanthchigurupatii Жыл бұрын
Thank you sooooooooomuch ......your videos help a lottttt❤
@khaledmagdy
@khaledmagdy Жыл бұрын
I'm very glad to hear this!
@maazsiddiqui6324
@maazsiddiqui6324 Жыл бұрын
great work, keep it up;
@khaledmagdy
@khaledmagdy Жыл бұрын
Thanks a lot!
@MehmeterTem5534
@MehmeterTem5534 Жыл бұрын
Awesome lesson
@khaledmagdy
@khaledmagdy Жыл бұрын
Glad you liked it!
@sanjikaneki6226
@sanjikaneki6226 7 ай бұрын
how is V2 going? also is the code finished?
@nimasalehi5197
@nimasalehi5197 4 ай бұрын
that was awesome, thank you
@zakhoover9946
@zakhoover9946 3 ай бұрын
Did you post your microcontroller code/walkthrough it anywhere?
@khaledmagdy
@khaledmagdy 3 ай бұрын
not yet, unfortunately :(
@zakhoover9946
@zakhoover9946 3 ай бұрын
@@khaledmagdy no worries! I am a student and was impressed by your circuit design and learned a lot!
@ahmedkamil7655
@ahmedkamil7655 Жыл бұрын
Very good Work
@khaledmagdy
@khaledmagdy Жыл бұрын
Thanks!
@eelcohoogendoorn8044
@eelcohoogendoorn8044 8 ай бұрын
Thanks, this is a really excellent level of detail, very educative for the level of knowledge I am at. Would be great to see someone go over firmware written for educational purposes as well. As much as I like VESC I cant say the code was very much written to be read.
@TrilokSawant-pz9sn
@TrilokSawant-pz9sn 4 ай бұрын
how to download schematic ? it is asking password for drive
@damianwiecaw492
@damianwiecaw492 8 ай бұрын
Why didnt you use DRV built in buck converter?
@khaledmagdy
@khaledmagdy 8 ай бұрын
I should have done. At that time I hadn't tested it before and decided to go for a Ti buck that I was more comfortable working with. It should work just as fine but needs a bit more double-checking for the information in the datasheet to make sure everything is implemented correctly. As i said near the end of the video, more optimizations should be done and this is one point of many others that i need to consider for the next revision. I hope i'll have some time to get back to it.
@damianwiecaw492
@damianwiecaw492 8 ай бұрын
@@khaledmagdythank tou for the reply, i really appreciate your blog!
@sassi7190
@sassi7190 9 ай бұрын
عظمة
@Mohamed_Ali-24M
@Mohamed_Ali-24M Жыл бұрын
ياريت تستمر في الشرح
@dbtechs2593
@dbtechs2593 Жыл бұрын
dont really get it how your reverse polarity works , POWER_GND_REVERSE isnt connected to any GROUND related to the power input .. meaning POWER_GND_REVERSE isnt 0 nor high , you dont know what is the voltage there since its floating..
@khaledmagdy
@khaledmagdy Жыл бұрын
You can find it connected in the last part of the power section which is the "Bridge Cap. Array". The article here has some screenshots that should help. deepbluembedded.com/stm32-esc-pcb-design-foc-esc-bldc-schematic/
@dbtechs2593
@dbtechs2593 Жыл бұрын
yes but its still connected to GND that has no relation to the input.. how is there a voltage potential created without the gnd being connected to the source@@khaledmagdy
@khaledmagdy
@khaledmagdy Жыл бұрын
This is a really good question. Take another look at the schematic and let's divide the operation as follows: 1. Initial Condition: When you first plug the +12v power rails input, the MOSFET's source (Vs) will be floating and the MOSFET won't turn ON as you've mentioned but the current will flow back to the supply through the MOSFET's body diode. This will set the Vs to Vdiode Vs (Source) = Vdiode (Diode Drop) Now, we've got a Vgs = 12 - Vdiode, Which is more than enough to turn ON the MOSFET 2. Steady State: At steady state, the MOSFET will be kept in the ON state and the current will keep flowing through it instead of the body diode. I hope this helps
@dbtechs2593
@dbtechs2593 Жыл бұрын
how will the current flow back to the source if it has no gnd on source pin? the anode is floating..@@khaledmagdy
@khaledmagdy
@khaledmagdy Жыл бұрын
I was going to draw some illustrative diagrams to help you in this until I found this article in the link below which already has enough information about this topic. Give it a look and tell me if you need any further help! electronicsbeliever.com/how-to-use-mosfet-as-reverse-battery-protection/
@hossamhussien7203
@hossamhussien7203 4 ай бұрын
ارفع ايدك فوق انت مصري
3 engineers race to design a PCB in 2 hours | Design Battle
11:50
Predictable Designs
Рет қаралды 307 М.
SPI Hardware & PCB Design - Phil's Lab #134
33:22
Phil’s Lab
Рет қаралды 29 М.
Всё пошло не по плану 😮
00:36
Miracle
Рет қаралды 1,6 МЛН
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 11 МЛН
Top Fifteen Mistakes People Make When Designing Prototype PCBs
12:26
Cosplay Light and Sound
Рет қаралды 156 М.
6 Horribly Common PCB Design Mistakes
10:40
Predictable Designs
Рет қаралды 207 М.
I2C Hardware & PCB Design - Phil's Lab #132
34:50
Phil’s Lab
Рет қаралды 43 М.
Flawless PCB design: RF rules of thumb - Part 1
15:45
Hans Rosenberg
Рет қаралды 78 М.
Switching Regulator Component Selection & Sizing - Phil's Lab #71
17:00
Building a Custom ESC from Scratch (VESC Based)
20:48
KamiTech
Рет қаралды 7 М.
ESC Hardware Design - Phil's Lab #66
18:39
Phil’s Lab
Рет қаралды 95 М.