Arduino Uno R3 or ESP32 dev board

I am quite new to building my own circuit with Arduino but I want to get into it so I have a small project now. The project involves three TB6600 motor drivers and three on-off-on switches that can be controlled by a microcontroller so need a total 12 GPIO pins. At the moment I am thinking of either using Arduino Uno R3 with ESP-01 or using a ESP32 development board as I also need it to communicate with PC wirelessly. I wonder if there is any advice on the setup.

I would use an ESP32 which is not only far more powerful (memory, IO facilities, etc) than the R3 but has onboard WiFi, Bluetooth Classic and BLE - cost about £7 on Ebay in UK

The ESP has 3.3V I/O signals. Make sure the TB6600 you buy will work with the 3.3V ouput levels and within the current limitations of the ESP

Only the original chip supports Bluetooth classic. The other are ver 5.0 which is BLE only.

Welcome!
Actually I recommend either the UNO or Nano, they are much less money and the interface is a lot simpler especially when first starting out. Later when you get comfortable then switch to a 32 bit processor.

The side benefit of the UNO/Nano is they have been around for many years. This also correctly indicates there is a lot more information, examples, etc for these parts.

Here is something important:
Gil's Crispy Critter Rules for Processor Hardware:

  1. Rule #1: An Arduino is NOT a Power Supply!
  2. Rule #2: Never connect anything inductive (motors, speakers) directly to an Arduino!
  3. Rule #3: Avoid connecting or disconnecting wires while the power is on.
  4. Rule #4: Do not apply power to any pin unless you are certain of what you're doing.
  5. Rule #5: Do not exceed the maximum voltage ratings.
  6. Rule #6: Many Arduinos cannot power transmitters directly.
  7. Rule #7: Before powering your project, take a break and double-check the wiring.

LaryD’s Corollaries:

  1. Coro #1: When starting out, add a 220Ω resistor in series with both input and output pins to protect against shorts.
  2. Coro #2: Invest in a Digital Multi-Meter (DMM) to measure voltages, currents, and resistance.

Note: Violating these rules can turn your Arduinos into crispy critters. For optimal performance, keep your wires under 25 cm (10 inches).

If you can afford it get a small lab power supply, it will pay for itself in a relative short time by keeping you from frying your experiments. Picture shown below:

Additional Tips:

  • The L293 motor driver, though common, is inefficient as it can lose around 3V as heat when driving both legs of a motor. Consider using a motor driver with MOSFET outputs to reduce heat loss and conserve battery power.
  • For more on powering Arduino boards, explore this guide: Powering Alternatives for Arduino Boards.

This link will take you to what appears to be a nice unit (I have never tried it): https://www.aliexpress.us/item/3256801612054652.html

Or add hardware to make sure that it will (a TTL 7400 buffer for instance, or not gates or open-collectors for the output, possible voltage dividers or level shifters for the inputs if any)

Why 12?
As far as I can see, each TB6600 requires two GPIO pins, total is 6. If you have three on-off-on switches, you can connect them to three analog pins!
Just use this diagram for each switch, adding just a couple of 10-15k resistors:


Then the code to read the switch state (in this example I have the pin numbers in the "S3Pin[]" array) is:

...
#define S3_UP 2
#define S3_CENTER 1
#define S3_DOWN 0
...
  int cur = Analog2OnOffOn(S3Pin[i]);
  if (cur == S3_CENTER) {
    // do what you need to do...
...
// ------------------------------------------------------
int Analog2OnOffOn(byte pin) {
  int cur = analogRead(pin);
  if (cur < 300)  // Switch up = ON1
    return S3_UP;
  else if (cur < 800) // Switch center = OFF
    return S3_CENTER;
  else  // Switch down = ON2
    return S3_DOWN;    
}
...

This way the total required GPIO pins can be reduced to just 9, and you can use any Arduino/ESP you want/need...:wink: