Firmware Support for L298H Bridge Boards?

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: Firmware Support for L298H Bridge Boards?

#51 Post by Wookbert » 15 Nov 2021, 15:21

If we figure out that Hall Sensors can’t be handled reliably enough, then we’ll probably will look into an optoelectronical solution (as you already had mentioned before), such as a piece of reflective tin foil and e.g. the Vishay CNY70.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Firmware Support for L298H Bridge Boards?

#52 Post by TD-er » 15 Nov 2021, 16:03

Hall effect sensors are very reliable, but do require some knowledge of how to use them.

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: Firmware Support for L298H Bridge Boards?

#53 Post by Wookbert » 04 Dec 2021, 03:34

Quick peek. Making good progress. We noticed some major crosstalk with the buttons being attached to GPIO 36 & 39 (SensVP & SensVN) and the 10K resistors to 3V3 made those GPIO constantly fire. We kept the third (not pictured button) on GPIO D34, but moved the buttons from D36 & D39 to D13 & D14. If I understood my partner in crime correctly, we furthermore had to implement timer interrupts to reliably recognize button activation (simple debounce didn't do the job well enough).

Motors, buttons, button LEDs, buzzer, relay for UV LEDs ... everything’s under control so far. Basic websocket based UI works well. Hall sensor testing next.

If everything works fine, I'd like to layout a custom PCB with a socket for the ESP32 board but the H-bridges, ULN2003, Relay, Voltage regulator and all terminal blocks for attaching the peripherals directly on the board.

C9CFDD7F-8EC9-45A9-A1FE-9868B2F2845F_1_201_a.jpeg
C9CFDD7F-8EC9-45A9-A1FE-9868B2F2845F_1_201_a.jpeg (2.04 MiB) Viewed 1244 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Firmware Support for L298H Bridge Boards?

#54 Post by TD-er » 04 Dec 2021, 21:17

The higher GPIO numbers on ESP32 as a bit tricky.
I don't think they support pull-up or pull-down resistors.
Also for pulse-counting inputs or other inputs controlled with a switch, you may need to take precautions to prevent the cables to pick up noise.

The best way is to always let some current flow through the wires to make it harder for noise signals to flip the logic state.
This can be done by having some resistor parallel to the switch and close to it as well. (the pull-up resistor close to the ESP)
This resistor has typically a value which is 10x .. 100x the resistance of the pull-up resistor.
And of course twist the cables to a switch.
If it isn't a pulse counter signal, but more like a limit switch, you may also want to add a capacitor close to the ESP between the GPIO and GND.
N.B. such a capacitor does introduce a delay in the response, so the value may depend on the used pull-up resistor and the allowed max delay.
A good initial value is 100 nF.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 26 guests