Transfer Files From Phone to PC Easily

I have a Pixel phone that for some reason always disconnects when I try to transfer files over USB to my laptop. it is almost full of pics and videos since I can’t really transfer them off. I finally filled the phone up and had to make space, so I figured out the method I’m going to use from now on to transfer files on and off my phone.

I set my phone up to be a simple little WebDAV server. This allows me to very easily map it as a network drive in windows and transfer files at will.

I downloaded HTTP File Server (+WebDAV ) on my phone. Then I opened it and clicked the “Start button to start the server. Obviously you have to give this app file permissions for it to work.

Then on my PC, I mapped the drive by right-clicking the “This PC” and selected “Map Network Drive:

 

Then type in the address from the HTTP Server app.

Once this is done you can access the file from the phone via whatever drive letter you selected when you mapped it. In the above image the drive is the Y:/

 

Teenage Engineering PO-80 or Gakken Record Factory 78RPM Hack

Recently, Teenage Engineering released the PO-80 Record Factory, which is a rebranding of the Japanese Gakken Record Maker kit.  It is a really neat record player that can also cut custom records.  One problem I had with it is that it only plays 33RPM and 45RPM, but we had a lot of 7″ 78s I wanted to play on it, so I fixed it.

Most cheap record players use the same 5-pin motor module which is a DC motor with a speed controller built in. This particular one uses the EG530SD-3F.  By wiring  3 of the pins in different ways, it will automatically play at constant speeds of 33RPM, 45, RPM or 78RPM. The 33 and 45 are basically the two built-in speeds, which is what this kit uses.  To add the functionality of 78RPM, you can add a resistor to the circuit.

There wasn’t a detailed datasheet explaining what’s inside the motor, but rather many listings for this motor had the following instructions.

Adjusting Method:

  • When the changeover switch reaches 33, use a small flat-blade screwdriver to adjust the resistance of the L hole of the motor, and the normal disc is 33 revolutions per minute.
  • When the changeover switch reaches 45, use a small flat-blade screwdriver to adjust the resistance of the H hole of the motor, and the normal disc is 45 revolutions per minute.
  • When the transfer switch reaches 78, use a small flat-blade screwdriver to adjust the resistance on the PCBS board. The normal disc is 78 revolutions per minute.

Luckily I found someone online who had taken one apart and described the controller circuit. This, along with the “official documentation” to get in the resistance range was all that was needed to make the simple hack.  The official info is as follows:

For this hack, I needed  a way to add in the resistance for when I wanted to play 78s, but I had to be able to completely remove the resistance to use the 33 or 45 speeds. For this I just found a JST connector, but any female wire connector would work. I soldered the wires of the JST connector to the motor based on the link above. I made sure my wires were long enough to reach out the side the connector for the record cutter extended to.

For the resistor, the only info I could find online were several schematics showing the use of a 300Ω potentiometer so you can adjust it, however, I only had a 5k so I threw a 1kΩ in parallel with it to get me somewhat within the range.  The actual resistance needed is around 160Ω but it is nice to have the knob for adjustment.  I intentionally left the resistor leads long so I could use them to plug into the JST connector. Notice that for this, you only need one side and the center lead from the potentiometer.

The final result looks pretty clean. It’ll look cleaner when I throw some heatshrink on the potentiometer. Again, this is only used for playing 78s so when playing the other speeds I disconnect the potentiometer and store it in the box the record player came in. Check the video out below.

Baofeng TP-8Plus, UV-13 Pro, GM-30, and similar radios

So I was at the bin store the other day and I came across a couple of Baofeng TP-8Plus radios. I’m no expert on HAM radios in general (please correct me on anything I’m wrong about on this page BTW), but I got these two for $7 each so I couldn’t beat it. It turns out, the models I picked up are now a ubiquitous hardware model with different firmware which can be used for multiple purposes.

Firstly, I can’t tell the differences, but the TP-8Plus is apparently also called the UV-13 Pro.. as well as many other models (listed below). There are different levels when talking about radios like this, HAM and GMRS. HAM radio is amateur radio and you have to pass certifications tests for the license. These radios are classified as HAM radios since their broadcast power is too high for GMRS (which is a higher powered two-way walkie-talkie band). To use GMRS band, you need a radio rated for this band and a GMRS license (no certification test required) and your whole family can use the radios apparently. The radios are too powerful as they are for this, however there’s a firmware you can get for them that limits the broadcasting power turning them into GMRS-legal radios (from what I have read..)

Where to get Firmware:

Before doing anything, I took a pic of the current firmware version as shown below. You can see this by holding the flashlight button as you turn on the radio

I was unable to figure out how to copy this ROM onto my PC, but I did find an older version of the UV-13 firmware I could use to replace it if I needed to… which I did. I wish I could find the firmware online.

Where do you get firmware? It depends on what you want your radio to do. I have it on the authority of some random dude on reddit and other that this radio’s hardware “is the same for Baofeng UV-13, TP-8, Explorer QRZ-1, TYT TH-UV88, Pofung P15UV,  Rugged GMR2, TIDRADIO TD-H5, Retevis RT85, and Radioddity MU-5, GM-30.”  Firmware for those radios should work here. They each have slightly different abilities, so it is really up to you. what you’d like it to do. Do your research to see what legal licensing steps you can take based on how you want to use your radios. Comment below if you know where to find other firmware for this radio.

For using this as a HAM radio (where you can enter in frequencies manually or scan them in the 2m band) the UV-13 firmware was easiest to find. The only version I came across online from multiple sources was UV13-Firmware-V06.01.013-20211104_01013.bin I was able to successfully install this without issue and I can still write program settings using the P15-UV software.

For GMRS walkie-talkie usage, I came across the Radioddity page with their firmware. It is important to note that after installing this firmware, I had to use Radioddity’s own version of P15-UV branded “GM-30”. The link to their firmware and programming app is here. From what I read, this firmware limits the transmit frequency making it legal to use the radio. NOTE: I am not a lawyer and I have no way to test the radio’s power with this firmware to compare, it is just what I read on the internet.

Programming:

There are 2 programming modes. One for just reading/writing programmed channels and settings, and another mode for updating firmware. There’s a trick to program firmware I describe below.

The software for the Baofeng firmware is P15-UV CPS software. I was able to find a version of it from a company called abbree.  This only works for the Baofeng firmware. I had to get my copy from the wayback machine as the link on their main download page was broken. This is different software than my older UV-5R used. If you have the GM-30 firmware installed, you must use this Radioddity branded version of the programming software.

    1. I already had a USB cable for these radios since I had an older model. Once installed you can plug it up to the radio, turn on the radio and connect. In the PUV-15 software, select “Program–>Communication Port” and select the com port. If you don’t know which this is, open windows device manager and look for the COM port that disappears when you unplug the cable.
    2. Next you want to back up and save all the channels and settings from the radio by selecting “Program–>Read from Radio” and click “OK” to read all the default settings. Then you have to click “File–>Save As.” This will save your channels and any program settings to a file on your computer.
    3. To flash the firmware, download your preferred firmware version (more on this below) and select “Program–>Tool” For this to work you must manually put the radio in programming mode by turning it off, holding down the PTT and Flashlight button as you turn it back on again.  You know you did this right when the screen does NOT come on, but the red light at the top glows dimly.
    4. Click “Upgrade” button on the app to change the firmware. DO NOT INTERRUPT THIS PROCESS or you might brick the device.
    5. Rewrite the channels and program settings by choosing “Program–>Write to Radio”
    6. If you were a genius like me and forgot to backup your settings, your menus and voice might now be Chinese.  No problem, simply change the language by scrolling through the menu that says this:

      Then pressing the menu button to edit and the down button to change it to English. Press menu again to confirm the change.

    Licensing:

    Again, I am no expert on the matter, but here’s what I learned from all the forum posts and videos I found on this radio. There is no license required to use these radios as listening-only devices. You can use them as weather radios or even emergency service scanners. If you wish to transmit at all you’ll need either a GMRS license or a HAM radio license depending on what firmware you have and how you plan to use the radio. See the comparison chart below:

    GMRS HAM
    One license covers your family. Licensing process is confusing, so watch a recent tutorial video on the process to find out the steps required. One license covers you. You can allow your family to broadcast, but you must be there with them at the time.
    No exam required Must pass a certification exam (there are different levels)
    To be used as walkie-talkies (eg. in your family) because they are shorter-range transmissions. Connect with community of HAM radio operators all over the country, world, and even on the international space station!
    Use Radioddity GM-30 firmware and their custom programming app. Use Beofeng UV-13 firmware and the P15-UV programming app.
    License last 10 years License lasts 10 years
    Cost $35 Cost $35

Adding Custom Desktop and Taskbar Icons to you Python Executable

After going through the process of setting up pyinstaller to stop throwing false virus warnings, you probably want your fancy new desktop app to have its own custom icon.  There is a special method required for each of these icons to work as you expect.

Normal windows programs are a single .EXE file with a custom icon. When you open them, there’s a GUI and the taskbar and window icons are the same. To accomplish this, I use pySimpleGUI to design the GUI. This is simple to install and there are several version available such as pysimpleguiQt. Install this in the command line with:

pip install pysimplegui

I actually cheat a little bit here. You can do everything on the command line, but pysimplegui has a great GUI for this that simplifies things called pysimplegui-exemaker.

Step 1: Create a folder structure for your python project.

There’s likely easier ways to do this, but I typically start my projects by visiting github.com and creating a new repository on my account. Then I open github desktop and clone that directory to my computer. This gives me a correct structure for keeping track of any changes in that folder. I’ll create my main python file in this folder and edit the README file with a description and my project goals.

I create a folder to hold my assets named something like “assets” or “img” where I will save my custom icon file. This can be edited later, but I like having something here so I know from the beginning that it is set up correctly.

Step 2. Get or create a .ico file.

This is the image of your icon. They are really easy to find free ones online or you can make one from scratch using a free online editor or some image editors gimp.

Step 3. Setup Relative Filepaths

I add the following to the top of my main python script based on advice from arcade academy which allows relative filepaths for pyinstaller:

if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
os.chdir(sys._MEIPASS)

Step 4: Setting the Window Icons:

To get my custom icon in the pysimpleGUI you have to use a fill absolute path when you create your windows and all popup windows. I typically just create a global variable with the absolute path to the location of the icon.

program_icon = C:\Users\ALaptop\Documents\GitHub\myProjectFolder\assets\icon.ico
window = sg.Window('Program Title Goes Here', layout, icon =program_icon)
filename = sg.popup_get_file('Select a MPA file', no_window=True, file_types=(("myPythonApp Files", "*.mpa"), ("Text files", "*.txt"), ("All Files", "*")), icon =program_icon) 

When you run this code as a script (in VScode for example) you should see the custom icon at the top left of all the program’s windows. But your taskbar will still be a generic python icon.  You won’t see the icon in the windows taskbar until you create and run an executable using pysimplegui’s exemaker or pyinstaller. Simply running the script from the command line will NOT show the correct icon in the taskbar.

Step 5: Setting Desktop and Taskbar icons

Pyinstaller can set up a template for us to fill out for our project so it will be able to bring in all the external files we want (like icons). Simply run the following command in the command line to generate the template:

pyinstaller --onefile --noconsole .\my-Program.py
This creates a new file called “my-Program.spec” in the same folder as your code. Open this in a text editor and it’ll look something like this:
# -*- mode: python -*-

block_cipher = None

a = Analysis(['my-Program.py'],
pathex=['C:\\Users\\ALaptop\\Documents\\GitHub\\myProjectFolder'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='my-Program',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=False )

Step 6: Customizing the .spec file

Once the .spec file is created, you’ll want to edit it. In the Analysis section in datas I put the links to any assets the program will need such as images, sounds, etc. If I only have images in a subfolder named “img” it would be

datas=[( 'img/*png', 'img' )],

The first parenthesis is where the files are currently stored, and the second is the name of the folder inside the temporary folder that pyinstaller uses when the exe runs. Remember how I said Pyinstaller creates a self-extracting zip file? Here’s where that comes into play. You are telling pyinstaller where you stored your assets relative to your project’s folder, and then telling it where it can put these files later. This path is important especially if you used relative links in your python code. If your EXE can’t find the files it needs, it’ll crash giving you a popup stating “Failed to execute script my-Program”. This can be confusing to debug if you don’t know how to see what the executable is looking for. Also, this expects that you pasted the lines from Step 3 above into your code which sets up relative filepaths.

To understand and to debug this, you have to remember that the EXE pyinstaller creates is a zip file that is made up of a bootloader (which can actually run your python code), your python script, any libraries your script uses auto extracts a folder, and any other files needed to run your script (images, audio, etc). When you run the executable, it actually decompresses all this and sticks it in a folder in your C:\Users\<username>\AppData\Local\Temp in a directory named “_MEIxxxxx” where the ‘x’s are a random number. This folder exists only while the executable (or the error popup) is opened. As soon as you close it, this folder is deleted. You need to visit this folder to debug issues. To debug, you’ll need to pay close attention to the paths in the spec file and your code’s paths and then comparing them to the location of assets inside this temporary _MEIxxxxx folder.

For instance, in the datas entry above, the second set of quotes denotes the name of the folder INSIDE the temporary folder. That’s where pyinstaller is placing the PNGs I refer to in that line. If my app keeps crashing for some reason, I can make sure that these files exist in the correct folder in the C:\Users\<username>\AppData\Local\Temp\_MEIxxxxx\img folder.

Add the absolute path to your custom icon to the .spec file. This is added to the “EXE” section as part of the list of settings. I also added “console=False” so it would not open a console while executing.

console=False , icon='C:\\Users\\ALaptop\\Documents\\GitHub\\myProjectFolder\img\\icon.ico')

You can see my full spec file below. Once you’ve saved the spec file changes, you will issue the same command as before, but use the .spec file instead of the python file.

pyinstaller --onefile .\my-Program.spec

Just for good measure, I also put the fullpath in the pysintaller command as well sometimes:

pyinstaller --onefile --noconsole --icon "C:\\Users\\ALaptop\\Documents\\GitHub\\myProjectFolder\\icon.ico" --add-data "*png;." .\my-Program.spec

Here’s the full final .spec file I would use:

 # -*- mode: python -*-

block_cipher = None


a = Analysis(['my-Program.py'],
             pathex=['C:\\Users\\ALaptop\\Documents\\GitHub\\myProjectFolder'],
             binaries=[],
             datas=[( 'img/*png', 'img' )],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)

             
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          [],
          name='my-Program',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          runtime_tmpdir=None,
          console=False , icon='C:\\Users\\ALaptop\\Documents\\GitHub\\myProjectFolder\\img\\icon.ico')

 

Program Icon (Desktop Icon):

This will be the icon users see and doubleclick on their desktops to open your app.

After running pysimplegui’s exemaker one time for your project as normal, it will create a .spec file template for you.  Once the .spec file is created, you have to put the absolute path to the icon you want to use in that .spec file. For instance, I had my icon in a folder called “img” inside my python’s project folder. Paste the path at the bottom of the EXE section like this:

console=False , icon='C:\\Users\\ALaptop\\Documents\\GitHub\\myPythonApp\\img\\icon.ico')

Just for good measure, I also put the fullpath in the pysintaller command as well:

pyinstaller --onefile --noconsole --icon "C:\\Users\\ALaptop\\Documents\\GitHub\\myPythonApp\\icon.ico" --add-data "*png;." .\myPythonApp.spec

Window and Taskbar Icon:

This is set in pysimgplegui when you create any window (even popups can be given a different icons). The only way this works is if you code the full absolute path in the python script, but you won’t see it in the taskbar until you create and run an executable using pysimplegui’s exemaker or pyinstaller. Simply running the script from the command line will NOT show the correct icon in the taskbar.

program_icon = 'C:/Users/ALaptop/Documents/GitHub/myPythonApp/img/icon.ico'

filename = sg.popup_get_file('Select a MPA file', no_window=True, file_types=(("myPythonApp Files", "*.mpa"), ("Text files", "*.txt"), ("All Files", "*")), icon =program_icon)

 

 

DIY Soldermask Showdown

banner

Once you fabricate a PCB, it pretty much instantly begins to oxidize. PCBs created in industry are coated with a couple of things to protect them from this oxidation and short circuits. The first is called a soldermask, which is a type of epoxy that literally coats the entire circuit board. If you’ve ever seen a circuit board, you’ve seen the soldermask. It is typically GREEN but can be different colors. For example, official arduinos typically have a Teal BLUE soldermask. Sparkfun uses RED. OSHPark uses Purple.

You can see below just how badly the copper oxidizes after being touched an exposed over time.

unprotected

There are multiple ways to add a soldermask to a PCB. My new favorite method is using Kapton tape (explained at the end of this page), but I have tried and compared a lot of different solutions below.

Epoxy-based:
In industry, they use a specially designed paint or epoxy that is cured with ultraviolet light. This allows them to cover all the traces (the wires) but leave the pads visible so you can solder components on the board. Some folks have tutorials out there showing how to do this, but it is messy and uses nasty chemicals.

Dry-Film Soldermask:
You can also buy sheets of “dry film soldermask” which has the epoxy deposited as a flexible sheet that you adhere to the PCB, then use a photolithography method to harden it with UV light.  This allows you to remove the softer material on the pads you will solder the components to. This material is not readily available, but you can find it from electronics suppliers online. Here’s an excellent tutorial on how to do this process at home.

Tinning Traces:
Another option to protect the traces from oxidizing is to tin them. Tin doesn’t oxidize as badly as copper. Essentially you can deposit tin on all the copper surfaces using a chemical deposition (electroless). This is actually done to the solder pads on commercial PCBs, but it can be done to the entire PCB. The biggest issue with this method is that it doesn’t prevent short circuits because it doesn’t add a layer of insulation to the traces. Again, it uses nasty chemicals.

Conformal Coating:
There is a conformal coating that can be painted or sprayed on a PCB after soldering the components.  It coats everything. While it has been formulated for electrical characteristics, etc. I personally don’t like this option. There are Acrylic, polyurethane, and silicone based products, which you can solder through, but it only comes in clear (you though you can see it in UV light).

DIY – Nail Polish:
When I did FabAcademy in 2014, I milled a ton of PCBs. They always oxidized really badly. Some would be useless within a month.  I began painting finished boards with fingernail polish. I only painted the traces in case I needed to resolder the components. (The soldered areas do not oxidize like the copper traces). This option isn’t great because fingernail polish isn’t designed for electronics, or being touched with a soldering iron, but it works and I have boards that are almost 10 years old that look brand new. This is probably one of the easiest solutions due to availability and color selection.

Lacquer:
Another thing I tried more recently was to spray the PCB with colored lacquer, then using either a laser to etch off the lacquer on the solder pads with a laser, or to just solder it directly (the lacquer melts only when touched with a soldering iron).  I don’t really know the chemistry here so when you laser it or solder it, I don’t know how safe it is. I don’t see how much different it can be from the conformal coating you can buy. A bonus with Lacquer is that you can get lots of colors, though I recommend avoiding anything with glitter, pearl, or metal flakes in it.

Both nail polish and lacquer do allow multiple colors, but neither are designed for electronics. Here you can see the left board is almost 8 years old but has had its traces painted with clear nail polish for protection. The red board is from my previous article in 2021.

paint and lacquer

 

The best solution I’ve come up with is to mill or etch a circuit board, then export the pads layer of the design to an SVG. From here it can be cut by a laser or a vinyl cutting machine into Kapton tape. Once cut, the tape can be applied to the PCB and pressed down hard. Since kapton tape is heat resistant, it can withhold under a bit of soldering. It also has excellent electrical properties (resistance, capacitance, and inductance).  It is actually used for a substrate material for flexible electrical circuits.

UV Curable Dry Film Conformal Coating Nail Polish Lacquer Kapton Tape
Cheap

Availability

Safety

Designed for
Electronics

Ease of Use

Clean

Speed

Special Equipment

Ok, so Kapton tape wins. How do you cut and apply the kapton? We tried a couple of things and both worked.

Firstly, I told Garrett (who is taking FabAcademy in our lab this semester) about my idea and asked if he’d play with the kapton tape and the laser to find out what settings to use. He set about finding the best settings. He first used it to make a solderpaste stencil for his own project. Apparently on a 120 watt epilog, for the size holes we needed, about 6-7% power worked well.

We tried a couple of methods. First we placed the tape on cardboard, cut it, then peeled and stuck it to the PCB. This worked fine, but was a little tough to unstick and weed. This is likely the method I’ll use in the future though.

The second attempt we got cocky and just stuck the tape on the PCB and lasered it directly.

kapton1    kapton weeded

It is easier to line up with the cameras on the laser, but even when we placed the PCB directly under the camera (to avoid aberration of the fisheye lens) we still didn’t get the best alignment. It was good enough to solder though. You can see the finished product at the top of this page.

offset      stuffed1