R/C Tech Forums

R/C Tech Forums (https://www.rctech.net/forum/)
-   Radio and Electronics (https://www.rctech.net/forum/radio-electronics-137/)
-   -   The Homebuilt Dynamometer (Dyno)Thread!!! (https://www.rctech.net/forum/radio-electronics/899641-homebuilt-dynamometer-dyno-thread.html)

trilerian 04-25-2024 07:42 AM


Originally Posted by kufman (Post 16095702)
The original wheel is 36mm in diameter. The larger test was 96mm. The windows in the wheel are 5mmx5mm. PETG is also transparent to IR. I haven't heard of PA6-GF till your post. Looks interesting from a strength aspect but sounds nasty to print with.

It is the code that I shared above and modified with the suggestions that were posted. Maybe I don't understand how it works? I created a Github repository for sharing

https://github.com/Kufman/Dyno/blob/...New-Delay_Nano

And the one without a string for the serial

https://github.com/Kufman/Dyno/blob/...lay_New-Serial

Array code for Minima

https://github.com/Kufman/Dyno/blob/...t_Array_Minima

Do you tell the program the update time or does it take it from the timestamps of the readings?
If you are telling it the update time then this:
if((currentTime - lastUpdateTime) > UPDATE_INTERVAL)

should change to:
if((currentTime - lastUpdateTime) >= UPDATE_INTERVAL)

The first statement will make the update time greater than the interval while the second statement will keep it at the update interval.

So the code has an ISR that is constantly running checking for the falling edge of the rpm sensor. Then the code that is running in the main loop checks for the update time and then serial prints all the variables it it currently knows. It goes through 6 analog sensors, I assume this is in case you want to use them all, but I would comment out all the sensors not being used and change the number of ports to read to the number of analog sensors you have. Then store the other non needed sensors as 0s in a string in flash (use FlashStringHelper). This will save time and not have to analog read the sensors you are not using as each analog read take approximately 110µs. I would also write a function for the analog reads instead of reading them while serial printing and then just serial print the results.

After that, I would test a sensor on the motor by connecting off of one into pin 2 of your Uno. But these sensors work reliably for low turn BLDC motors with high rpm (50,000+).



And... I just looked at the array code. Which is completely different, lol. So question I have now; what does the Simple Dyno software actually expect for data? I don't think you need all these data points for current and voltage. Your array size is 1550, and I think you said you can get 4 seconds, so if you average it, 400 sample/seconds. I understand the longer the run goes the more samples there will be because the RPM goes up, but just for numbers sake let's make it easy. So the idea is to split up the analog read from the rpm sensor (and please take those out of the ISR) and treat the timing of these (rpm and other sensors) independently. I would put the analog sensors on a timer to start with and go from there. After looking through this there are quite a few different things I want to try.

As to the IR transparency, are you using black filament? Some on the interwebs claim the black PLA can be used. I'm not seeing a lot of results for PETG and IR transparency. I also have some black PLA-CF I can test with. Not sure if the small amount of carbon filament in it would make a difference, but I will print a test wheel and test it with a ir tachometer.

kufman 04-25-2024 02:14 PM


Originally Posted by trilerian (Post 16095828)
Do you tell the program the update time or does it take it from the timestamps of the readings?
If you are telling it the update time then this:

Good question, I am not 100% sure what the SD software is looking for.

if((currentTime - lastUpdateTime) > UPDATE_INTERVAL)

should change to:
if((currentTime - lastUpdateTime) >= UPDATE_INTERVAL)

The first statement will make the update time greater than the interval while the second statement will keep it at the update interval.

So the code has an ISR that is constantly running checking for the falling edge of the rpm sensor. Then the code that is running in the main loop checks for the update time and then serial prints all the variables it it currently knows. It goes through 6 analog sensors, I assume this is in case you want to use them all, but I would comment out all the sensors not being used and change the number of ports to read to the number of analog sensors you have. Then store the other non needed sensors as 0s in a string in flash (use FlashStringHelper). This will save time and not have to analog read the sensors you are not using as each analog read take approximately 110µs. I would also write a function for the analog reads instead of reading them while serial printing and then just serial print the results.

I will have to think about that.

After that, I would test a sensor on the motor by connecting off of one into pin 2 of your Uno. But these sensors work reliably for low turn BLDC motors with high rpm (50,000+).

They work fairly well but you are subject to the sensor balance causing the same problem as my wonky wheel. If I was only using a single sensor pickup per revolution, either system works fine. I have spoken to Tekin in the past about the hall sensors and they don't really like them but that is the way the industry went. Tekin and Castle both said that the sensors can give bad timing data during periods of high torque (Lots of magnetic field from the stator). The magnetic field can actually shift in the rotor which is why using sensorless, back EMF gives the best timing information. I also test brushed motors so it wasn't a good option for me.

And... I just looked at the array code. Which is completely different, lol. So question I have now; what does the Simple Dyno software actually expect for data? I don't think you need all these data points for current and voltage. Your array size is 1550, and I think you said you can get 4 seconds, so if you average it, 400 sample/seconds. I understand the longer the run goes the more samples there will be because the RPM goes up, but just for numbers sake let's make it easy. So the idea is to split up the analog read from the rpm sensor (and please take those out of the ISR) and treat the timing of these (rpm and other sensors) independently. I would put the analog sensors on a timer to start with and go from there. After looking through this there are quite a few different things I want to try.

So far, I have been black box testing what the SD software is looking for. I know it wants all the values for each data point. I also know that is is looking at the RPM in real time to determine when data taking should begin and when it should end. It is a settable parameter in the software.

As to the IR transparency, are you using black filament? Some on the interwebs claim the black PLA can be used. I'm not seeing a lot of results for PETG and IR transparency. I also have some black PLA-CF I can test with. Not sure if the small amount of carbon filament in it would make a difference, but I will print a test wheel and test it with a ir tachometer.

Yes, black and dark blue PLA with 100% infill and up to 5mm thick. I also know that painted lexan doesn't work (tried a scrap piece of a painted body). My cousin does vinyl cutting so want to try that route as well since electrical tape works very well.

1

CCristo 04-25-2024 02:26 PM

How about a carbon fiber wheel with a 3d printed hub to attach it to the shaft? I can help you with the CF if you want. Send me a PM with a drawing

kufman 04-25-2024 03:57 PM


Originally Posted by CCristo (Post 16095967)
How about a carbon fiber wheel with a 3d printed hub to attach it to the shaft? I can help you with the CF if you want. Send me a PM with a drawing

That was going to be my next choice since my cousin also has a CNC router. If he can't do it, I will get in touch with you. Thanks for the offer. Here is the original design

https://www.tinkercad.com/things/1zf...dyno-rpm-wheel

trilerian 05-06-2024 06:38 PM

Any progress on this?
EDIT: And do you have the Simple Dyno software? I checked the github link, but there is not a packaged zip file that I can find.
EDIT: And sometimes you just got to click a few more times to find it...

kufman 05-07-2024 11:18 AM


Originally Posted by trilerian (Post 16098718)
Any progress on this?
EDIT: And do you have the Simple Dyno software? I checked the github link, but there is not a packaged zip file that I can find.
EDIT: And sometimes you just got to click a few more times to find it...

No progress lately. Been busy at work and I went racing a couple times so no bench racing, lol! The spring points series I was racing ended so I should have more time soon.


All times are GMT -7. It is currently 05:27 PM.

Powered By: vBulletin v3.9.3.9 Patch Level 3
Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.