Designing a MicroMouse: Is my circuit reasonable?

Hi all. Relatively new to mechatronics and especially circuit design so I was hoping someone could point out to me whether or not I am being a fool before I spend ~120$ on components.

For those not familiar, MicroMice are robots intended to navigate within a maze composed of 18cm x 18cm cells. The walls are 12mm thick, and painted white to promote good light reflection.

I am not overly concerned about speed, but rather proof of concept and ease of control. The reason for this is because I want to use several of these robots to support some work into cooperative and competitive AI systems and the MicroMouse platform is relatively discretized making it simpler (I hope) to work with.

The first thing I considered were the sensors; Ultrasonic, Sharp IR, LIDAR, and ToF were some options I considered. LIDAR seemed too expensive for my application. ToF sensors seem appealing but I worry about the resolution and sampling time limiting the forward speed of the robot. Preferably I would like information reported at a resolution of 1mm or better, which Sharp IR and Ultrasonic seem capable of providing. The diagram I drew assumes Sharp IR is being used.

The sharp IR sensor I picked out. And its data sheet.

I elected to use a differential drive to move the robot because I want the robot to be able to spin in place within a cell of the maze. Two NEMA8 motors seem small enough to do the job without increasing the size of the robot too much, and as I am already familiar with stepper motor control I would prefer to use stepper motors over brushless DC.

The bipolar stepper motor I picked out.

The stepper driver I picked out. And its data sheet.

My microcontroller should be an Arduino Micro, so I will have enough analog pins to read in data should I choose to add more IR receivers later (such as at an angle to do some sampling before the robot reaches a position), and so that the footprint of the robot remains small.

Lastly, I want to be able to coordinate several of these robots and having wires running from them to the central controller to pass instructions will not work, so I want to implement the ESP8266 WiFi module. I would prefer to use only the standalone module rather than a devkit for size purposes.

For power, and this is where I am most uncomfortable, I think I need a 9v battery to power the Arduino for logic, as well as 4.5v (6x AA... or a voltage divider from the 9v battery?) to power my motors through the VMOT pins on the drivers.

This is my circuit sketch. Upon uploading I see just how messy it is; let me know if I should redraw it.

The actual chassis is something I intend to 3d print.

Major questions I have;

I read that the ESP8266 can use up to 200mA of current, which to my knowledge far exceeds what the 3.3v pin can output. Despite this in tutorials I see people directly connecting the VCC pin on the ESP to the 3.3v pin on an Arduino. Under what conditions should I expect this to cause me problems, and, should I find myself exceeding that limit what is the best solution?

Is there another (cheaper) solution to the sensor problem? I considered using emitter and receiver diodes but I wonder how I would fixture them so that the distance between them is known. Ultrasonic sensors are also cheaper, but I have had poor experiences with their accuracy in the past.

One thing I wondered about was whether the sensors should be using the 5v pin of the Micro rather than drawing from the battery intended to supply the motors. The current draw for the logic side of the stepper drivers seems low enough to accommodate this, but the current draw of the sensors themselves adds up quickly (3x 12-22mA, with future intentions to move to 5x...). Is that load worth dividing to extend the life of the motor battery, or should I leave it as is?

Is there anything I've totally missed that will cause something to explode?

I look forward to benefitting from your collective experience.

I bumped your Karma for NOT inflicting a Fritzing drawing upon us. Your drawing is fine, but small. I would have liked to have a link as well so that I can zoom in on it.

What's the ESP8266 for?

Adding an ESP8266 to an Arduino to get WiFi is at best a kludge, and at worst doesn't work. If you need WiFi, why not just use a board that already has WiFi (and lots of support here) like the Wemos D1 Mini, NodeMCU or ESP12.

"I read that the ESP8266 can use up to 200mA of current, " - this is wrong. It depends on the board, but 80 mA is more typical. But, again, why not just start with a board that already has WiFi?

I bumped your Karma for NOT inflicting a Fritzing drawing upon us. Your drawing is fine, but small. I would have liked to have a link as well so that I can zoom in on it.

Thanks, I did read that you guys don't like that. You should be able to right click on the image and click "view image" or "copy image location" and open it in its own tab. Here is the link regardless.

What's the ESP8266 for?

Eventually I want to connect two of these robots via an inflexible rod and find a solution for positioning the rod in a specific way above the maze walls. I will use a central control system which instructs the robots to move in such a way that this can be done while also avoiding the maze walls. The idea is to simulate the transportation of very long objects like lumber or tubing through a workspace in a more discrete manner, if that makes sense.

If you need WiFi, why not just use a board that already has WiFi (and lots of support here) like the Wemos D1 Mini, NodeMCU or ESP12.

I considered the NodeMCU briefly but felt that having only one analog pin would force me to multiplex my data which is something I am inexperienced with... which may be fine. Just another thing to learn to do. Do you think that would significantly impact the speed at which I will be able to take measurements and adjust my control system? I will look into the Wemos and the ESP12.

"I read that the ESP8266 can use up to 200mA of current, " - this is wrong. It depends on the board, but 80 mA is more typical.

Great, thank you. Still, this exceeds the 3.3v DC current of 50mA on the micro... but I imagine this doesn't matter if I take your suggestion and use a board with integrated WiFi?

The Huzzah feather is an 8266 board with a connector for a lipo battery. But only 1 ADC; however the ESP32 DEVKIT C has wifi (and lots more) and MANY ADC's (well ok 2 but multiplexed)

Both are 3.3V but the driver "Can interface directly with 3.3 V and 5 V systems"

as regards your sensors, it depends on the nature of the maze walls whether acoustic or optical sensors will be suitable. Perhaps you could consider whiskers? seriously, maybe short fibres - maybe nylon - attached to microphones?

…however the ESP32 DEVKIT C has wifi (and lots more) and MANY ADC’s (well ok 2 but multiplexed)

Could do. It seems like multiplexing saves on complexity and adds stability in the setup overall so I’ll have to read up on it.

Perhaps you could consider whiskers? seriously, maybe short fibres - maybe nylon - attached to microphones?

Thinking about that leaves me concerned that whiskers would get bent out of shape and have difficulty springing back to a neutral state after only a brief period of use. I’m not sure that’s an easy implementation. The walls are MDF and going to be painted over in the usual fashion. I bought the materials today and will have to do some testing to determine with any certainty I’m sure.

Update: I've decided to go with the suggestion of the ESP32 Feather board from Adafruit. I did not realize that an ADC meant a register and not a pin. The Feather, according to this documentation, has 8 channels for ADC1, which can be used alongside WiFi. When WiFi is enabled however, the ADC2 register is used for WiFi function, removing the other 10 GPIO pins.

8 GPIO pins is more than enough for my sensors, so this seems like a good decision which actually saves me money over buying an Arduino Micro and an ESP8266. Thanks guys.

With that, here is my updated circuit drawing:

This seems fairly straightforward so I think I'll be purchasing components this weekend. If there's anything I've missed I would love to hear about it.

Also, and this is a long shot, does anyone know where I could purchase 1/2" x 2" x L (12mm x 50mm x L) strips of wood? It's not a common size here in the states.