Sunday, June 28, 2020

Lessons learned from the last few projects

It is said that a picture is worth a 1000 words. This post condenses two years of learning into some instagram posts. 

Quoting another maker: "Just look, maintaining internal silence, until the meaning of my work becomes clear".

Here is a sample of my abilities before embarking on the projects on this page. This board was autorouted by Fritzing.

Enigma Uno

Keep part count low. Every added part adds complexity to a kit.

How to design laser cut enclosure with finger joints using Sketchup and Inkscape

Pay attention to how the grain runs on the wood. In Ponoko, it runs from left to right. All the vertical pieces tend to crack when a nail is driven into them.

External Lamp Field

How to use charlieplexing to illuminate a large number of LED <n> output lines control n*(n-1) LED

Route PCB using horizontal lines in the front and vertical lines in the back

Do not solder/work when tired:

Sinclair Scientific Calculator:

Pins A6 and A7 in the Arduino Nano are analog input only. They can be used to read buttons provided a pull-up or pull-down resistor is used.

Route tracks on seven segment display modules by laying down horizontal tracks under the displays and vertical lines in the back to connect the same pins on each LED module together.

Sometimes it is necessary to eliminate the current limiting resistor in order to obtain decent brightness out of LED modules (older style bubble LED displays).

When unsure how something will fit, order a small board and try different spacings. You do not need to provide holes for all the pins. Be considerate of Oshpark and size your board so they don't lose money on shipping:

How to design LED and Keyboard multiplexing circuits in order to drive and read the largest possible number of displays and buttons. What happens when multiple keys are pushed at the same time.

If this is the first time you are doing something, breadboard it

Don't forget the mounting holes, make sure the PCB has four holes in the corners. Holes are free.

Don't forget any extra holes for things like lid hinges. Again, holes are free.

A PCB does not have to be square. It can have gently rounded corners or other shapes. The inner sharp corners shown here are impossible as the board fab house will cut the outline of the board with a rotating bit, they will come out webbed. 

Tent those vias

The Arduino VIN pin takes anywhere from 3.9V to 12V. Operation from 4 AAA to a 9V battery is possible. A power switch can be used to select between two power sources. They do not need to be the same voltage, as long as only one is connected at a time.

Measure battery endurance to find out how long will a device run on batteries., either use a light sensitive CdS cell and an external arduino to record changes in resistance or save a value evey minute to EEPROM

Test displays before soldering. Assemble one device and keep the displays unsoldered or make a dedicated device with a Zero Insertion Force (ZIF) socket.

Put years / version numbers on the PCB. Text is free.

LED Dimming using PWM

Use solder with water soluble flux, makes cleaning things easier

7 Segment Digits can be vertically scrolled. The bit representation of the digits can be rearranged so a shift left or shift right will move the bits from the previous to the new segment.


14 Segment Displays can be vertically scrolled:

Use the F("") statement to store data tables in program ROM.

Pin D13 is connected to an external LED that can bias the pin. Avoid connecting this pin as an input. Either remove the LED or always set the pin as output and write high or low to force it to a known value.

Print a PCB design to paper and make sure components fit:

Don't trust Fritzing

Do not AliExpress when tired, you may buy a bag of unneeded components 

Sometimes soldering is the right solution, sometimes gluing is the right solution

Use the internal pull up resistor in order to connect the end of one or more push buttons to a pin, the other end to ground. Set the pin as input and write high to it. Reads 1 if nothing is pushed, 0 if pushed.

Use a fast pin library to read I/O. May need to write a wrapper function with a select statement to translate the pin number to the named variable used to access the pin.

Twist ties can be used to keep a top hinged lid in place, just make sure the PCB has a hole to secure it. Holes are free.
If your project has only LEDs and push buttons, there is no need for any extra external components. With careful coding they can be connected directly to an Arduino.

Use state machines as much as possible. Need to read many keys, that's one state machine. Need to drive many leds, that's another state machine. Need to do some time consuming processing and want to keep the keyboard and leds refreshed, split the time consuming task into simpler tasks using a state machine.

Route a PCB using the horizontal in front/vertical in back rule, then use vias placed under the components to minimize the amount of copper in the front layer.  

A daughter board can be used to hide the Arduino and the power connections on your project. It is cheaper to have 2 boards smaller than 100x100mm than one large board.

The new oshpark afterdark service can be used to embed some color on your boards. Try adding some logos or text to the copper layer.

Double check everything, why do we have a small logo on a side panel. Where are the hinge pockets

Double check your connections:

Try to put a standard Arduino power jack on your pcb

Try to put a battery compartment on your enclosures:

A 2 way switch can be used to select between an internal battery compartment and the power jack

No comments:

Post a Comment