16 July 2019

Flash Non-Volatile Storage Bandwidth RPi4

Updated 10/01/2020 with Sandisk Ultra 128GB USB3 Flash Drive
Updated 28/07/2019 with Sandisk Ultra 64GB USB3 Flash Drive
Updated 23/07/2019 with Netac 32GB Class 10 U1 SDHC and Sandisk Ultra 64GB SDXC added
Updated 17/07/2019 with Sandisk 64GB Extreme SDXC added


Not all types and formats of non-volatile memory are the same.  Varying in interface and access times and speeds.  The performance of different devices will understandably affect performance and 'performance' is something I am interested in for the new RPi4 with USB3.

My new RPi has arrived and I am interested in the relative performances of some microSD cards I have.  Using CrystalDiskMark v6.0.4 a utility for benchmarking storage devices I ran the test and the results are shown below:

Samsung MicroSD 32GB Class 10
Formatted with FAT32


Sandisk MicroSD 128GB Ultra
Formatted with exFAT

As a comparison with other storage types:
USB3 Sandisk Flair 64GB Flash Drive
Formatted with FAT32

Samsung 860 EVO 500GB SSD connected to SATA bus
Formatted with NTFS
The SSD, of course, trounces the other storage options in performance and cost per GB, but not in terms of format, because it requires a connection to the SATA bus.  I am interested in microSD format performance for using an RPi4 as a NAS device running two USB3 WD 10TB drives in RAID1.

Update
Sandisk Extreme microSD 64GB
Formatted with exFAT

Revised conclusion
Given the price premium attached to the Extreme model and the nominal existing good performance of the 128GB Ultra version I would recommend the 128GB version given the extra available space.

Update 2
Netac 32GB Class10 U1 SDHC
Formatted with FAT32
Sandisk Ultra 64GB SDXC
Formatted with exFAT
Update 3
Sandisk Ultra 64GB USB3 Flash Drive
Formatted FAT32

Formatting the USB drive with the exFAT filesystem, for comparison, the results are realistically unchanged.
Update 4
Sandisk Ultra 128GB USB3 Flash Drive
Formatted FAT32


Strangely, this drive performs slower than its smaller 64GB sibling and I am unable to explain why.

16 June 2019

GIMP generating a SVG from a picture

The generation of a SVG in GIMP requires a path to be made around the shapes of interest.  This in turn requires the shapes of interest to be selected, because from there paths can be generated by placing a single path point using the path tool that looks like a pen and line with three dots:

click inside the area of interest, right-clicking and choose Select > To Path.

The generated path points can then be changed or simplified as needed.
Then from the path toolbox select the path and right-click selecting Export Path. 

Remember to add the file suffix of .svg

Et volia!

15 June 2019

I2C 12bit DAC MCP4725 Addressing



Hello everyone today a pack of MCP4725 modules arrived.  The MCP4725 is a single channel, 12-bit, voltage output Digital-to-Analog Converter with integrated EEPROM and an I2C Compatible Serial Interface.

I am posting this because the module didn't work, out of the pack, with the Adafruit library: https://github.com/adafruit/Adafruit_MCP4725
The specific module I am using was bought from and cost about 66 pence each:
https://www.aliexpress.com/item/32428403866.html

Problem

The IC was generating a static voltage of 1.625v and not the expected slow-varying sinewave defined in firmware. The code relevant to addressing the chip is:

  // For Adafruit MCP4725A1 the address is 0x62 (default) or 0x63 (ADDR pin tied to VCC)
  // For MCP4725A0 the address is 0x60 or 0x61
  // For MCP4725A2 the address is 0x64 or 0x65
  dac.begin(0x60);  // corrected address from 0x62

The default address is 0x62 and assumes a MCP4725A1 part.  The supplied part is a MCP4725 and the address select pads are unsoldered - see pads circled in blue:


Now ICs can have internal pull-ups and pull-downs, but checking the datasheet: https://www.microchip.com/datasheet/MCP4725
There doesn't appear to be any bias on the A0 pin and so I measuring it with the part powered up and it is 0,02v, so LOW.  

Solution

The default address for the part is 0x60 and if the ADDR and VCC pads are bridged then 0x61.

Happy prototyping!

Supporting Library

https://www.dropbox.com/s/46g9dr2213adhj9/MCP4725-master.zip

13 April 2019

Fixing Nexus Ear Speaker


The symptoms are that the ear piece speaker does not emit sound.  I first though it was a software problem, but a reset did nothing so I investigated the hardware angle.  It turns out the fix is relatively simple.

Ear piece speaker contacts not connecting with logic board pads
The speaker is unsurprisingly magnetic and contact is not being made with the two pcb edge pads.  Simply, push the speaker slightly back under the pcb by a millimeter or so but not too far because there are two tiny smd components on the underside near to the pads.  Adjust the speaker connectors, by bending or use a small paper shim between the front-facing edge of the speaker to raise it to make contact with the pcb.  Tested with a phone call and a few times during reassembly because the pcb can flex slightly while screwing down the logic board cover.
Ear piece speaker now working
   

28 March 2019

Right Size Baking

Today, I decided to 'rescue' some over-ripe bananas before they were thrown away - the plan: bake banana loaf muffin things.  The kitchen, however, is the domain of the 'kitchen elf', so I found it challenging to find what I needed: I found the required ingredients but not a baking tin of the right size.  I look for glassware of the right size and shape - even large foil takeaway containers, but all to no avail.  So adapting a technique from mold making I packed a larger container with crumpled tin foil (I decided against paper) to create the desired size and shape as you can see:


The remainder of the mixture was used to make muffins and while sat here writing this up I am already onto my second.
The recipe I used was from BBC Good Food and shown below:

75g butter, softened
100g caster sugar
2 large eggs
3 medium ripe bananas
A few drops of vanilla extract
200g self-raising plain flour
2 tsp baking powder
2 tbsp of milk

Mix everything together for two minutes and bake for an hour or so, until golden brown.  Extract from oven and leave to cool. :)