Nifty SD Card Gadget

I recently purchased, on eBay, a nifty little SD Card gadget. You can plug either a regular or micro-size SD card into it and then plug into either a standard or micro USB port. It is pretty handy, especially for a laptop. I tested it on my Manjaro/Arch Linux desktop and on my Android phone. It worked flawlessly. Actually, I was quite surprised when I plugged it into the charging micro-usb port, opened the File Manager App and there it was! All of the photos on the card were present and displayed in thumbnails. I am impressed with this thing.

BTW: I purchased it from eBay seller fashion-bestbuy for $2.15USD including shipping from China.

PS: While I show two SD cards inserted, I did NOT test it that way. Assuming that it would not work, or worse, I tested only one SD card at a time.

 

sArea=010111111

FIG 1: SD Multi-Function USB Adapter

Advertisements
Posted in Electronics | Tagged , , , | Leave a comment

Tamarack Fan – What’s Inside

Another non-electronic post. It is an interesting design using cams, levers and microswitches. It’s sort 1960s, in a Rube Goldberg’ish way but it works and that is what counts. Well, the mechanism works well but the fan is noisy and doesn’t move much air. Still, impressive mechanical engineering with a touch of electrical engineering.

This post is basically just a video of what is inside the Tamarack Attic fan. Enjoy:

 

Posted in Mechanical Engineering | Tagged , | Leave a comment

Whole House Fan (Non Electronic Post)

I haven’t posted lately because an electronic project that I worked on for much of 2017 and into 2018 occupied most of my spare time. Unfortunately, it hit a roadblock (cost of FCC compliance testing, not technical) and my attention was then diverted to more domestic pursuits (one is topic of this post). I do have a new electronic project, in fact I’ve already produced a PCB for it – but – it’s not time to talk about it yet. I did not post about the previous time-consuming project because it, and also the new project, have a commercial aspect and thus I am not prepared to disclose details about them, at this time.

Anyway, this post is about a recent domestic project. It isn’t electronic but you “may” find it interesting nonetheless. I live in the North Carolina mountains and it is cool enough that the air conditioning is seldom needed. In the summer, some afternoons between 3PM and 7PM it can get warm enough that air conditioning is needed. My home used to have a Tamarak HV1000 Whole House fan that I pretty much disliked. It seemed as loud as an airplane engine and provided minuscule air movement. Last year one of its two direct drive electric motors died and it is not a serviceable item, per Tamarak. BTW, to Tamarak’s credit they have added quite a few new fan types since my HV1000 was purchased about ten years ago, but they cost more than the solution that I selected.

I opted for a self-install Quiet-Air 4800 fan which is pretty quiet – maybe 5%-to-10% of the Tamarak’s noise level and exchanges air at 3,500cfm. It was expensive but my house just doesn’t have a good place for the cheaper old, traditional horizontal attic fans (which are also quite noisy). Some photos of my QuietAir install are below. I deviated slightly from Quiet-Air’s instructions, as follows: (1) QuietAir provides two steel mounting arms1 that are screwed into a ceiling joist and the damper box is supported on one side by screws into the ceiling joist and 2/3 towards the far side by the two mounting arms. This is OK except that one side of the ceiling grill would be supported by screws into Sheetrock, which is not acceptable to me. Thus I framed around the damper box with 2X4s primarily as support for the ceiling grill, but it also allowed better support for the damper box by screws into the 2X4s; (2) I used aluminum HVAC tape to seal around the damper box to sheet-rock seams, and also the flexible duct interface to the motor and damper-box so that absolutely no suction power was lost; (3) I added rubber washers to the fastening lag-screw that secures the motor support chain. The idea was to mitigate any vibration being transmitted to the rafter. Vibration turned out to be undetectable so the rubber washers are probably unnecessary. Click on photo thumbnails below to view larger. Click the enlarged photo to step to the next photo.

 

  1. QuietAir would significantly improve their product if the damper box support arms were lengthened and shaped at the far end with a horizontal section pre-drilled and tapped to accept the grill attachment screw. In this way the grill would not need to be supported by Sheetrock. See Figure 1, below.
fan-arms

Figure 1 – Improved Damper Support Arm

Posted in Uncategorized | 3 Comments

Solar Garden-Light Failure Autopsy

About a year ago I placed a Dollar-Tree Solar Garden-Light, (Fig 3, below) in a sunny place of our yard. From a previously identical light I knew that the battery contacts were thinly plated steel which would corrode and cause lamp failure after a few months of exposure to the weather. Consequentially, for this lamp I sealed every opening, every crack and every screw with silicone rubber. To its credit it lasted almost a year before it died.

When I opened up the light to autopsy it I was surprised that the point of failure wasn’t the battery contacts. They looked pretty good with almost no corrosion. However, the entire interior was coated with a brownish powdery deposit (see Fig 1, below). The deposition source looked to be the AAA NiCd battery. Apparently it spewed out vapors which condensed on most the interior. The battery tests 100% non-conductive on a multimeter. It is truly dead.

I inserted an alkaline AAA battery into the Garden-Light but it refused to turn on. Apparently the NiCd battery’s fumes did more internal damage beyond looking ugly.

The Battery-University website says “Most rechargeable cells include a safety vent that releases excess pressure if incorrectly charged. The vent on a NiCd cell opens at 1,000–1,400kPa (150–200psi)…With each venting event some electrolyte escapes and the seal may begin to leak. The formation of a white powder at the vent opening makes this visible. Multiple venting eventually results in a dry-out condition.”

This certainly seems to be what happened in my Garden-Light. The only deviation being that the powder is brownish rather than white. This could possibly due to a chemical reaction with other components within the Garden-Light or possibly a unique Chinese chemical brew for the electrolyte?

The electronics in these Garden-Lights do have logic to prevent total discharge but have NO protection for over-charging nor does it limit the charging duration,  voltage or current. The solar cell on the light produces over 2V in bright sun. In other words, the Garden-Light is rather battery unfriendly when it comes to charging. I can certainly see the opportunity for overcharging on bright sunny days. Do this over and over during the summer and venting would be likely escalate until “poof” – dead light!

NiMH have a similar venting issue with improper charging so switching from NiCd to NiMH won’t help. Without proper charging control it would seem that a one dollar Solar Garden light is worth only what you paid for it. Consider it mild entertainment for a few months to a year, at most.

light-autopsy

Fig 1: Autopsy of Light Internals

light-inside

Fig 2: New Light Internals

light-entire

Fig 3: New lamp

 

Posted in Electronics | Tagged , , , | Leave a comment

Macrofab Pick and Place (PnP) – musings

NOTE: This post has some significant update of January 28, 2018

I have been doing some PCB SMT design using pcb-rnd with a goal of trying a board assembly shop.  I’ll do a few prototypes but that is all. Macrofab has enough recommendations for prototype quantities that I have been concentrating on it. Pcb-rnd  a spin-off from geda pcb. Geda pcb has stagnated, not dead but somewhat stagnate, so an interested team created pcb-rnd in order to accomplish some significant new features while maintaining backward compatibility to geda pcb. There are numerous YouTube videos about Macrofab HEREpcb-rnd has significantly diverged from geda-pcb since it was forked, Pcb-rnd has added many more features and uses different file formats, although geda-pcb formats can be imported/exported.

It turns out that PnP assembly is tricky as there are NO real industry standards. I’ve tested centroid/xyrs part placement files with several fab houses and each wants a different file format. Likewise each fab company has other peculiarities in its required x/y measurement origin, nomenclature and unit of measure. Additionally, their documentation for “their” format is typically scant to none, ScreamingCircuits being an exception as they have significant documentation. I have been helping Tibor Palinkas (Igor2), the Lead Developer of the pcb-rnd project, on getting pcb-rnd to export a xyrs file that Macrofab can correctly read. It was a challenge but we are finished and pcb-rnd correctly produces a centroid file that has correct rotation and size values.

With square/rectangle boards pcb-rnd uses the implicit Pick and Place (P&P) origin of 0;0 at the lower left corner. Pnp-rnd handles the origin used by XYRS with odd shaped boards with a special dot on any layer of the board – a “PnP-Mark”.  The PnP-Mark dot is created by drawing a short line and then drag&drop move the endpoint of the unselected mark line back to its origin endpoint – this will result in a zero length line, which looks like a filled circle. Next select the mark, drag&drop move it to the lower left corner of the outline box relative to the outline’s line centerlines, as shown in Figure 2, below. With the mark still selected, press ctrl+e and click on the “add attribute” button in the property editor. Type in “pnp-origin” in the “Attribute key” and “yes” in the “Attribute value” field (see Fig 3 below); click ok and close the property editor. Finally, export the Gerber and xy files.

Creating Macrofab Compatible Files with pcb-rnd

Macrofab requires Protel-like
suffixes
. Macrofab has a help page that explains their requirements at THIS-LINK.
For example, the Top Copper layer’s suffix is GTL, i.e.,
filename.gtl

  • With square/rectangle boards pcb-rnd uses the implicit Pick and Place(P&P) origin of 0;0 at the lower left corner.
  • For odd shaped boards pcb-rnd handles the origin used for XYRS files with a special mark on any layer of the board – a “pnp-origin” Mark.

First create macrofab compatable files

  1. You will be more successful if your pcb-rnd layout includes certain fields for your board. Consequentially, make sure that your layout is production ready before starting this process:
    • Your part’s footprint and value attributes (Edit→edit_attributes_of→subcircuit) should be meaningful.
      This is because macrofab will need real manufacturer part
      numbers
      and values (ohms, etc).
    • Macrofab’s Bill of Materials screen can search parts that are available from component vendors but if your part number is a real manufacturer’s part number and value then the process will go much more smoothly.
  2. The pnp-origin dot is created by drawing a short, thin line and then drag&drop move the endpoint of the unselected mark line back to its origin endpoint – this will result in a zero length line, which looks like a small filled circle.
  3. Next select the dot, drag&drop move it to be centered on the lower left corner of the outline box relative to the board outline’s line centerlines (bounding
    box
    ).
  4. With the mark still selected, press ctrl+e and click on the “add attribute”button in the property editor.
  5. Type in “pnp-origin” in the “Attribute key” and “yes” in the “Attribute value” field; click ok and then close the property editor. A short video of pnp-origin creation is available at THIS-LINK.
  6. Finally, export the Gerber and xyfile:
    1. When exporting the gerbers (File→Export_Layout→gerber), select checkbox “all-layers” and select name-style “universal”.
    2. When exporting the XY file (File→Export_Layout→XY), select “Macrofab” format. Rename the XY file’s suffix to XYRS.

Note 1: The pnp-origin mark is not explicitly visible in the XY file nor is it explicitly passed to macrofab. Instead, all part coordinates are calculated considering the mark’s center as 0;0.

Note 2: However, the mark is not hidden or suppressed by pcb-rnd from any of the output. It must be a line, but it can be on any of the layers. Thus the mark potentially could show up on the board. There are options to make the mark disappear:

  • Make the mark diameter smaller that the router mill bit diameter and place the mark on a copper layer; the board fab will have the copper dot, but it will be milled away.
  • This should also work if the mark is on a silk layer or even on the solder mask layer where this object would be a small cutout over void
  • Make a new (copper) layer or unused layer, such as an inside layer, place the mark there and don’t send that layer’s Gerber export to macrofab.

Next Upload Files to macrofab

Macrofab has help pages that explain their process for uploading and verifying board files to their system for several EDA software products but not specifically for
pcb-rnd. If your board is created as described above you should have no problems.

 

For the record:

  • Macrofab measures x/y placement, in mils, based on the lower left corner of the board or, if present, the lower left corner of the outline centerline. For an example of the proper position, see Figure 2, below. Placement is looking through the board (think X-ray). NOTE that Macrofab uses bounding box measurement so if your board is an odd shape, for example wider at the top than the bottom, the lower-left corner will be that of the bounding box and not necessarily that of the board’s outline. See Figure 1 “Bounding Box PCB Example” below.
  • Macrofab requires the part dimensions, in mils, of the part’s Rotation-0 orientation regardless of the rotation of particular placement. So, a part, measured Rotation-0 orientation, of XSize 366.27, YSize 237.17 would use the same value when in Rotation 90, etc.
  • Macrofab rotation is based upon Dual inline chips being oriented at 0 (zero) rotation with pin one on the upper left. Two pin and single inline components are oriented at 0 (zero) rotation with pin one to the left. See figure below. Also, rotation for the bottom is the same but with the board flipped, bottom now facing you.
  • Macrofab requires the XYRS file be TAB delimited with columns in a fixed order, meaning a heading row is ignored and, in fact, creates a problem if present. The order is: Designator, X-Loc, Y-Loc, Rotation, Side, Type, Xsize, Ysize, Value ,Footprint, Populate, MPN

BTW – some may wonder why I use pcb-rnd or geda pcb instead of kicad (I avoid non-open-source software). I have tried kicad enough to know that it is a very capable product – but – it is too monolithic for me. I prefer the Linux/Unix approach of a tool-suite, which geda pcb and pcb-rnd provide. I have a history with geda pcb, having used it for years – I know it and therefore find it easy to use – but pcb-rnd has many more features than older geda-pcb and is therefore what I use. That said, for a newcomer that has never before used pcb layout software, I would recommend kicad.

Image Credit: ScreamingCircuits

Bounding-Box-PCB-Example

Fig 1: Bounding Box PCB Example

pnpmark-centerline

Fig 2: PnP-Mark re Outline Centerline

pnp-origin-attribute

Fig 3: PnP Mark Example

Posted in Electronics, PCB Etching | Tagged , , , , , | 3 Comments

awka – awk to C converter

I love AWK. I am among a minority. While many people use awk one-liners in shell scripts, few utilize awk as it was originally intended – a stand-alone language. I used to use it extensively back in the 1990s and continued to use it as my go-to language whenever I needed some heavy lifting text file manipulation.

Recently I wrote a small but powerful awk program to manipulate certain fields in genealogy GEDCOM files. My problem was that the GEDCOM standard allows NOTES and SOURCES to be linked, or cross referenced (XREF). For example here are a couple of lines of an “in-line” note:

1 NOTE This file demonstrates all tags that are allowed in GEDCOM 5.5. Here are some comments about the HEADER record
2 CONC and comments about where to look for information on the other 9 types of GEDCOM records. Most other records will

The note immediately follows the NOTE keyword in field 2. The CONT line that follows is a “continuation” line of the preceeding line.

Here is what a cross-linked/XREF note looks like:

1 NOTE @N24@
1 CHAN 2 DATE 11 Jan 2001
3 TIME 16:00:06
1 RIN 1
… (many lines later)
0 @N24@ NOTE
1 CONC Comments on "Charlie Accented ANSEL" INDIVIDUAL Record.
1 CONT
1 CONT To represent accented characters, the ANSEL character set uses two-byte codes. The 
…

Note @N24@ is the cross reference to the actual note @24@ much later (often near the bottom) in the file.

My problem was that, recently, I have been using the genealogy website WikiTree.com and their new GEDCOM import process (GEDCOMpare) has some bugs. Currently it discards cross-linked notes. To resolve this problem I wrote an awk program that converts cross-linked Notes and Sources into In-Line, which mitigates the WikiTree GEDCOM import problem.

Now, with the background out of the way – on to the reason for this post. Awk isn’t blindingly fast since it is an interpreted language so a binary executable of the awk program would help with large GEDCOMs. I stumbled across a SourceForge project by Andrew Sumner named “awka” In addition to being hosted on SourceForge it is also hosted by noyesno of Shanghai, China on GitHub. I compiled and installed it with only one issue – it put its library in /usr/local/lib instead of where I needed it for my system – /usr/lib. In one word AWESOME! Awka creates C source that compiles into an executable that is functionally identical to the subject awk script.

If you’re into awk check out awka! And if you aren’t into awk – GET INTO AWK!

Posted in Programming | Tagged , , | 2 Comments

Useful Small PCB Work holder

I was watching a YouTube video series about removing and replacing a BGA IC and the talented technician was using a really useful looking PCB holder. You’ll see the PCB holder at 3:50 into the YouTube video link below. The video is in Vietnamese but that doesn’t really matter as you can clearly understand what he is doing. Unfortunately, my first BGA removal was a failure because I was a bit too eager to lift the chip, applied too much pressure and lifted several BGA traces on the PCB. I fear that the board is ruined beyond recovery. I should have first practiced on a junk board.

I purchased one of these useful little PCB holder via eBay and it arrived yesterday – see my photo below. It seems well made and I definitely believe that it will be as useful as in the video. The base is a painted steel and the vise parts are plated but show machining marks so they may be machined rather than cast, which is a good thing. The base measures 12cm x 8cm. I purchased mine for $3.41-USD (including shipping) from eBay seller “94racing-us“. It was delivered in twelve days from order.  Domestic delivery is often slower than that  and this came across the globe from China.

pcb-holder

PCB Holder – Empty and loaded with a PCB

 

Posted in Uncategorized | 1 Comment

Linux Associate file icon and application

I could not get association of a file icon, mime type and application to work satisfactorily. There are numerous how-tos on the Internet but all are incomplete or wrong. The greatest help, for me, was the ARCH Linux Default applications help page. It helped more than any other, but wasn’t all of what I needed. BTW, I couldn’t get the icon to work in the .local directory so I had to put it into ‘/usr/share/icons/Mint-X/mimetypes/scalable/’ in my Mint 17.2 system.

Anyway, I wrote up a cheat sheet for me using the freerouting java program as my example. Here it is:

Example - add file icon and application for freerouting in ~/bin

Place inkscape created icon.svg in:
/usr/share/icons/Mint-X/mimetypes/scalable/

In ~/.local/share/mime/packages/ place application-x-specctra-dsn.xml:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="application/x-specctra-dsn">
    <glob pattern="*.dsn"/>
    <glob pattern="*.DSN"/>
    <comment>SPECCTRA DSN for autorouters</comment>
    <icon name="application-x-specctra-dsn"/>
  </mime-type>
</mime-info>

In ~/.local/share/applications/ place file freerouter.desktop
[Desktop Entry]
Version=1.0.0
Encoding=UTF-8
Name=freerouter
GenericName=freerouter
Comment=freerouter Autorouter for pcb
Exec=/home/username/bin/freerouting
Icon=application-x-specctra-dsn
StartupNotify=true
Type=Application
MimeType=application/x-specctra-dsn;

Enter:
sudo gtk-update-icon-cache /usr/share/icons/Mint-X/
sudo update-desktop-database

NOTE: In this example "/home/username/bin/freerouting" is a shell command:
#!/bin/bash
java -jar /home/username/bin/FreeRouting/fr.jar

It executes a java program
<span
data-mce-type="bookmark"
id="mce_SELREST_start"
data-mce-style="overflow:hidden;line-height:0"
style="overflow:hidden;line-height:0"</span>
Posted in Uncategorized | Leave a comment

SMD Temperature / Humidity Sensor

I made a Printed Circuit Board (PCB) for a project that I have been working on that a temperature and humidity sensor. My initial PCB had mostly Surface Mount Devices (SMD) parts but three parts were discrete through-hole parts. Through-hole parts are a problem for Pick-aNd-Place (PNP) production, so they should to be replaced by SMD parts, whenever possible – see Design for manufacturability (DFM).

One discrete part that I was using was the Chinese made DH22 Temperature & Humidity sensor module, readily available on eBay and elsewhere.

dht22

Fig 1: DHT22 Temp/Humidity Sensor Module

The DH22 works fine but being discrete, it had to go. The sensor IC that I selected is the Silicon Labs Si7006.  The Si7006 interfaces via two-wire I2C. The final target controller chip is my personal favorite, the Atmel/Microchip Attiny85. However, I have a good bit of experimentation to do before it will be ready for the Attiny85. Until then, I am experimenting with the Arduino NANO. I don’t plan on integrating the Si7006 into my total PCB design until it is working to my satisfaction. Consequentially, I designed a small prototype board (~10X13mm) that I can plug into a breadboard. The schematic for the Si7006 prototype board is shown in Fig. 2, below. The layout of the resultant PCB is shown in Fig 3, below.

gs-si-sch

Fig. 2: Prototype Schematic

gs-si.board

Fig 3: Prototype PCB Layout

Today I tested the Si7006 in a breadboard with an Arduino NANO using a test program (Si7006Example) that is part of the thingTronics Si7006 Arduino Library.  See Fig 4, below. At first it only partially worked – it started, read the serial number and firmware number but reading the temperature and humidity failed. After some research, I changed the read mode from the default “No Hold Master Mode” to “Hold Master Mode” and it immediately started working. Actually, I also unsoldered the original 10k resistors and replaced them with 4.7k resistors, also due to an interesting article that I read about the Si7006’s pull-up resistors (I’ve lost the link, sorry).

breadboard

Fig 4: Breadboard with Si6006 Prototype Board

With the read mode changed to “Hold Master Mode” the Si7006 prototype board worked correctly. See serial output in Fig 5, below.

si7006-tty-output

Fig 6: Serial output of Si7006 Test Program

Next, I need to try interfacing to a resource limited Attiny85 using the TinyWireM library. I expect this to be a challenge.

Posted in Electronics, hardware | Leave a comment

All SMD Radio Transmitter

In a current personal(1), i.e., not for sale or distribution, project I have been using a Chinese ASK radio transmitter module – the STX-882, which I posted about back in February of this year. The STX-882 works well BUT being a module, it is a through-hole device and my goal is for my current project to be 100% Surface Mount Technology (SMT). While  this project will not be manufactured for sale, I am curious as to what such a device would cost IF it were turn-key manufactured and what the final cost would be. It appears that the cost would be greatly reduced if there are no through-hole devices. Through-hole devices in a low volume product cause a two step manufacturing process where the board is assembled using Pick aNd Place (PNP) fabrication but must be finished by hand. As a result, I needed to replace the three through-hole parts in my design with SMD parts. One part, a large capacitor, I will replace with several, smaller capacity SMD capacitors. However, two modules, a Temperature/Humidity sensor and the aforementioned STX-882 433.92MHz RF transmitter module would need to be replaced with SMT designs that would be incorporated on the same board.

I decided to build three small personal prototype boards solely to test my design and fabrication. To replace the 433.92MHz transmitter I selected Microchip’s MICRF113YM6 single-chip ASK Transmitter IC. Quick calculation indicates an ERP of -10.005 dBW with a λ/4 antenna. Transmission time is a few milliseconds. Utilizing a slightly modified version of their reference design I used pcb-rnd PCB design software to design a small prototype board which I then had made by OSHPark. This board was designed VERY quickly – I didn’t spend over 30 minutes designing the schematic and laying out the board. Such is the case with pcb-rnd, which was forked from geda PCB in order to add a number of innovative features.

gs-tx-sch

Fig 1: 433.92MHz Prototype Board Design

gs-tx-board

Fig 2:  Prototype Board pcb-rnd view

Today, I broke out my 858D hot air workstation and built up one of the prototype RF Transmitter boards. Next I cranked up a breadboard’ed test receiver for this project and on a transmit breadboard for this project I switched out its STX-882 transmitter and substituted my newly designed board. See Fig 3, below.

si-tx-operating

Fig 3: New Prototype Substituted for STX-882

To my great joy, the instant that I powered it up error free data was being delivered over 433.92MHz. Refer to Fig 4, below, and you’ll see the received temperature and humidity data. Also, Fig 4 is a spectrum scan while the radio periodically transmitted data (once per minute). The measured frequency is 433.916 – not quite the 433.92 expected but certainly well within tolerance. I’ll accept it because I didn’t use precision parts for C5 and L2. They are 10% tolerance parts.

rx-data

Fig 4: Data received from Prototype RF Module.

waterfall

Fig 5: Spectrum Scan

Now I’ll move on to testing my prototype temperature/Humidity sensor module. More on that later.

1. This is a personal use home-built device (not kit-constructed) that is assembled in a quantity of five or less. BTW – this odd verbiage is in case anyone from the FCC reads this post.

Posted in Arduino, Electronics, hardware, PCB Etching | Tagged , , , , , | 1 Comment