Articles

This is a collection of articles concerning various things I may wish to discuss. Be it personal, scientific, political, et cetera, nothing is off limits. These are generally just insights into my thoughts/views/life.

Custom Open Source Phone: Parts are in!

Ever disappointed that your phone is missing a certain feature? Wish you knew exactly what your phone was doing ("WHY ARE YOU SO SLOW RIGHT NOW?"). I've felt those feelings, and that's why I've decided to try my hand at putting a phone together on my own. Since this can be a pretty big project, I'm going to start as simple as I can, and start expanding from an established base line. I found a really good place to start is at Adafruit Industries, where they have a 3G GSM modem on a development board with a few on board peripherals (battery charging circuits, voltage level shifting, etc.). Here are the parts I've ordered so far:

Phone Parts List
Description Purchased From Link Cost
Adafruit FONA 3G Cellular Breakout Adafruit Industries https://www.adafruit.com/products/3147 $79.95
Slim Sticker-type GSM/Cellular Quad-Band Antenna Adafruit Industries https://www.adafruit.com/products/1991 $2.95
Lithium Ion Battery - 3.7v 2000mAh Adafruit Industries https://www.adafruit.com/products/2011 $12.50
Adafruit 1.44" Color TFT LCD Display with MicroSD Card breakout Adafruit Industries https://www.adafruit.com/products/2088 $14.59
20x Aluminum Housing Stereo 46dB Full-Directional Electret Microphone Amazon https://www.amazon.com/Aluminum-Housing-Full-Directional-Electret... $6.70
4Pcs 0.5W 8 Ohm 28mm Dia Mini Metal Inside Magnet Music Player Speaker Amazon https://www.amazon.com/Metal-Inside-Magnet-Player-Speaker... $9.67

 

Luckily, I had a few of these parts sitting around. I have not chosen how to handle the inputs yet (Buttons? Voice? Potentiometers? IR distance sensors?), but it's really exciting to think about all of the possibilities! I did not go with a touch screen, because I really don't want to take that step yet. Granted, it will be just as easy to interface with a bigger screen as it would to interface with this tiny 128x128 screen. But I like the cute little thing, so I went with it!

All of the parts accumulated so far
All of the parts accumulated so far

I've managed to do a hardware test of the module connected directly to a computer (via USB) and send and receive phone calls, as well as send out texts all via a terminal interface (PuTTY). The next step is for me to choose a microcontroller for this project. Should I go as simple as possible? Microchip, Atmel, TI, or something else? It's very tempting to go with an Arduino compatible controller just because of all of the similar projects out there to draw inspiration (and code) from.

Here are some features I think would be really cool to implement or are already inherent in the system:

  • Disconnectable antenna: When all else fails, strap on a large active antenna! I think it will be a lot of fun to experiment with different types of home made antennas, and to see how they turn out (imagine trying to hook a clothes hanger to your cell phone when you're in dire need of service in the middle of the Upper Peninsula of Michigan)
  • (Almost) Fully Modular: Broke your screen? No problem, just crack open the case, and put a new screen on; plug and play! Same with batteries, speakers, anything!
  • 3D printed case: Of course this phone is going to be packaged ina 3D printable case, and it's going to be awesome!
  • Code-to-ring: If you're like me, your phone is always on silent. This poses a problem when someone trys to get ahold of you for something important. Now they just have to text a secret code that only they know, and your phone silence is bypassed. (My parents are going to love that feature)
  • Fully open source: All of the code, CAD files, and board designs will be hosted on Voltfolio, so anyone can follow along with my progress, and potentially help contribute!

Learning VLSI: First Steps

For my senior project, Programmable Artificial Neural Chip Acquires Knowledge by Experience (PANCAKE), I need to learn VLSI. There are no classes at SVSU that teach VLSI, so it's up to me to learn how to do it. You may be asking, why did I choose a project that I do not know how to do? Well... I am in school, and believe in learning as many new things in school as possible, even if it means teaching yourself these things. Some of the most valuable lessons you can learn are things you teach yourself.

I am a huge supporter of freeware software, and am very pleased to have found Electric VLSI. Electric VLSI is an open source CAD system for schematic layout, hardware layout (in VLSI) and simulation. Holy cow can Electric VLSI do everything! There are so many bells and whistles in the software, so many adjustments and modes to do so many different things. If you are interested in VLSI, I highly recommend downloading Electric VLSI and trying it out.

One things for sure though: There is a definite learning curve just for learning the software functions, let alone VLSI and CMOS design logic. And so after a minimal amount of Google searching, I've come upon R. Jacob Baker and his site www.CMOSedu.com. Baker covers the basics of Electric VLSI installation and configuration, and also provides 6 well thought out tutorials. I've only finished 2 of the tutorials but am already feeling a boost in confidence working with the software. In his first tutorial, he covers making a basic voltage divider and how to simulate it. The second tutorial details building MOS transistors, and simulating them as well. In doing so, Baker exposed me to many of the essential commands, of which I now keep a list on a note card: (Note some of the commands were user defined)

  • W: Well check
  • L: NCC Check (Consistancy)
  • CTRL: Toggle Selection
  • F5: DRC
  • CTRL+I: Properties
  • Left-Click, Right-Click: Create Arcs
  • CTRL+N: New Cell
  • F: Fill Window
  • CTRL+E: Create Export
  • Tools>Simulation>Set Spice Model
A 3D View of an NMOS Transistor in Electric VLSI

 

I also have a fairly comprehensive book to reference, "Principles of CMOS VLSI Design" by Neil Weste. You can buy it on Amazon for 1 cent. Despite the price, the quality of the book is exceptional. From the first few glances, it is very comprehensive and goes into detail on a lot of design theories I'd expect to see. The goal is to become proficient enough with Electric VLSI by going through CMOSedu tutorials, and then using the software to build and simulate some of my circuits from the artificial neuron design.

 

My NEW Morning Routine

My typical morning routine was to roll out of bed and immediately check emails, social media, and some of my favorite sites. I suspect that this is not the best way to start out a work day, so here is the routine that I am going to try out for the next 7 days. (Starting 27JUL2017).

  1. Wake Up at 7:00AM
    I feel that it is important to get up at a consistent time to develop a baseline routine.
  2. Freeform stretching for 5 minutes
    Get the blood flowing right after waking up.
  3. Meditate for 30 minutes
    Organize your thoughts, clear your mind, reset for the day.
  4. ​Shower / Brush Teeth
    Stay clean and such
  5. 25 Push Ups, 25 Crunches, 25 Squats
    Stay in marginally decent shape.
  6. Get Dressed
    Put your mind in a mode for work and productivity
  7. Eat Breakfast
    Something to set your hunger aside for a good long while
  8. Wash Dishes
    Having dirty dishes around bugs me. It's also an easy thing to complete and puts you in the mind set that you can accomplish things.
  9. Read / Reply / Manage Emails
    Read, and take care of these, and don't come back to them till the routine is finished
  10. 2 Hours of Focus work - Listening to classical music
    Work on personal projects. Otherwise these are going to sit in your head and bug you at work, because you'd rather be working on them.
  11. Create a to do list for the remainder of the day
    Set reasonable goals for the day. Recognize failed goals from the previous days, and revise them to be more acheivable.
  12. Read for 30 minutes
    This is for fun relaxation, to give your mind a bit of a break.

Review: My Printrbot Simple 3D Printer

Owning a 3D Printer is great. It is hands down the best tool I own (right next to my handy dandy Dremel). I purchased the Printrbot Simple back in December of 2013, it was a Christmas gift to myself. They no longer sell the exact model that I bought, so don't go looking for it, but I highly recommend getting a PrintrBot printer brand printer. I bought the "Assemble-it-yourself" kit, because it was 100 bucks cheaper. I also recommend doing that, regardless of your experience level (I'll touch more on that later). I put it together over the course of 2 days, and it printed well right off the bat. The one issue with it is its print volume is 4x4x4, so I am sort of limited with what I can do with it. But with a little bit of design work and thinking, you can make parts interlockable and forgo the limited volume issue (For example in my Custom Linear Actuator Project). All things considered I'd say the printer is a 9 out of 10.

An image of the PrintrBot Simple after my very first print.
An image of the PrintrBot Simple after my very first print.

Construction

Putting the Printrbot Simple (PB Simple) together was an awesome experience, especially for a young and enthusiastic electrical engineering student. The instructions on Printrbot's website were done very thoroughly in my opinion, with pictures detailing every single step. The laser-cut wood pieces came in sheets and I had to punch them out myself (sometimes with some coaxing from a razer blade). There was a bit of gluing, a lot of screwing, and a little bit of redoing (disclaimer: this rhyme was unintentional). Not only was the experience fun, but it was educational in 2 ways. One thing I got out of the experience was how basic CNC robotics should work in terms of bearings, actuation, and packaging. It taught me some principles that I've already applied to some other projects. The second thing I learned was how the machine worked, and how I'll be able to fix it. Putting it together gave me a good sense of where things were, and what could go wrong.

Operating the Printrbot Simple

At the time of writing, I have no issues operating the PB Simple. I have it set up (per PB's instruction) to work with Repetier Host  and I also find the software to be very simple. However, I have had some issues that I mostly attribute to user error and ignorance. These are some of the issues I ran/run into:

  • Royally screwing up the firmware: So when I first started out, I had accidently set up the end-stop values incorrectly, and the printer started to over-extend its X-axis. I panicked and hit the E-Stop button on the software and it didn't stop it, and then I unplugged communication to the control board (Yes I know I am dumb.) After getting things set up right, my printer did not work correctly by any means. I eventually found that the firmware somehow got messed up in that stint, and I needed to re-flash it. So; more learning experiences. After some digging and researching in Printrbot's website, I figured out how to flash the board, and within a few hours, fixed this issue.
  • Leveling the Bed: Once everything settled, I found that to keep my print bed level, I have to have the rear end of the bed as high as it will go, and my front as low as it will go. So not much room for adjustments. I attribute this to the fact that the printer arm sags the further it extends.
  • Tensioner too loose: This has bit me a couple times. When I first started out I most definitely did not have the tensioner tight enough. The issue was fine for awhile but eventually I started to notice splotchy-ness in my parts. The plastic bead the printer extruded would very in thickness in a very jittery fashion. Eventually, while troubleshooting this issue, I noticed that the extruder stopped extruding plastic entirely. I could see that the gear was turning, but it wasn't gripping the plastic. After some disassembling (minor) I found that my extruder gear had completely ate up some plastic and nearly clogged all of the teeth with plastic dust. So I cleaned the extruder gear with a needle, and retensioned it. I have to keep an eye on the tensioning screw, as it seems to wiggle its way a little loose from time to time.
  • Hot end clogged: I had similar conditions to when the tensioner was loose, but determined that it was not the problem. So I took the hot end apart, and took a look at the extruder tip. It had a lot of gunk in it on both sides. So I scraped off what I could, but that wasn't enough. Next, I stole some nail polish remover (acetone) from my girlfriend, and soaked the brass piece. I let it set in a closed container for a good 2 days, and then cleaned it with a toothpick and some cotton swabs. There was a bit that I couldn't get, so I bought one of those needle threader things and cut it in half. I used the stiff but thin metal wire to scrape the inside of the hot end hole completely clean. Things worked well after that.
  • I needed something to spool out the plastic: If I didn't have anything for the plastic spool to rotate on, it definitely would get tangled or cause to much tension and mess up the response of the extruder. This problem was quickly remedied by buying one of those cardboard book boxes, cutting slots in it, and placing a PVC pipe through it. This solution has worked for 3 years now.
The Printrbot printing a semi-solid gear (note the really loose tensioner screw. Oops)
The Printrbot printing a semi-solid gear (note the really loose tensioner screw. Oops)

As I said, most of these issues are completely due to me being inexperienced. Now I can run for very long stretches of time with no errors what so ever. I have also done some experimentation with temperatures and other print settings to completely optimize my prints. I highly recommend going through this process with a standard calibration piece to compare results from slightly changed settings. That brings me to my next thought; calibration. I have only calibrated this guy one time. I carried out a procedure similar to this one, except I used a dial indicator to make very precise measurements in axial movement. The process was very simple, and has been very effective. I had assumed that the machine would very in performance due to wood constantly warping due to atmospheric conditions. But it appears this is never really an issue.

Quality of Prints

The print quality is often very good. I typically will print at a resolution of 0.4mm I can do some things at smaller resolution (Like Dungeons and Dragons Mini-figures) but Z-axis movement errors start to compound, and the extruder will smear through the plastic. But when ever I print with my "Standard Settings" The quality is just as good as any other printer. One thing I found is that printing a skirt loop is absolutely necessary. When I first start my print, the heater will take about 3 to 4 minutes to heat up to 210º. During that time the extruder will "dribble" and two things will happen. One, it will smear plastic all over the place. Two, it will leave the extruder empty for awhile, and so the first layer won't have material to print with. So this is solved with a skirt ring around the model. It get's the extruder flowing well before starting on the actual model. By doing this, and making sure my bed is always level, my prints always come out just fine!

A 3D Printed pieces for the board game "Settlers of Catan"
A 3D Printed pieces for the board game "Settlers of Catan"

 

Everything Else

This wooden printer looks great sitting on my wooden desk. It certainly has a "raw" character that the engineer and tinkerer in me loves. It's footprint is small. It's very easy to use, and not really loud. I like printing in PLA because it smells good too. In general, owning a 3D printer is great, and allows me to bring some of my ideas to reality in a very quick fashion. Plastic is cheap and easy to work with. Get a 3D printer, make new things, and be awesome. I definitely recommend Printrbot brand printers.

A custom designed peice for my ACAPP Project.
A custom designed peice for my ACAPP Project.
A 3D Printed clip used to hold 2 peices of chemistry glassware
A 3D Printed clip used to hold 2 peices of chemistry glassware
 

The Importance of Properly Tightened Anti-Backlash Nuts

If your CNC device is is experiencing "wiggling" on a diagonal line, you may want to consider adjusting the anti-backlash nuts on your machine. If they are too loose, they can oscillate in tension while the lead screw pulls in a given direction. This translates to an unsteady motion and will become immediately apparent when two motors are moving in unison.

I first noticed this issue while debugging other issues with my PCB router. My first thought was that it may be feed rate related, so I did a small sweep of different feed rates, and found that it was mostly speed independent.

PCB isolation cuts with varying feed rates pre-tightening of the anti-backlash nuts
PCB isolation cuts with varying feed rates pre-tightening of the anti-backlash nuts

I've recently seen this issue come up in a few research projects being carried out by fellow group members. This issue had been attributed to poor firmware design, however I had my doubts that the consumer product I bought would have such issues. So my second hunch was that the anti-backlash nuts may be some how causing the issue. As I watched the mill move diagonally, I could noticeably see the nut deflecting a bit in different directions.

Let's take a step back for a second and ask, what are anti-backlash nuts good for? Why not just remove them and solve the problem? Well, it might solve the problem at hand, but would in turn cause a much greater problem. Backlash is caused by the small space in between the threads of the lead screw and the nut. When the lead screw changes directions, there is a small amount of space where the screw begins to rotate, and it is not pressing against the threads of the nut, which translates to a failure to move for a few split seconds. Anti-backlash nuts consists of two nuts separated by a spring. This means that at any given moment the set screw is pushing against the top and bottom of the anti-backlash nut, and mitigates the issue.

The anti-backlash nut used on on my router
The anti-backlash nut used on on my router

After a bit of dismantling and tightening, I was able to do a feed-rate sweep again. Thankfully I found the "wander" issue to be defeated, and nice clean cuts regardless of feed rate. If you are having this issue, I recommend iteratively tightening your anti-backlash nuts and running diagonal cuts (or extrusions) and examine the results

Isolation cuts with varying feed rates and properly tightened anti-backlash nuts.
Isolation cuts with varying feed rates and properly tightened anti-backlash nuts.

 

Three Point Bend Test of Various 3D Printed Samples

Every time I print something off on my Printrbot, I ask myself, "Do I really need to use this infill and wall thickness?" And then I decide to just go with my standard settings (40% Rectilinear fill with 3 layer wall thickness) and don't give it anymore thought. But all of that has changed. 

I recently asked Bruce Hart, director of the Independent Testing Lab at SVSU, if he would allow me to use the lab's Instron tensile testing machine to test out some parts from my printer. Being the great guy that he is, Bruce agreed. What follows is a description of what the test entailed, and some of the conclusions I drew from it. If you don't want read through everything and just want an answer, the inevitable truth is that a solid part has (by far) the best strength to weight ratio.

I designed a simple sample piece that is a basic rectangular solid (20mmx40mmx7mm). There are 2 variables that are easily alterable, namely the wall thickness, and the in-fill density (respectively A and B in the figure below). Note that as in-fill density increases, the "B" dimension in the below figure decreases (inverse relationship). I try each combination of wall thickness of 1, 3 and 5 layers, mixed with infill densities of 0%, 10%, 20%, 40%, 60%, and 100%.


A cross section view of the test sample where A depicts the infill spacing and B depicts the wall thickness.

 All of the pieces were 3D printed under the same conditions (minus the intentionally changed variables). I only test one sample per configuration, because this is my experiment, and I'm on a budget.

One of the samples being printed
One of the samples being printed

The samples were tested in the three-point bend test configuration, where the two outside corners are held static, and a load is applied to the center. The bolt in the figure below was used to concentrate the force on the middle. It should be noted that the results yielded from this test are only going to signify strengths in a three-point bend-like situation, and they might not hold true for something like a crush test.

The test setup
The test setup

The output of the test rig compares how much load is being applied vs how much the part is deflecting. The curve will go up until it hit's its yield force, or in simpler terms; begins to break. The piece can no longer sustain as much weight, and will continue to deflect.

The stress-strain curve of a 40% Infill 3 layer walled sample
The stress-strain curve of a 40% Infill 3 layer walled sample

 All of the samples were tested and one of the first interesting results I found were that for almost all pieces, if the in-fill was less than 50%, the sample would plastically deform, however if it was more than 50% the part would break down the middle.

Piece plastically deformed after test
Piece plastically deformed after test (in-fill < 50%)

Piece with significant fracture after testing
Piece with significant fracture after testing (in-fill > 50%)

Below is all of the weight to strength ratios compared. As expected the best weight-to-strength ratio are the 100% infill variations, because the plastic was allowed to bond in all directions. I found that my standard print setting (40% in-fill, 3 layer walls) was pretty acceptable, and based off the data, increasing the in-fill won't gain me any strength, so I am keeping my general settings the same. However, perhaps this data will be useful for other models with particular needs, and I hope this data below may help other makers as well.

Compiled results compairing the strength to weight ratio of all tested samples
Compiled results comparing the strength to weight ratio of all tested samples

ID Number Infill % Edge Thickness Infill Pattern Mass (g) Yield Force (lb) Force/Mass
0 0 1 layers Rectilinear 1.21 14 11.58
1 10 1 layers Rectilinear 1.93 79 41
2 20 1 layers Rectilinear 2.55 103 40.34
3 40 1 layers Rectilinear 3.67 221 60.17
4 60 1 layers Rectilinear 4.96 335 67.5
5 100 1 layers Rectilinear 6.89 738 107.11
6 0 3 layers Rectilinear 3.19 156 48.84
7 10 3 layers Rectilinear 3.55 188 52.9
8 20 3 layers Rectilinear 4.04 239 59.13
9 40 3 layers Rectilinear 4.76 325 68.32
10 60 3 layers Rectilinear 4.98 313 62.88
11 100 3 layers Rectilinear 4.69 228 48.63
12 0 5 layers Rectilinear 3.84 206 53.59
13 10 5 layers Rectilinear 4.6 320 69.5
14 20 5 layers Rectilinear 5.23 380 72.71
15 40 5 layers Rectilinear 5.82 513 88.1
16 60 5 layers Rectilinear 5.54 429 77.42

Test Video:

Video: Do you Have a Healthy Entertainment Diet?

Think about how you're spending your free time. Do you feel fulfilled after words? Try and increase the amount of these 4 activities in your down time.

Video: What's the Deal with Open Source?