Registration Notice

Due to increased spam, forum registration must be manually approved by a moderator! Please see this post for instructions.

Scout ESC Mini
« on: June 22, 2024, 03:41:47 PM »
Hi Guys,

I'm new to this forum, but I have been working (though a bit low-key recently) on a small remix of the Scout ESC.
I am building a 1/16th scale Leopard 1A4 from Tamiya for which I want to upgrade the gearbox to a fully independent 2-motor setup.
Since the Scout ESC is designed to support also much bigger motors than I use, I thought it would be a nice challenge to make a smaller version of this PCB.

I used the original schematics as baseline, but I changed the motor driver ICs for a different model.
The original motor driver is the VNH5019 (17.2x16mm) and I use the VNH7040 (10x7.5mm).
The Rds,on is a bit higher (40mOhm compared to 18mOhm) but since I use it for a 1/16th scale model only, I expect this to be no problem.
Designing for an acceptable thermal resistance was challenging in this small form factor though, but I think it is in good shape now, especially combined with the way the PCB will be mounted + fan and air ducting.

The control of the chip is a bit different unfortunately, so I have to update the firmware a bit as well.
The ATMEGA doesn't have enough pins to fully support the VNH7040, since the VNH7040 has a lot more control options.
This meant I had to design the control logic to be as close as possible to the way the VNH5019 is controlled by pulling control pins to fixed levels.
I now expect that the rotation direction is inverse, but the rest should be identical.
This now is the biggest risk though, and I can only fully test when I have the hardware on my desk and can do some testing and measurement.

The schematic and PCB design was made in Altium Designer.
It is finished now, but I still need to order and test it.
Because the thermal design involves quite some copper area, I hope to find an affordable place that can do the SMD assembly as well.
This will be continued shortly and I hope to post an update with the assembled PCB soon.

Regarding the fitment in the Leopard chassis, I first designed and 3D printed a housing in which the 2 motors and gearboxes fit and between which the Scout ESC Mini and a 40x40 fan could fit.
To make sure things don't get too hot, I did some airflow design, which uses ducts that will finally output any hot air from the Leopard's original exhaust ports.
This took quite some time and with a 2-year old son, hobby time is unfortunately not so abundant.

Anyway, let me know what you think.
I'll keep this thread to post any updates if I have them.
IMG_0251.jpg
Scout ESC Mini IMG_0251.jpg
Views: 5810
IMG_0252.jpg
Scout ESC Mini IMG_0252.jpg
Views: 5946

*

Offline LukeZ

  • 1295
    • View Profile
  • France
Re: Scout ESC Mini
« Reply #1 on: June 23, 2024, 09:17:01 AM »
Hi Niels, I think it's a great idea and your board design looks very good. I always wished the Scout was smaller, but there never seemed to be just the perfect chip available. I can't remember if this VNH7040 was around when I was designing it.

I see it has the advanced but also confusing Multisense functionality for reading currents and other info. ST uses this in several of their motor driver chips and to the extent I looked into it I never completely figured it out (the datasheet is sorely lacking in details). I suspect this is one of the things you mentioned having to set to a fixed level. I'll be interested to see how you handled it, but really, since the chip has overcurrent/overtemp and other protections, it's probably fine not to monitor current and simply let the chip protect itself.

I'm looking forward to seeing your progress. Once you have it tested and working (I have no doubt you will succeed), I will of course be happy to include it in the list of OP designs.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

Re: Scout ESC Mini
« Reply #2 on: July 06, 2024, 08:54:31 AM »
Thanks for your reply!

I noticed indeed that it has a bit more complex ways of measuring currents and temperature.
There is some switching involved that, for example, can output the chip's internal temperature to the analog output.
Because of the compatibility with the Scout ESC, I decided to wire it in a way that it's not able to use those features  (because if I wanted to, I needed more pins on the MCU, which were not available).
The idea is to keep using the temperature sensor as in the original design.

Because I'm quite slow with this project and I am also designing the housing and mechanics in CAD, it might still take some time to finish.
I'll keep you posted on the progress!

Re: Scout ESC Mini
« Reply #3 on: September 22, 2025, 04:25:50 PM »
It took a while, but in the meantime I got the boards made, the boot loader flashed and I am working on adapting the firmware now to be able to work with the new motor drivers.

The control for the motor drivers is similar, but as mentioned above already, the status pins and current readback is different.

I attached the schematics for anyone who is interested.
The board files, BOM and finally firmware will follow later. :D

*

Offline LukeZ

  • 1295
    • View Profile
  • France
Re: Scout ESC Mini
« Reply #4 on: September 23, 2025, 10:02:16 AM »
Good work! I'm glad to hear you're still working on this, steadily if perhaps slowly. Not many people (in fact none) have ever managed to build a self-design board by post number 3 on a new forum! I'll look forward to hearing how it works.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

Re: Scout ESC Mini
« Reply #5 on: September 27, 2025, 04:50:39 PM »
Thanks!  :D

Yeah, the progress has been really slow unfortunately.
I have been busy with work and private things other than hobbies, so I had to put it on ice for a while.

It was my first time that I ordered electronics in China at PCBWay, which was an interesting experience.
The boards came out nice and the process was surprisingly smooth and quick.
See attached a photo of the assembled board.

I am slowly working on updating the firmware now, for which I created a Gitlab repository which I will share here as well as soon as I have everything working.
IMG_0305.jpg
Scout ESC Mini IMG_0305.jpg
Views: 2220

*

Offline LukeZ

  • 1295
    • View Profile
  • France
Re: Scout ESC Mini
« Reply #6 on: September 28, 2025, 04:02:18 PM »
I totally understand about "the rest of life" getting in the way of hobbies. Better that than the other way around.

Anyway that's a cool looking board, and most importantly, it is very small! I have to say you did a very professional job on the design, I only just today noticed a ground frame around the crystal, though it was also visible in the Altium picture you posted last year. I am going to take a wild guess and declare that this surely can not be your first PCB layout.

Although I don't presently have a model to test this in, I think I am going to be tempted to assemble a few of these myself, to have on hand for that glorious future day when I am retired and get back into modeling.

If you need any help with the firmware just let me know. But somehow I am guessing you have it well in hand.  8)
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

Re: Scout ESC Mini
« Reply #7 on: October 26, 2025, 08:55:30 AM »
Thanks for the compliments!

No, this was not my first layout.
I'm an aerospace electronics engineer, so this is a nice hobby project for me to also use my technical skills.

Today, I got the Scout ESC Mini working for the first time using two PWM inputs (left stick = left track, right stick = right track):
https://www.youtube.com/shorts/XLSogyMyqIE

I have worked out how to use the Multisense functionality, but I still have to test it.
Basically it clips to 5V to indicate an error and if it's not 5V, it's lower and proportional to the motor current.
I will look into that today and see if I can get it to work properly.

Also, the tank seems to be running a bit slow compared to the single Tamiya motor, but I guess that's due to the gearbox.

Re: Scout ESC Mini
« Reply #8 on: October 26, 2025, 10:25:32 AM »
I implemented the Multisense functionality and uploaded the code here:
https://gitlab.com/niels.d/scout-mini

The readme still needs some updating and also the board files need to be uploaded (but they are on another laptop and I have to clean them up a bit).

I am also looking for heatsinks, but couldn't find any suitable ones in 10x10mm and enough height to protrude above the capacitors (which are a bit of an airflow obstruction unfortunately).
Maybe someone here has a tip for where to get those?

*

Offline LukeZ

  • 1295
    • View Profile
  • France
Re: Scout ESC Mini
« Reply #9 on: October 27, 2025, 09:24:24 AM »
Congrats on validating your design! I had no doubt it would work but it's nice to see it moving something in the real world. Congratulations also on sticking to the project over the long term. It's easy to start a project; hard to finish.

The tallest 10x10 heatsinks that I have seen are 10mm tall (ie, it's a 10mm cube). I'm sure you've seen those. The only thing taller that appears to be close in size is 9x9x12, if you search for that on Amazon or AliExpress you'll find them easily.

Since you don't have caps in-between your two chips like I did, maybe you could use a single wide heatsink that would attach to both. I am seeing 22x8x7 and 22x13x11 on AliExpress. I don't know if 22mm is quite long enough, and you don't gain anything in height, but you would get more surface area.

I tried looking at your project on GitLab but although I can navigate to the page you linked, the code is not visible. Maybe it needs to be made public somehow, but at any rate it would be good if anyone could view it without having a GitLab account.

NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

Re: Scout ESC Mini
« Reply #10 on: October 27, 2025, 02:08:26 PM »
Thanks again!  :D

Als thanks for thinking along on the heatsinks.

I ordered some of the 9x9x12 heatsinks, with which I have enough height to clear the capacitors.

I also granted you access to the Gitlab project, so please check if it works.

One quirk with the Multisense output is that it seems to saturate to maximum ADC value so now and then.
It doesn’t stay in that error for long, so I think it is not a real error that is triggered.
On the other hand, I also don’t expect it to draw 14.3A (which should be 14 [mA/count] multiplied by 1023 [counts]).
This is something I have to do some measurements on to solve I guess.

*

Offline LukeZ

  • 1295
    • View Profile
  • France
Re: Scout ESC Mini
« Reply #11 on: October 29, 2025, 03:05:45 PM »
Hi Neil,

Ok, I can see your GitLab project now, but only when I'm logged in. That's fine for me, but it would be good if you could set it to be visible to everyone, whether they have an account or not.

I've spent some time again beating my head against the wall with the VNH7040 datasheet. In terms of current sensing, it looks like it uses the exact same process as the VNH5019, only with different constants. What is so confusing is on page 16 of the datasheet they give the same Vsense of 0.5v for two current levels (Iout 0.05A and 0.3A), and again the same Vsense of 4v for the three remaining levels (Iout of 3A, 5A, and 10A). This should not be possible. The sense voltage (current across the sensing resistor) should change as the current changes.

Of course it would be nice if they'd tell us what resistor value they're using for their measurements, but we can deduce it. On the VNH5019, the implied resistor value was fairly consistent across all their readings, it came to about 1.1k. I can't remember now why I chose 1.5k.

But with the examples we have from the VNH7040 datasheet, if they can even be trusted, which I'm not convinced they can, the implied Rsense resistor value ranges all over the place. Of course, we can only have one value on our board (these are R115 and R116 on your schematic).

Anyway, when you're calculating 14.3A, all that means is that the voltage over the Rsense resistor has saturated - and probably, since you don't think you were drawing 14.3 amps in real life, it saturated much earlier.

I think really the best way to understand what is going on would be to take some actual measurements of current draw and simultaneously the voltage at point M1_MS (or M2_MS) on your schematic, and get some empirical evidence of what the ratios are.

A few more comments:

In your code, you might want to set motor state to MOTOR_STOPPED in these two function. Otherwise the state will still show as ROTATING even when stopped, and the current sense measurements will still occur. However I don't think this actually would cause any problems, but I thought I'd mention it anyway.
Code: [Select]
void StopMotor1(void)
{
    M1_Speed = 0;
    M1_OCR = 0;
    if (BrakeAtStop) BrakeMotor1();
    else Motor1State = MOTOR_STOPPED;   // ADD THIS LINE
}

void StopMotor2(void)
{
    M2_Speed = 0;
    M2_OCR = 0;
    if (BrakeAtStop) BrakeMotor2();
    else Motor2State = MOTOR_STOPPED; // ADD THIS LINE
}

Finally, I should have told you this a year and a half ago, but the reason I put ADC7 to +5v, is so that if someday a different hardware version was made, that new version could set it to Gnd, and then the firmware could read that status of that pin on boot, and adjust the code to fit the hardware. This would let us have a single firmware for both boards, instead of two. Of course there was no way you could have known that, and it's not a problem to have two distinct firmwares. But if you ever have to redesign the board for some other reason (God forbid), you could make that change.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline LukeZ

  • 1295
    • View Profile
  • France
Re: Scout ESC Mini
« Reply #12 on: October 30, 2025, 08:50:14 AM »
I spent some time last night thinking more about the current sense procedure and I probably had not understood it very well when I wrote my earlier reply. I've looked at the code, the datasheet, and my earlier notes more closely and I've concluded you are doing it correctly, and I also think that the choice of 1.5k for the Rsense resistor is still a good one for the VNH7040. This resistor determines the maximum current we can sense, and you're right, given the ratios for the VNH7040 that comes to about 14 amps. But that is plenty, even if in theory the motor driver says it can do more than that.

But none of that is what you were really commenting on, I just got sidetracked. You were mentioning the fact that sometimes the Multi Sense pin goes to saturation, indicating an error condition; but you knew you weren't drawing anything near 14 amps. I agree with you, this is not likely a real error, but rather a transient condition. I would suggest that instead of checking for a fault condition every single time through the main loop, which will detect even the briefest of transients, that instead you look at how we are measuring currents and copy that approach for checking the fault conditions. Firstly, we only measure currents at some predetermined frequency (CurrentReadFrequency_mS which we set to 100 milliseconds). And even though we read currents ten times a second, we don't throw an overcurrent error until we have 10 consecutive readings over the limit (so in total the overcurrent condition will have to last persistently for 1 second for us to consider it valid).

You can adjust the actual frequency and count of consecutive fault indicators to whatever makes the most sense in your testing, but the idea is that this lets you weed out "false positives" or temporary spikes that are not actually relevant or persistent.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs