Arduino pinMode on Analog Inputs
All Arduino boards contain analog and digital pins. The Arduino functions have different calls depending on the pin type. For example, when analogWrite() is called, an analog input pin is automatically changed from a digital input (or output) into an analog input. For this reason, it isn’t actually necessary to call pinMode() on the pin. However, when I write Arduino Sketches, I still put a pinMode(INPUT, A0) in setup anyway.
Keep reading to see why I use pinMode on Analog Inputs. (more…)
Clean Ground Planes on DIY Boards
If you’re making your own PCB with the toner transfer method, you might find that getting nice clean ground planes is difficult. John on twitter (@johngineer) realized a simple, but effective method.
Use a hatch pattern for your planes and then fill in the squares with a Sharpie. Simple, but effective. The paper detaches easier and the etch comes out cleaner.
For help on creating ground planes in EAGLE, check out this video tutorial I put together.
[TIP] Fixing Garbage Serial / UART Communication
If you’re using serial (or UART) communication between two devices and seeing data corruption, there could be a simple fix. For example you might be trying to communicate between two Arduino boards, using one Arduino Uno as a Serial-to-USB adapter for another board, or have an Arduino connected to a Raspberry PI.
If you’re getting corrupted transmissions that get worse at lower speeds, double-check you have common grounds between the boards. Inductive coupling is probably letting the communication work. Without the common ground though, your transmission is going to be susceptible to all kinds of noise.
Remember. Ground is a reference. It needs to be common to everything in the circuit.
Brass Sponge over Wet Sponge
Keep your soldering iron tip from oxidizing.
As it gets dull and gray, it’ll be harder to make good solder joints. My favorite tool to clean a tip is a Brass Sponge. The other option is a damp cellulose sponge, but I’m not a fan of those.
I have just never found a sponge gets the tip as clean as a light dabbing from the brass sponge.
Just be careful not to “scrub” too hard, you don’t want to scratch the tip. When you done soldering, make sure you clean it with the sponge then coat the tip with fresh solder. Leave that solder on the tip until the next time you use it. The layer of solder will prevent oxidation from building up while the iron sits unused.