Ok ich habe erst mal eine Lösung gefunden das Haupt Problem lag am programm
ich habe noch einen elko 1000µF 50V parallel geschalten Dan lauft es noch besser das Problem ist nur wen ich eine Drehrichtungswechsel vornehme Dan ist der Elko ja falsch gepolt welchen Kondensator kann ich da nehmen und gibt es die Möglichkeit das zu berechnen.Code:#define MOTOR 2 #define POTI A0 #define PWM 9 //int poti = A0; // select the input pin for the potentiometer int poti_Value = 0; // variable to store the value coming from the sensor int poti_prozent = 0; void setup() { // declare the ledPin as an OUTPUT: //pinMode(ledPin, OUTPUT); Serial.begin(9600); pinMode(MOTOR,OUTPUT); pinMode(PWM,OUTPUT); } void loop() { int pwmSpeed; // read the value from the sensor: poti_Value = analogRead(POTI); poti_prozent = map(poti_Value, 0,1023, 0,100); Serial.print("Poti = "); Serial.print(poti_prozent); Serial.println("% "); digitalWrite(MOTOR, HIGH); //pwmSpeed = abs(poti_Value-512)/2; // Geschwindigkeit analogWrite(PWM, poti_Value / 4); }






Zitieren

Lesezeichen