Known Issues

From Sketching with Hardware at LMU Wiki
Revision as of 17:34, 25 August 2020 by Skwhadmin (talk | contribs) (Created page with "In our work and during the course a number of issues have come up ... and for some of them, there are also solutions. = PWM Output (for Servos) = Re-execution (basically exe...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In our work and during the course a number of issues have come up ... and for some of them, there are also solutions.

PWM Output (for Servos)

Re-execution (basically executing a script more than once, without rebooting in between) may not work. PWM output will not switch off.

the workaround is to always deinit the PWM before using it, e.g.

1 servoPin = Pin(27, Pin.OUT)
2 pwm = PWM(servoPin, freq=50)
3 pwm.deinit()
4 pwm = PWM(servoPin, freq=50)

Servos

Servos and Power

Servos and motors are power-hungry and many of them will also require a higher voltage. A sign of the servo not having enough power is, that it does not move smoothly or that it only jitters.

Servos have in general 3 connections: GND, VCC/+, and PWM (the control pin).

A typical way to connect it is to connect PWM to the ESP32/ESP8266 (and to a PWM output pin). The GND is also connected to the ESP. VCC/+ is connected to the power supply, in the most simple case the 5V Pin of the ESP32/ESP3266 - this is connected to the 5V of the USB Port (and limited to 500mA with a fuse).

If you need more power you can use an external power supply, here it is important to connect 0V/-/GND to GND of the ESP and the VCC/+ of the supply to the VCC/+ of the servo.


Black Servo ES08MA II

The power (current and voltage) of many USB Ports connected to the ESP32/ESP8266 is not enough for the Servo ES08MA. It many cases it will not work.

Workaround: use the servo SG90.