... | @@ -46,6 +46,7 @@ Because of the friction in the motor a certain power needs to be applied in orde |
... | @@ -46,6 +46,7 @@ Because of the friction in the motor a certain power needs to be applied in orde |
|
By repeatedly tuning the minimum power we found that a minimum power of 40 was sufficient for this setup. With 40 as minimum power the motor power range is limited to 60 and the equation will therefore be
|
|
By repeatedly tuning the minimum power we found that a minimum power of 40 was sufficient for this setup. With 40 as minimum power the motor power range is limited to 60 and the equation will therefore be
|
|
|
|
|
|
*conversion factor = 60/1023 = 0.059*
|
|
*conversion factor = 60/1023 = 0.059*
|
|
|
|
|
|
*power = (sound level * 0.059) + 40*
|
|
*power = (sound level * 0.059) + 40*
|
|
|
|
|
|
This is implemented as a function which takes the sound level (0-1023) as parameter and returns the motor power (40-100). The implementation of this is seen in the following code snippet
|
|
This is implemented as a function which takes the sound level (0-1023) as parameter and returns the motor power (40-100). The implementation of this is seen in the following code snippet
|
... | | ... | |