@@ -29,7 +29,7 @@ Three implementations will be tested
...
@@ -29,7 +29,7 @@ Three implementations will be tested
***Excitatory** setup with motor power going from 0 to 100
***Excitatory** setup with motor power going from 0 to 100
***Inhibitory** setup with motor power going from 0 to 100
***Inhibitory** setup with motor power going from 0 to 100
***Negative motor power** setup with motor power going from -100 to 100
***Negative motor power** setup with motor power going from -100 to 100
Due the output of the sound sensor span from 0 to 1023 a simple conversion is needed in all cases in order to make the mapping to the motor power with a maximum of 100.
Due the output of the sound sensor span from 0 to 1023 a simple conversion is needed in all cases in order to make the mapping to the motor power with a maximum of 100.
...
@@ -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