Multiple tasks with bare chips for small space

Hey all,

I Want to build a system that can

  1. Run motor
  2. Play music
  3. Take commands over wifi

This is kind of musical mill which rotates (with forward, backward, speed change capability) and play different music tracks based on the commands received from wifi interface.

The challenge is the whole system needs to be Tiny (To give an idea it will be N scale).

By my research, I found the following are the smallest which I can work with..

  1. AtMega328P chip
  2. L293D chip for running motor
  3. ESP 01 module Wifi for communication
  4. MicroSD card interface for storing music files
  5. I will get a PCB that connects all these together.

My question is what is the most possible way of reducing the size further and get perfectly working setup?

Also anyone thinks the above idea will not workout because the 328P is not capable of doing all these tasks simultaneously.

Any working prototype will be appreciated..

Thanks in advance.

The choice of chip will depend on the features that you need. Assuming you want to use regular DIP style chips (rather than the smaller SOIC style) then you might consider, for example, the Attiny84 - and there are many other Attiny variants with different features. If you are happy to work with an SOIC sized chip the Attiiny 1634 has a lot of the capability of an Atmega 328.

The L298N is a very large and very old-fashioned motor driver chip. There are many much smaller and more efficient alternatives. For low voltage applications, for example, have a look at the Pololu DRV8833.

If you don't need a lot of I/O pins you might consider using one the EP8266 (or ESP32) modules without any Atmega chip.


Thankyou very much for reply. I am good with ESP 01 considering that is cheaper and smaller board available in my country. But do not have much knowledge on whether it can be used to play (loop) music with it.
Any pointers?

IIRC the ESP 01 has very few I/O pins. The ESP-12 would probably be a better choice.

I presume it can play music at least as well as the much slower Arduino Uno or Mega. If you want good quality music it would probably be worth getting an MP3 player module.


Thanks. My first focus is on getting the motor running. Is there any simple alternative to L393D chip with micro form factor.
Like TB6612FNG but with less pins?

I forgot say thanks about suggesting soic chips. Only problem is I am a beginner still learning..
What could be the AtTiny chip that can handle running motor along with playing mp3?

What could be the AtTiny chip that can handle running motor along with playing mp3?

I simply don't know.

At this stage of your knowledge the best thing might be to try all of the different activities on an Uno so you can learn what each of them requires. When you know that you will know the features that are essential for your bare chip.

When you go to select a chip I think it would be best to decide first what physical types of chip you are capable of working with. Then in your searches you can ignore all the chips that are not available in your preferred style.

The big component suppliers such as RS Components and DigiKey have websites where you can select products according to their characteristics


There is no microprocessor available to do any of the things you list without other components. Is that your question?

There is a fundamental law that the smaller you shrink a product, the more costly it becomes. Perhaps in the beginning it is 4-10 times more expensive. Goes up from there.


You’ll definitely need a MOSFET motor driver if you want a small one, heat generation needs to be minimized
and an ancient darlington-based motor driver is about the worst choice possible.
What motor are we talking about?

If you search parametrically at the website of an electronics supplier you can find lots of useful devices, for instance: might be handy if the current is appropriate.

Thanks Robin, Paul & Mark for your suggestions.

I am thinking about ESP-01 (smallest available in my country) to run my DC motor along and receiving commends over wifi.

I am not sure whether it can play music (I think SD card is needed too store MP3 files).

As Robin said my first step is run DC Motor over wifi and gradually reduce the size of the whole setup.

My ultimate goal is to have tinyest possible custom board that can do the tasks

  1. Receive signals over wifi
  2. Run DC motor (direction, speed, break)
  3. Play music

I have some plug & play knowledge with Arduino UNO. Now trying expand knowledge beyond that…

I am currently looking at AtTiny SOICs and DRV8838 chips for the basic circuit…

For mp3 files you'll need an mp3 decoder chip as well. Plain wav files would circumvent this.

That’s thing I do not know. Thanks for letting me know Mark.