Search found 12 matches

by Gitprodenv
Tue May 30, 2023 12:24 pm
Forum: Hardware
Topic: DS5160 SSG Servo Motor (MCPWM)
Replies: 13
Views: 3717

Re: DS5160 SSG Servo Motor (MCPWM)

This was the issue. Haha finally I made it.
I almost declared this project a failure :lol:

Thx a lot @MicroController
by Gitprodenv
Tue May 30, 2023 7:55 am
Forum: Hardware
Topic: DS5160 SSG Servo Motor (MCPWM)
Replies: 13
Views: 3717

Re: DS5160 SSG Servo Motor (MCPWM)

MicroController wrote:
Mon May 29, 2023 6:57 pm
That reminds me: Are the servo's and the ESP's GND connected together?

No. I have a separate power supply for each:
An external power supply connecting the ESP32 with 5V + GND.
And another power adapter with 7.4V connected with VCC and GND to the servo.
by Gitprodenv
Mon May 29, 2023 6:16 pm
Forum: Hardware
Topic: DS5160 SSG Servo Motor (MCPWM)
Replies: 13
Views: 3717

Re: DS5160 SSG Servo Motor (MCPWM)

I'm using the ESP IDF version 5.0.1. I have also used another gpio pin (GPIO_NUM_23), but it doesn't make any difference. I also tried to power the ESP32 with an external 5V power supply instead of the USB port. Furthermore in this process I also switched back to the ESP Idf demo code version. You w...
by Gitprodenv
Mon May 29, 2023 8:07 am
Forum: Hardware
Topic: DS5160 SSG Servo Motor (MCPWM)
Replies: 13
Views: 3717

Re: DS5160 SSG Servo Motor (MCPWM)

@MicroController Thanks, this makes sense I have this function: #define SERVO_TIMEBASE_RESOLUTION_HZ 1000000 // 1MHz, 1us per tick mcpwm_timer_config_t timer_config = { .group_id = 0, .clk_src = MCPWM_TIMER_CLK_SRC_DEFAULT, .resolution_hz = SERVO_TIMEBASE_RESOLUTION_HZ, .period_ticks = SERVO_TIMEBAS...
by Gitprodenv
Sun May 28, 2023 7:54 am
Forum: Hardware
Topic: DS5160 SSG Servo Motor (MCPWM)
Replies: 13
Views: 3717

Re: DS5160 SSG Servo Motor (MCPWM)

Looking at the waveform https://ibb.co/wBHhgh1 Does it mean that up to 0.5ms the signal is low, for 0.5ms high and for 19ms low (pwm cycle of 20ms), for a 0 degree? Does the code for the SG90 (code below) not state, sinal high for 0.5ms and 19.5ms low (pwm cycle of 20ms), for a 0 degree? I think the...
by Gitprodenv
Sun May 28, 2023 7:00 am
Forum: Hardware
Topic: DS5160 SSG Servo Motor (MCPWM)
Replies: 13
Views: 3717

Re: DS5160 SSG Servo Motor (MCPWM)

@MicroController Yes, I'm using a power adapter (with the servo motor's recommended voltage of 7.4V). Though, this power adapter supports just an amperage up to 3000mA. Could this be an issue, since according to the datasheet at 6V the servo motor requires: - Idle current(at stopped) 4mA - Stall cur...
by Gitprodenv
Sat May 27, 2023 2:07 pm
Forum: Hardware
Topic: DS5160 SSG Servo Motor (MCPWM)
Replies: 13
Views: 3717

DS5160 SSG Servo Motor (MCPWM)

Hello, I want to use the DS5160 Servo Motor to control its angle such as in the esp idf mcpwm servo example: https://github.com/espressif/esp-idf/tree/master/examples/peripherals/mcpwm/mcpwm_servo_control: I use the identical code from above, where I have only changed some parameters (SERVO_MIN_DEGR...
by Gitprodenv
Sat Sep 03, 2022 2:52 pm
Forum: ESP-IDF
Topic: Http server track client connections
Replies: 0
Views: 727

Http server track client connections

I want to run a HTTP Webserver. Is there any way to track the current active client connections on the server, and if there are no active sockets found, I want to shut down the server and wifi. I know that WiFi in AP mode has WIFI_EVENT_AP_STACONNECTED and WIFI_EVENT_AP_STADISCONNECTED event, but is...
by Gitprodenv
Fri Aug 05, 2022 12:42 pm
Forum: ESP-IDF
Topic: BLE Gatts Write Event
Replies: 0
Views: 936

BLE Gatts Write Event

Hi guys, I just went through the "Gatt_Server_Example_Walkthrough.md file" provided in the ESP IDF's example folder. My question is based around this code snippet: case ESP_GATTS_WRITE_EVT: { ESP_LOGI(GATTS_TAG, "GATT_WRITE_EVT, conn_id %d, trans_id %d, handle %d\n", param->write.conn_id, param->wri...
by Gitprodenv
Mon Jul 25, 2022 4:13 pm
Forum: ESP-IDF
Topic: Get header value in c++ - Smart pointer (http)
Replies: 2
Views: 1288

Re: Get header value in c++ - Smart pointer (http)

Thank you @ESP_jakob, you gave me valuable hints. A big thank you. Memory leaks :twisted: :twisted: I now implemented two different versions. One with a raw pointer (which you have delete manually) and the other with a std::string. Based on my C++ knowledge I'm not quite sure if I can implement your...