       { 
         // note that alpha can't be zero
         double alpha = fabs(alphaSigned);
-        if ((millis() - initialTime) < minTime_ms/alpha*(1-alpha)+minTime_ms)
+        if ((micros() - initialTime) < minTime_us*random(100,200)/alpha*(1-alpha)+minTime_us*random(100,200))
         {
-              digitalWrite(HbridgeEnablePin, LOW);
+              digitalWrite(HbridgeEnablePin, HIGH);
         }
         else
         {
-          digitalWrite(HbridgeEnablePin, HIGH); // or low?
-          initialTime = millis();
+          digitalWrite(HbridgeEnablePin, LOW); // or low?
+          initialTime = micros();
           isCycleStarting = true;
         } 
       }

// The range was reduced 
double sensorValueMin = 255;//0
double sensorValueMax = 767;//1023
double deadBand = 0.2; // Use to ensure zero speed. Should not be zero
long initialTime = 0;
long lastSerialInputTime = 0;
boolean isCycleStarting = false;

    {
      if (isCycleStarting)
      {
        if ((micros()-initialTime) > minTime_us*random(100,300))
        {
          digitalWrite(HbridgeEnablePin, LOW);
          isCycleStarting = false;
        } 
      }
