Arduino Installation IDE on Ubuntu 16.04

What a day installing and removing and installing the Arduino IDE on the new Z170/i5 computer that was built over the last three days.  I learned quite a bit on the journey and the purpose of this blog is to briefly highlight the steps and pitfalls.

  1. Downloaded Arduino IDE 1.7.10 for Linux64 (this was a mistake, because the Teensyduino application, which interfaces the IDE to Teensy 3.2 Arduinos is not compatible with 1.7, so I had to download 1.6.8).  READ ERROR MESSAGES from Teensyduino!
  2. Java was missing so I needed to install this – jre default
  3. Modified permissions of ‘dial out’ and ‘TTYACMO’ (note this varies from install to install) READ ERROR MESSAGES!
  4. Got AVRDude error messages because I did not select the right processor (selected Pro Mini 168 and should have been 368)  READ ERROR MESSAGES!
  5. Installed 1.6.8, installed Teensyduino 1.28, and then 49 rules – I put the Arduino app in the Home folder to prevent R/W error messages when they were in usr/local (though I now discovered the issue was probably not protection, but that I did not have 1.6.8 downloaded)

Thanks to Sliverhoof on Reddit & Snackeye’s blog post on installing Arduino and Teensyduino.

Posted in Arduino, Commonplace, Hobbies, How To, Problem Solving, Projects | Tagged , , | Comments Off

Mid Range Linux Box – Intel Skylake & Z170 Mobo

Background:  I have lived with the Ubuntu 14.04 system that I had installed on the Gigabyte GA990F – and lived to really enjoy programming the Arduino on that system more than working with a Mac or Windows machine.  While I have not tuned up the IDE toolchain like I have with a Mac system, using Textmate, I have gotten pretty proficient at using Linux.  However, I noticed that the way the SSDs were partitioned over time, that the Ubuntu partition only has 3 GB left, and that is too close for comfort… so in the spirit of learning and continuous improvement, I built a new system.  Also, adding fuel to the fire was that the Gigabyte Mobo was over 4 years old.

Components:  This is a mid range to mid range plus system (not quite gaming, but fairly fast) that relies on new components and CPU.  Here are the components (and cost, circa May 15, 2016):

  • Intel Core i5-6500 3.2 GHZ H4 LGA-1151, 6 MB Cache ($200)
  • Asus Z170 A, Using intel Z170 Controller, onboard HDMI, DDR4 ($160)
  • Samsung 850 EVO 250 GB SSD ($90)
  • Corsair DDR4 3000 MHz 2×8 GB Memory sticks ($80)

The total cost was $530 since I already had a power supply and built the system on a thin piece of wood.  Below is a snapshot of the component cables:

Asus Motherboard
Asus Z170 Intel Motherboard w/HDMI

Results:  After installing Ubuntu 16.06 LTS (I evaluated Ubuntu Mate, but did not really like the UI) I’m exceedingly happy with the performance.  I plan to do some benchmarks versus the GA990F system running Ubuntu 14.04.

Posted in Arduino, Commonplace, Hobbies, How To, Projects | Tagged , , , | Comments Off

Arduino Feather – Capacitance Project (Ver. 2)

April 02, 2016, cap_feather_apr02; modified for 12 Bit ADC, including threshold increasing
Zero Voltage threshold to prevent hanging waiting for full discharge.
Adafruit Feather M0 Basic Arduino Board
Uses MICROSecond timer, not MILLISecond timer for greater precision and to measure caps below
1 nF in value.
1) There is a noticable error (DC offset from ADC of around 14 of 4096 full scale
2) Settling to full discharge so a non-zero threshold is set, ~50 count
3) ADC conversion time is about .5 milliseconds, so this is subtracted from measurement
4) Added loop counter Mar 27, so see if ADC compensation is correct
5) Added input selection via digital inputs
Derived from program from Arduino site, from Paul Badger 2008 Uses of RC time constants to
measure the value of a capacitor.
TC = R * C – The capacitor’s voltage at one time constant is defined as 63.2% of the charging voltage.
6)  Changed to nF printout, and also added A9 as input for 10M Charging R

Hardware setup (verbal schematic):
Test Capacitor between common point and ground
Test Resistor between chargePin and common point
220 ohm resistor between dischargePin and common point
Wire between common point and analogPin (A/D input)

Software:  Cap_feather_apr02, Win 10 GA9 machine, in Arduino folder and in DB>project folder

Platform: Feather M0 Core from Adafruit.

Components:  Resistors

Schematic: See above

Layout: See photo


MetaData: In lab notebook (3/15-4/02) and in DB>Projects, and in Project 3 Ring Binder.

Posted in How To | Comments Off

Computer Overhaul

My GA99F system was getting krufty and was freezing frequently, so I decided that after 2 years to give it a brain transplant.  What really happened was a body & brain transplant.

What I learned in the process of going from the Win 7 (GA99F->Ubuntu 14.04, and then replacing Ubuntu Machine with GA990 Motherboard ->Win 10) to Win 10.

1.  To halt a Linux system, there are keys that can easily get its attention:  PrtScn (SysReq), Alt, and then a variety of letter keys, but shutdown is ‘o’.  VERY USEFUL.

2.  To stop the boot process on a GigaByte motherboard, and maybe others, there are two important secrets:  1.  connect keyboard DIRECTLY to the MB.  2.  press DEL key MULTIPLE times!

I realized that I really like this – playing under the hood.  However, it requires patience and joy in learning.  If you need a computer in a hurry, or at low cost, this is not the way to go.


Posted in How To, How To Process, Problem Solving | Comments Off

Arduino Feather – Capacitance and Seven Segment Project (Ver. 1)

The Feather is a relatively new Arduino variant from Adafruit which has a 48Mhz clock, a real DAC and improved ADC (12 bits) and more features than the Uno.  Below is a testbed that demonstrates some various hardware combinations:

Software:  There are two source files:

SSeg_feather_Mar15a for the Seven Segment demonstration with input on A1, and the SS display with a I2C serial interface.

Cap_feather_Mar15 – TBD.

Both on MacBook Air, in Arduino folders.

Platform: Feather M0 Core from Adafruit.

Components:  Sparkfun 4 digit seven segment display, 10K pot between 0-3.3v, connected to A1.

Schematic: Simple – SSeg to +3.3, ground; I2C via SDL, SCA, and 10K pot with variable wiper going to A1, 10uF bypass on supply.

Layout: See photo

Notes: Added averaging (10 samples) and 500ms delay so readout is legible.

MetaData: In lab notebook (3/15) and in GoogleDrive>Projects.

Posted in Arduino, Commonplace, Hobbies, How To | Comments Off

Documenting Software and Electronics Projects II

In the post before last, the documentation of project was defined (see the list below).  What was not defined is where this should be stored, nor how.  Dropbox seems like the ubiquitous platform for doing all this, as it can easily capture and distribute the various files to different platforms.  Some additional thoughts about documentation:

Take a picture:  Cell phone cameras are ever available.  Take a picture of the project and upload it into the project folder.

Record where physically documented:   Describe the date and location of any project notes that are not captured in the digital documentation.

Create a consistent file naming convention:  For the project names and the source code at a minimum.  For example file name – Platform_Date; for a source file – Purpose_Platform_Date.  Keep all files in a folder “Projects” in Dropbox.

Document What Needs to be Done Next:  Yes, what improvements would you make going forwarded, what is undone?

Documentation List

Software:  Current source file, with name and date.  Have this displayed during wakeup of embedded device.  Location and computer should be listed.  The source code should be printed out.

Platform: The HW platform should be noted, including revision number, and special characteristics (like Arduino UNO SMD, Rev 3).  Where possible an image of the platform should be captured as a photograph.

Components:  Document a bill of components, noting source and version number or distinguishing type (often very important).  Include pinouts of components, and any important parameters.

Schematic: Draw the schematic in any form.  Acorn for the Mac works well and is cost effective, or capture freehand sketch and convert to PDF via CS Scanner.

Layout: Capture the physical design and arrangement of the components.

Notes: Describe any additional documentation that might be helpful including reference web sites, notes about operation, changes required/warnings/guidelines.

MetaData: Finally, this file should be easy to find.  It should be printed out, indexed/filed in a convenient place, and put away.  There should be a pointer from the physical device to the documentation.

Posted in How To | Comments Off

Wine Cellar Temp Monitor

Project Documentation

Description:  Based on Arduino UNO (SMD) this circuit prevents a wine cooler from going over temperature and cooking the wine – an unfortunately common experience.

System Design: Old Arduino UNO SMD platform with Sparkfun digital Seven Segment Temperature display and DS one wine temperature sensor.

Software: Arduino looping function that captures temperature and then compares to limit points to make a decision to turn off power to wine cooler and stop an overheating situation. The file name is S7_1Wire_Oct11 – using onewire and softwareserial libraries.  It is in the Arduino directory in the GA99F computer, running on Win 7 Home Premium.

Hardware: Uno SMD platform, with Sparkfun Seven Segment Serial 4 digit display and DS1820 one wire temperature sensor.  This is interfaced to the Powerswitch Tail II, 110 Volt switching module.



Posted in Arduino, Hobbies, How To | Comments Off

Documenting Electronics & Software Designs

Documenting a project is the goal of design, not an artifact… not a struggle to complete during the project and regretfully past the last design review and after it is shipping.  Documentation is the design.  It is the result.  It is the artifact.

Although many fret with this activity and postpone it to the end, or denigrate it to the last priority it should be the first.  This is where knowledge and advancement is embodied – NOT in the minds of the creator.  Let me be very clear on this point.  The documentation is the goal.

Now when we consider a hobby project, or a project of an individual researcher or inventor, what is sufficiency as there are different standards depending on the type of company and the scale of deployment.

There are classifications of the components of a design that can be helpful in this discussion.  For example, how can we decompose a design?  Over functions? Over Times? Over Stages? Over levels of complexity/systems? Separate HW from HW.

This can only be answered by the answer to this deeper question.  What is the lasting benefit of documentation?  For individual experimentialist projects, which is the category I inhabit, this is very useful – skillful even.

For us, at this point in time (salaried man, with 4 hours a week of time available to experimentation) the primary benefit of documentation is the ability to immediately pick up what I was dong last, and resume from exactly the same place, but this time rested and armed with a set of ideas on how to confront the challenge ahead.

This kind of documentation is SO much more useful because you only document what you will find immediate utility as opposed to patents, where your goal is to map out an entire universe where this new idea si not only prohibited,but morally bad for you.

Immediate Utility:

1.  Can I resume where I left off when I shut off the power yesterday (or when I was experimenting last)?

2.  Will the system behaved the same way as it did when I last encountered it?  This is VERY important.  We should be able to document a system so that when we return or repeat the initial conditions, we get exactly the same output!

Software:  Current source file, with name and date.  Have this displayed during wakeup of embedded device.  Location and computer should be listed.  The source code should be printed out.

Platform: The HW platform should be noted, including revision number, and special characteristics (like Arduino UNO SMD, Rev 3).  Where possible an image of the platform should be captured as a photograph.

Components:  Document a bill of components, noting source and version number or distinguishing type (often very important).  Include pinouts of components, and any important parameters.

Schematic: Draw the schematic in any form.

Layout: Capture the physical design and arrangement of the components.

Notes: Describe any additional documentation that might be helpful including reference web sites, notes about operation, changes required/warnings/guidelines.

MetaData: Finally, this file should be easy to find.  It should be printed out, indexed/filed in a convenient place, and put away.  There should be a pointer from the physical device to the documentation.

Posted in How To | Comments Off

Arduino Pro Mini 328 Project Board

I have been experimenting with the 5V & 3V versions of this $10 board from Sparkfun. It is very versatile though it requires a USB to FTDI interface.  The Project Board I have assembled including the Pro Mini has buttons and switches.  As you can see from the photo, it also uses Seven Segment Platform Circuit Board.  The Project Board Circuit Board consists of 2 pushbuttons, 1 Piezoelectric transducer (note not good for musical reproduction – distortion),  Bi-color LED.  This is attached to a Sparkfun 7 Segment display and an breadboard for prototyping.

Pro Mini 328 Project Board and Seven Segment Platform 


  • D3       PWM Output for Grain synthesizer
  • D5       Green LED
  • D8       Red LED
  • D6       Serial Display from Sparkfun
  • D7       Piezo Electric Transducer
  • D11     PWM Output for Sine Wave Generator


  • A0       Frequency/Grain Pitch
  • D10     Run
  • D11     Enter

Projects that I have built include:

Filename:  s7_pomo_simple_may19

  • Arduino Pro Mini 328 16Mhz Sparkfun, 5V
  • 7Segment Serial wired to pin 6, running software serial
  • Two pushbutton inputs & piezoelectric element
  • Implements pomorodo timer of 25 minutes of work and a 5-minute break
  • Serial7Segment.begin(9600); //Talk to the Serial7Segment at 9600 bps
  • Serial7Segment.write(‘v’); //Reset the display – this forces the cursor to return to the beginning of the display
  • Serial7Segment.print(“1234″); //Send text to the display
  • beeper – Sound function


  • int runPin = 10;     //Run
  • int enterPin = 11;   //Enter
  • int gledPin = 5;     //Green LED
  • int rledPin = 8;     //Red LED
  • int piezoPin = 7;     //Piezo Electric Element


  • Filename:   s7_sine_may20a
  • * Revised May 20, 2015 (disabled outputs on pins 6 & 7), cleaned up format
  • * Output on Digital pin 11
  • * Input on Analog pin 0
  • * DDS Sine Generator for ATMEGS 168
  • * Timer2 generates the 31250 KHz Clock Interrupt


  • Filename:  s7_grain_may22a
  • // May 22, 2015
  • // granular synthesizer adapted from Peter Knight (
  • // Analog in 0: Grain 1 pitch (ONLY FUNCTIONAL)
  • // Analog in 1: Grain 2 decay
  • // Analog in 2: Grain 1 decay
  • // Analog in 3: Grain 2 pitch
  • // Analog in 4: Grain repetition frequency
  • // Digital 3: Audio out


  • Filename:  s7_analogin_may22
  • * May 22, 2015
  • *  Reads an analog input on pin 0-4, and prints the result to the serial monitor.
Posted in Arduino, Audio, How To, Projects | Tagged | Comments Off

Problem Solving – Arduino C++ Graphical Display

I have been working on this problem for a little over a week, and I am not getting anywhere fast!  I thought I would start by stepping back and trying to find out a solution more efficiently than just banging my head against the wall, working harder, not smarter.

Below are the steps that I put in a prior post on Personal Problem Solving Process (PPSP), and I have augmented them with additional thoughts or different approaches.

Spoiler Alert:  In the process of writing this blog post I realized that there are some “lurking variables” that are impeding the debugging process and that I’m likely to go into a wormhole and never come out.  So, in the end, I decided to put this issue on the shelf and move on to finish the Altimeter as this does not block a useful trial, where I will learn so much more that I know now!

1. Describe the problem & document:  I want to provide altitude information on a small graphical display formatted so it is compact and readable.  I’m using the Adafruit Arduino library for writing to this display.  Unfortunately, when I try to write to the display using a String object, the routine displays nothing (blank).  The reason for using a string object is so that I can have a fixed number of characters for a given variable, thus yielding a tighter display in a table format.


Routine: display.print(); display.print

The function properly renders floating point numbers, integers, and character arrays, but not String objects.

Problem statement:  How can we consistently display a number in a fixed number of characters (4) using the display.print() library on the SSD1307?

2. Initial conditions:  We had developed a test file for more rapid troubleshooting.  Although it would be desirable from an iteration speed standpoint to not have to write to the OLED display, I have found that the serial display functions don’t operate the same way as the display.print() functions do.  The test file is: sketch_mar27display, and the key statements are:

display.print(), String(), and toCharArray()

3.  Considerations:  When trying to understand the problem and better define the boundaries of disfunction, I found that inserting unrelated statements such as initializing another String object or calling the Tone function would cause the display not to work either!  So I have concluded not to put in more good time after bad, and focus on different parts of the project.  I could spend hours and hours on this particular problem, but I have the feeling that the solution will come to me over the course of time, not over forcing to solve this problem right here, right now.

4.  Next Steps:  Document this (in the brown lab notebook) and upload this post and put the problem aside.  Then, the next step is to resume the Altimeter project, using the constraints that we have a simplified graphical interface and be satisfied with and or accept the challenge of limited formatting capability.  We are close to having a finished project and we should outline all the steps to move it from the bench to the field.


Posted in Arduino, How To Process, Problem Solving, Process | Tagged , , , , | Comments Off