Sunday, March 14th 2021
I recently purchased a special USB cable from Amazon. This cable has a standard USB Type A connector on one end (PC side). On the other end is a GX12-4 Aviator connector. Included with the cable are several little "pigtails" for different USB connectors (USB Type C, Micro Type A and Mini Type A). This allows you to switch out the end without having to reach around to the back of your computer and unplug and plug in a different cable. I find this really convenient for working with different Arduinos and other development boards. It looked like all of my needs were met, until I pulled out my original Arduino Uno (uses a Type B). So I decided to make my own "pigtail."
I purchased some GX12-4 aviator panel mount connector pairs. I went with the panel mount version, because they're much cheaper than a complete weather tight connector pair like featured on the cable itself. Since we only need the male end of the connector this is perfect. I grabbed a spare USB Type B cable, I had laying around. I hacked off one end. I found a pinout online and verified the wire colors. I then toned out the pinout of the new cable. I made some notes. Soldered everything together. Plugged it in and... nothing worked! Turns out I had everything backwards. Luckily no damage to my computer's USB port. After reversing everything it worked like a charm. I made sure to program a board over the new pigtail to be sure. So there you have it my latest mini-maker project. I hope this inspires or helps you. See you next time!
Monday, March 1st 2021
Making more progress on my on-going marco keyboard project. I'm building a programmable macro pad. My overall goal is to be able to load configs from an SD card. Then give the user a way of selecting a config file from a menu on a OLED display. Well we're almost there. This weekend I wrote some code to allow the user to browse the root of an SD card. When the device is booted up, it will scan the directory of the root and load the filenames into an array. The user can cycle through the list to find the file they want to use. When they reach the bottom the list repeats. For a bonus I loaded the keyboard library and when you press a button the contents of the selected file is written out to the keyboard buffer. Even large files seem to work. This is due to the buffering nature of the file IO class. Feel free to download my code from GitHub!
Tags: development, electronics
Saturday, February 20th 2021
I've been working on a larger project. Which I hope to post on here in the coming weeks. I find that sometimes it best to break projects into smaller pieces. Little milestones make bigger projects flow a lot better. The enclosure for my new project requires a holder for OLED display. I've never modeled anything like this before. So I decided to do a small project out of modeling a holder for it. Here we are now. I present to you my holder for a 128 x 32 OLED display.
I used TinkerCAD to create this model. It's a fairly simple concept with a hidden feature. More about that in a minute. The model consists of two prints, the holder body and bezel. The OLED display I'm using is a 128 x 32 sized display. It uses a I2C connection which requires four pins. Here's where the hidden feature comes in. I wanted to keep the holder a modular as possible. In the sense that the display could be easily pulled out and reused if needed. In order to that I had to come up with a design that kept the OLED display as stock as possible.
On the back of the display I soldered a standard breadboard friendly header. This allows me to plug this directly into a breadboard if I wanted to experiment with it. This got me thinking. What if I could make some sort of socket that allowed me to plug the display in and remove it as needed? Then it hit me. I could use female headers like on a Arudino board. To keep it simple, I used premade female dupont wires. All you have to do is push the four dupont connectors from the back of the holder. I modeled the rectangular hole with a fairly tight tolerance. This forms a friction fit. Then you can install the display from the front. Slide the bezel into the front of the holder and you're done.
If you would like to download and print this model for yourself then click the link below. I'm looking forward to doing more projects like this. Keep an eye on this space!
Tags: 3d-printing, electronics, soldering, thingiverse, tinkercad
Tuesday, February 16th 2021
Soldering header pins on a development boards can be a pain. But it doesn't have to be. Here's a little trick I wish someone had shown me earlier. Simply place the headers on a empty breadboard. Then put your development board on the pins. Carefully solder the first and last end of the pin of the header. If you're using an older breadboard you're not concerned with messing up, go ahead and solder the rest of the pins. If not, remove the the board and finish soldering the header on away from the breadboard. This is so much easier than other methods I've tried to used in the past. I hope this makes your soldering experience a little better. Enjoy!
Wednesday, February 3rd 2021
I came across this neat tip the other day. I needed to capture some text from the command line in Windows. Usually I would just pipe (cmd > filename.txt) the results of whatever command I'm running into a text file. Then I would open the text file afterwards and copy/paste it wherever I needed it. I figured there had to be a more direct way. It turns out, I was correct. Enter "clip.exe" a built in utility that will allow you to pipe command line output directly to your clipboard. So how do you use it? It's really simple. Say for example you need a list of files in a directory. You could run the following and presto it's in your clipboard. Replace dir with whatever command line application you want to capture input from. Run it and copy/paste to your heart's content.
dir | clip
Apparently this has been around in some form or fashion since WIndows 98. It became a regular built in utility in Windows Vista. Not sure why I'm just now finding this out. There are similar tools (xclip) in linux as well. Happy scripting!
Categories: Quick Tips