R/C Tech Forums - View Single Post - The Homebuilt Dynamometer (Dyno)Thread!!!
Old 04-25-2024 | 07:42 AM
  #161  
trilerian's Avatar
trilerian
Tech Elite
iTrader: (51)
 
Joined: Apr 2005
Posts: 2,393
From: Lexington KY
Default

Originally Posted by kufman
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.
trilerian is offline