Scarab
Tags: robots, hm11, microbot, loadsharing
Published: 2014-02-22 10:00:00

---
title: Scarab
tags: robots, hm11, microbot, loadsharing
published_at: 20140222T10:00Z
canonical_url: https://ladvien.com/scarab
main_image: https://ladvien.com/images/IMG_0874.JPG
series: Custom PCBs
published: true
---



UPDATE: August 10th, 2014

I printed a body and added BLE.  I'll explain tomorrow after I get some rest, but the BLE was to allow me to test directed locomotion.  I've also done some feature testing (load-sharing, charging circuit, "hunger" ADC), the board is actually a good design.  Works well.  

The BLE is the HM-11, itty-bitty BLE.

My goal is to test the physical and feature designs with the ATtiny84, and when Mr. Bdk6 releases his toolchain for the LPC1114, switch it as the controlling chip.

This is my version of Yahmez' [Baby Bot](http://letsmakerobots.com/node/39306), the ATtiny84 Y-Baby (YB84).  There are few differences from Yahmez' version.

1. This version uses an ATtiny84.
2. It uses a LIR2032.
3. It has a charge circuit built in, using the MCP73831. This circuit has load-sharing capability so the baby can "feed" without sleeping.
4. The YB84 has two LED indicators.
5. One pin on the YB84 monitors the battery voltage, so it can tell how "hungry" it is.

This version came about because Yahmez' Baby Bots were so damn cool I had to copy them.  Here's the [node](http://letsmakerobots.com/node/39650) where I asked permission and added design notes.  Also, I've wanted to make a small, cheap, small robot to couple with my [Overlord](http://letsmakerobots.com/node/38883) projects in hope to develop an electronic lab-rat.

Here is the BOM:

1. 1 x [LIR2032](http://www.ebay.com/itm/10-pcs-lot-rechargeable-LIR2032-3-6V-Li-ion-coin-battery-button-battery-/331062082577?pt=US_Rechargeable_Batteries&hash=item4d14d67c11) -- $.44
2. 1 x 1uF 0402 -- $.08
3. 1 x 4.7uF 0805 -- $.10
4. 1 x [B130LAW](http://www.mouser.com/ProductDetail/Diodes-Incorporated/B130LAW-7-F/?qs=%2fha2pyFadujUWfJaost%2fO%2fm5EB%2flfSlr7qduYb4tkr4%3d) -- $.41
5. 1 x [DMP1045U](http://www.mouser.com/ProductDetail/Diodes-Incorporated/DMP1045U-7/?qs=sGAEpiMZZMshyDBzk1%2fWi1RgPhdS2EhaLQWFAsmm01A%3d) -- $..51
6. 2 x 3mm IR LED -- ?
7. 1 x IR RX
8. 3 x colorful LED 0603 -- $.33
9. 2 x [MBT2222A](http://www.ebay.com/itm/100pcs-MMBT2222A-MMBT2222-Sot-23-2N2222-SMD-NPN-Transistor-SSY-2310-KDQ6-/360798731492?pt=LH_DefaultDomain_2&hash=item540147bce4) (SOT-23) -- $.24
10. 1 x 60k Resistor 0402 -- $.10
11. 1 x 100k Resistor 0402 -- $.10
12. 5 x 330 Resistor 0402 $.50
13. 1 x [MCP73831](http://www.mouser.com/ProductDetail/Microchip-Technology/MCP73831T-2DCI-OT/?qs=sGAEpiMZZMtLck3p7ZBovbAQ8wdoIcbK) -- $.61
14. 1 x [ATtiny84](http://www.mouser.com/ProductDetail/Atmel/ATTINY84A-SSU/?qs=sGAEpiMZZMvqv2n3s2xjsUVXpvE2IBMzcgbJdwhGYzI%3d) -- $.1.30
15. 1 x [YB84 PCB](http://www.oshpark.com/shared_projectss/DCG21mrl) --  $1.76
16. 2 x [virbation motor](http://www.ebay.com/itm/181121246372?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649) -- $1.95

Note, I've not included the IR receiver or IR transmitters in the BOM.  I've not tested the circuit yet, or sourced cheap parts.  But I'm shooting to keep them under $10.

YB84 BOM Total: $7.70

**YB84 v_05**

![](https://ladvien.com/images/IMG_0404_0.jpg)

Really, there wasn't much to developing this little guy, Yahmez had done all the work.  I simply selected an Atmel uC that I felt was cheap enough and provided enough pins to accomplish what I wanted to do with the little guy.  The one problem I had was with the [load-sharing circuit](http://blog.zakkemble.co.uk/a-lithium-battery-charger-with-load-sharing/#comment-54494) I tried to copy from Zak Kemble.

When I went to layout the load-circuit my mind got locked on the old thought, "MOSFET diodes go against the current."  This caused me to lay the DMP1045U down backwards, which essentially shorts the battery.

![](https://ladvien.com/images/Drop_Charger_Notes_1.png)

[Zak's Load Sharing Circuit](http://blog.zakkemble.co.uk/wp-content/uploads/2013/05/MCP73831_loadshare.png)

This took me a bit to figure out.  I apparently wasn't the only one that made the mistake, as a comment on Zak's blog had a fellow asking my questions for me.  In the end, I got the circuit sorted out and now the little guy works as intended.

That's about it for now.  I still have lots of testing to do on the little guy.  

1. Motor placement for correct movements.
2. Leg angling for correct gait.
3. IR-RX circuit.
4. IR-TX circuit.

Currently, I have a pogo-pin programming header.  But it is _imperative_ to accomplish my goals for this little guy to make him programmable via IR.  This should allow me to program a swarm of these little guys without manual interaction.  I know the Kilotbot projects modified the Arduino code to do this very thing.  My ideal setup is to add a mobile hanging over a swarm of these guys.  On this mobile would be: IR-TX, IR-RX, and a camera.   The camera would be using [Overlord](http://letsmakerobots.com/node/38883) to track these guys and the IR to communicate with them in mass.

As always, thoughts, opinions, and critiques I welcome :)

{% embed https://www.youtube.com/embed/etl3zJbOEW0 %}

{% embed https://www.youtube.com/embed/9svlosASuNk %}