Project: bug-bot

Recently my daughter brought a journal from the local library. There was a bug bot my daughter said she wanted to make and it was dead simple. There was just one problem with that – I did not get how it could work at all – there was just a solar cell and the vibration motor just connected directly. The motor needs like constant 60mA of current, how is that possible that a tiny solar cell can provide that?

So I ordered cheap motors and cheap solar cells from a you-know-the-name website and guess what, it did not work.

two bots

Then, I started to think about how to make it work and somehow it consumed me for quite a while, but the result of my struggle is here below:


R7 here is a motor basically. BC547 is a driver for it.

Initially, I used MOS transistors everywhere, but it looks like IC design spoiled me too much and I forgot that the threshold of the discrete MOS transistor is much higher than the one in the silicon chip. Typically it is around 2+V for the discrete one, it is too much for the system which gives 3V max. Plus, the transconductance of the MOS is much worse than the one for bipolar.

For D1 I actually used a Schottky diode, since it has a smaller forward voltage and each 100mV is asking to be spared.

Now, as I said, the motor needs like 60mA, to provide that current for 1 second we would need:

60mA*1s = C * 3V, or C = 20mF

I managed to live with 10mF, but again how the hell do they think in this journal that it will work? I assume the madness which going on in IEEE is everywhere now, people just publish unchecked stuff to put another rank in their achievements…

Anyway, so D1 is preventing the cap from being discharged when there is no light source. Then, the voltage at v_npn_trig follows the supply voltage with some drop and delay. After it reaches the trigger value it will “overturn” the latch structure Q1/Q2 (typically that structure is the enemy in the IC design, but here it is a handy helper). It looks like that on the scope (with a much smaller C1 value):

v_supply – yellow, v_npn_trig – pink

After a certain time, the pink waveform just went all the way up to v_supply level, which indicates that the latch is overturned to the other stable point (conducting current).

When the latch is enabled it will form a high pulse at v_npn_trig and Q3 will open a path for the current in C1 to be discharged. As a result of that burst, the motor will produce a vibration for some time:

KiCAD simulation results

The prototype on which I debugged the circuit looked like that:

bug bot first prototype

On the second time, we worked together with my daughter and it came out in more sophisticated way 🙂

There is an issue though which I have not resolved fully yet. The first burst is fine, but to get a second/third one you need to overturn the latch back, to reset it.

I did not find a better way than putting a resistor between vdd/gnd. Tried to add reset structures to the bases of bipolar but did not manage to make it work in a reliable way. Pretty sure though that would be able to do that much easier in MOS-based structures…

And the last one with extra bits and pieces from the original project pitcher:

Leave a Reply

Your email address will not be published.