If you need links to any of my sources please feel free to ask and I should be able to track them down. I’m looking to make my own Arduboy with nearly everything. My main concerns is the TP4056 that I want to implement to charge a small 3.7V (Or slightly less or more) battery (I hope to find a fairly low profile one too). Though I trust I read through the schematic fairly well and have done it right, but I’m the guy who ordered PCBs with backwards pin headers so I want to double check :P.
I took a quick look and there are no major problems I can see. My first suggestion though is to configure and run drc and erc in your pcb editor to do automated checks. Fix anything that comes up. My second suggestion is to accept that no matter how careful you are the first revision of any board is likely to have at least minor errors. So design the board in such a way as to allow bodges to be done after you receive your first boards (this means adding silkscreened labels, test points and trying not to have many traces hidden under parts, etc). Then you can fix the issues you find for a second revision if you want. I do embedded electronics R&D as a day job and despite years of experience I still make many mistakes lol.
Other than being charged by the TP4056, I don’t see the battery output BAT+ powering anything. You’ll probably want a switch for the battery, as well.
I think pins 4 and 2 of X1 (the crystal oscillator) should go directly to GND. C4 should go to pin 3 and C5 should go to pin 1 (and the other sides to GND, as you have it).
I think the RX LED should be on PB0 not PB3
If you want the piezo speaker to be fully Arduboy compatible, it should go to pins D5 and D13, not D5 and GND.
For full Arduboy compatibility, you may wish to add an RGB LED and resistors for it.
I assume the battery you plan to use has built in protection. Otherwise, you should add a protection circuit (E.g. a DW01-P IC and dual MOSFET).
What is the purpose of the MIC5219 regulator? What is its output voltage? What provides the RAW input voltage? If the regulator is meant to provide 5V output, then you might damage the display, since the display is meant to run at 3.3V.
Yes it has protection, it’s a 3.7v 150mAh battery for now, but I’m planning on buying a bigger but flatter one.
It’s used to regulate the voltage to either 5v or 3.3v (If the circuit is closed or open).
The regulator (I think) supplies 5v out, but the display still operates at 3.3v (I think that might be from the resistor on the display).
Here’s a repository I made to list all the parts I’m using (I still have to add more):
I’ve noticed that the LEDs are powered by VCC and then go to the resistors, and then to their pins. I don’t know if this is an error on Bateske’s design or is actually intended. Though it’s also done on an official SparkFun Pro Micro schematic at PD5 and PB3.
There’s a lot I have to debug, but I should be able to work it all out over a few days
Also would you recommend a GND copper pour on both layers? I was curious if that might have any issues.
No. If the regulator has a 5V output then it will feed 5V to the display. There is no resistor in the circuit to drop the voltage to 3.3V and a resistor wouldn’t work anyway.
The real Arduboy doesn’t regulate the voltage to the ATmega32U4 or the display. Raw battery voltage is used for VCC to both of them. This means VCC will vary between about 4.2V and 3.0V depending on the charge level of the battery. The issues with doing this are:
The ATmega32U4 datasheet specifies that a minimum of 4.5V is required to run at 16MHz. However, the chip seems to be quite tolerant of running at 16MHz at lower voltages. Doing so hasn’t appeared to be a problem so far.
The display specifies an absolute maximum voltage of 4.0V. The fully charged battery voltage of 4.2V is above this. However, there haven’t been any reported display failures so far. Whether running at above what’s recommended will shorten the life of the display is anyone’s guess.
The brightness of the TX, RX and RGB LEDs will vary depending on the battery’s charge level. However, no one has complained about (or maybe even noticed) this.
Anyway, if you want to duplicate the circuitry of the real Arduboy, eliminate the entire MIC5219 regulator circuitry.
It is intended, not an error. You pull the pins low to turn on the LEDs.
As I mentioned in my previous reply, the Arduboy (and SparkFun Pro Micro) use PB0, not PB3.
Because it’s not doing anything for you. If you run from USB, it will provide regulated 5V (which isn’t safe for the display), so there’s no need for a 5V regulator. If you run from the battery, you’ll get 3.0V to 4.2V and a 5V MIC5219 buck regulator can’t produce 5V from a lower voltage.
If you want to be able to charge the battery, you do.
Can I ask why you don’t just duplicate the actual Arduboy schematic? If you want, you can substitute the Arduboy’s MCP73831 battery charge controller with the TP4056. If your battery has built in protection, you can eliminate the Arduboy’s R5402N battery protection circuitry.
I assume this is on the schematic from Bateske, so I’ll have a look through for what you mean. The TP4056 I found on my older arduboys for charging batteries. I guess I only looked for the parts I wanted in the schematic.
@MLXXXp Would you know if the 4 pointed star symbols are test points for a multimeter or probe?
I’d assume they are, or they’re connection points.
So far I’ve completely remade the footprint and symbol for the ATMega32U4 to match the one in Bateske’s schematic. I’ve started adding all the connections and leaving some for now. I also remade the footprint and symbol for the 16MHz crystal, and added the capacitors before it.
I’ve got everything down so far, majority of the components I’ll have to order but I included:
6 Push Buttons
1 Reset Button
(I didn’t include the battery protector because I assume that’s what you meant to not include)
I still have a bit more to add but I have this weekend to do it all. I’ll have to find some RGB leds somewhere. Once I’ve got this to a working state I’ll order them and hope it works. But I’ll give myself a bit more time to finalise where I want parts to go.
(If you notice any similarities to Bateske’s, it’s a “coincidence” I swear :P)
I had a look at some battery options (Ones without battery protection implemented), I’m tempted to try a non protected battery (I am aware though of what can happen if it’s shorted). They have ultra thin options with fairly high milliamp hours. so adding the protection circuit might be an option.
The ones labelled TP obviously are. The others, I’m not sure. You can include pads for test points on any signals you see fit, or none at all. It depends on what equipment you plan to use for testing.
The capacitors on the crystal are still wired wrong. One side of each capacitor should go to GND. The other side should go to one of the crystal pins 1 or 3.
If you use a 4 pin RGB LED make sure it’s a common anode type.
You haven’t connected the battery + (VBAT) to the MCP73831 VBAT pin 3.
The production Arduboy uses a special 3 pin dual disc piezo speaker. This is probably hard to obtain and not really necessary. For a standard 2 pin piezo speaker you can eliminate the SJ1 “make loud” traces.
On the production Arduboy the capacitor going to one side of the speaker (C5 on you schematic) has been replaced with a 220 ohm resistor.
Do you mean 4 pins in total, or 4 pins on 2 sides? I’d assume 4 pins total.
I’ll have to check through for some of those symbols, they’re a bit hard to know that you need to connect them (Compared to a netPort in EasyEDA). Would you know of any other free PCB design software that you’d recommend, I’ve seen Altium Designer but you have to buy it.
As long as it’s easy to get to the pins or contacts of the devices themselves, with whatever you’re using to probe them, then separate test pads aren’t necessary. Test pads or test connectors are usually used to make it easier for automated test equipment.
Yes, that now looks correct for the crystal capacitors.
Four pins total. One pin is common to one side of all 3 LEDs and the other pins are connected to the other side of each LED. You want to make sure the common pin is connected to the LED anodes, not the cathodes.
There are also 6 pin RGB LEDs, where each of the 3 LEDs has separate pins for both sides. With these, you can use them as either common anode or common cathode, or even just totally separate LEDs in the same package.
KiCad is one of the most popular open source schematic capture and PCB design packages.
The idea behind an RGB LED is that you have a single point of light that can be any colour. Using individual LEDs won’t provide the same effect, unless you add a diffuser or something to combine the separate colours.
Different colour and part number LEDs have different forward voltages and efficiencies. You should choose a (likely different) resistor value for each LED so that they all appear to have the desired brightness range. The Arduboy’s use of the same value for all LEDs isn’t ideal in this respect. It’s best to experiment to find acceptable resistor values for the LEDs you choose to use.
You might also have to play with R12 to get the desired volume and sound from the piezo speaker you choose (maybe even 0 ohms).
And again, I’ll remind you that R7 should be chosen to provide the proper charge current for the mAh capacity of the battery you use.
Current designs tend to use 0603 components where available (as the Arduboy does). They are usually easier to source and less expensive. If your excuse is that 0603 parts are hard to solder, remember that you have to be able to solder the small pins of the ATmega32U4 and display.
Would you be able to help me in how I’d go about choosing the right resistance value? I’ll most likely be using a high capacity battery at around 1000 mAh.
I’ll be getting some SMD Solder Paste (Lead based so it’s got a lower melting point and I don’t risk damaging components, I have a fan to extract the nasty air).
I’ll see if the website has some 0603 components. Are Tantalum capacitors required? (I’d assume yes so I’ll look for them still)
I’ll be buying a lot more tools for my soldering station, such as; Magnifier and third hand; goot brass tip cleaner (My tip keeps oxidising but I have tip tinner); and a few other helpful things for holding components or dealing with heat.
Edit: I just noticed that EasyEDA already has it set as 0603 components
Yes, that RGB LED will work. (The one the Arduboy uses is in a smaller package.)
It’s best to charge typical LiPo batteries at between 0.5C and 1C. 1C means 1mA charge current per mAh of battery capacity, so for a 1000mAh battery that would be 1000mA (or 1A). A lower charge current may increase the overall life of the battery but will increase charging time.
I would suggest somewhere around 0.8C, which for a 1000mAh battery would be 800mA. For the MCP73831 the formula for the programming resistor (Rprog) is
Rprog in Kohm = 1000 / current in mA
For a 800mA charge current it would be 1000 / 800 = 1.25K. You could use a 1.2K resistor to get 833mA or 1.3K to get 770mA.
Note, though, that some USB ports may be rated to provide only 500mA. For 500mA current you would use a 2K resistor.
It’s best to use MultiLayer Ceramic (MLC) capacitors. For larger, higher voltage capacitors you might have to use tantalum capacitors due to size or cost constraints. You may have to use a package larger than 0603 for some of the larger capacitors, as well.