Baldengineer’s Projects Overview

open_vapors_125px

Open Vapors: OSH Toaster Oven Controller

quadcopter_125px

Quadrotor: Quadcopter from Scratch

mso_demoboard_scope_125px

MSO Demo Board: For DS1052D

binboo_1_125px

BinBoo: Binary Clock

IMG_3165

Accurate RTC Shield: Based on DS3231

msgeq7_250px

MSGEQ7: Simple Audio Spectrum Analyzer

8x6_matrix_250px

8×6 LED Matrix Shield

Raspberry Pi Soft Power Controller – The Circuit

Part 1 Control Rasp Pi power with an Arduino-based controller

The RetroPie project enables retro-gaming with a Raspberry Pi. All of the Pi models have enough computing power to emulate the major 8-bit and 16-bit computers of the 80s and 90s. With the Pi 3 I have even been able to play PS1 games with no problem. My current project is to put my Raspberry Pi running RetroPie into an old Super Famicom (SFC), or SNES, case. The catch? I want the original SPST power switch to work. And by work, I mean allow the Raspberry Pi to shutdown properly when the switch goes into the off position.  To accomplish this task, I am building a Raspberry Pi soft power controller.

Raspberry Pi Soft Power Block Diagram

Here’s a block diagram of the power controller. The basic blocks in a Raspberry Pi soft power controller include the LDO, a switching supply for the Pi, an AVR-based microcontroller, and the Raspberry Pi. This post will describe each of these hardware blocks.

One design objective was to draw as little current as possible when off. For my RetroPie, I will not be running on battery. However, I do not like the idea of wasting energy when something is turned “OFF.”

This overview is a multi-post write-up. This first part is on the hardware. In the next post, I will explain the AVR’s firmware. Later, I will come back to the Raspberry Pi side of the project.

Last week’s post was on Project Sharing Sites. I’m using two for this project. Hackaday.io will host the build log while GitHub has all of the design files. And by all of the file I mean the schematics, firmware, laser cutter files (soon), and Raspberry Pi code.

Hackaday.io Project Page  GitHub Repo

Continue Reading »

3 Way Camera Shoe

Thingiverse.com
17-JUL-2016

DSLR Shoe AdapterWhen recording videos for either baldengineer.com or, more often, AddOhms, I need at least two things attached to my camera. I used a Canon T5i. The two devices I need to have connected are a shotgun microphone and a wireless receiver. In the past, I just let the remote’s wireless receiver dangle. That really bothered me.

I’m still surprised this DSLR shoe adapter didn’t already exist on Thingiverse. Anyway, I created one. Head over to Thingiverse to download it.

Proper Larson Scanner with Software PWM (Repost)

Add some persistence and use more Arduino pins

proper larson scanner

Last week I had a detailed Arduino tutorial on software pulse width modulation using millis() and micros(). Why? Because I wanted to create a Proper Larson Scanner, with persistence and at least 8 LEDs.

KITT larson scanner example

From Amazon

Even though it is a popular project for the Arduino Uno, most Larson scanner tutorials, like my first one, have a few flaws. First, there is no persistence, or tail, to the LED as it moves back and forth. Persistence could be solved by using pulse-width-modulation. The Uno and other 328p-based micros only have 6 Pulse Width Modulation (PWM) pins. And let’s be honest, every project is made better by adding more LEDs. 🙂

If you look at this cover shot of KITT from Knight Rider you will see there isn’t just a single light source. It appears multiple lights are turned on, as well as fading effect. This fading effect creates a tail. Of course, the reason is probably that standard light bulbs were being used back in the 80s. Traditional light bulbs don’t turn on or off nearly as fast as LEDs.

Presenting the Proper Larson Scanner

Knowing that a popular Halloween hack is to add Cylon (or KITT) lights to your pumpkins, I thought it was time for a Proper Larson Scanner. This code example does a couple of important things.

  1. It implements my “software pulse width modulation.”
  2. Can be used on all 20 I/O pins of an Uno (or other 328p Arduino)
  3. Does not use any delay()s!

So if you want to make your pumpkin even more Cylon-like this Halloween, check out this full tutorial on a proper Larson scanner.

Continue Reading »

Arduino Software PWM with millis()

Use pulse width modulation on any Arduino pin

software PWM code example line by line

The Arduino Uno has six pins dedicated to Pulse Width Modulation (PWM). PWM is great for analog-like control for the speed of motors or LED fading. But what if you want to control more than 6 devices? Or what if you’re using the PWM pins to control servo motors, but still want to fade an LED on a 7th pin?

One option is to change boards and processors. For example, you could move up to the Arduino Mega 2560. That means a bigger board and more cost.

Using millis() and micros(), it is possible to do PWM entirely in software. The best part is; if you can set the pin to OUTPUT, you can use this technique.

This tutorial will explain how you can use micros() and millis() to get more PWM pins on an Arduino Uno, Nano, or Pro Mini. It will probably work on other boards and processor types, but I haven’t tested them yet.

There’s a reason I needed this software PWM code. Subscribe to the mailing list, RSS feed, or follow me on social media to see why next week…

Apologies to the email subscribers if the code isn’t formatted correctly. Click here to read the full post.

Continue Reading »

Corner Case: 90-deg turns for WS2812

josh.com
NeoCorner from josh.com

NeoCorner from josh.com

If you’re working with the WS2812B and need to turn corners, you’ll want to check out this NeoPixel Corner adapter PCB from josh.com. It’s a pretty simple board. I came across it as a solution for an upcoming lighting project.

In josh’s example, he used a CNC to mill the PCBs. If you’re using one-sided FR4, that might work well. You’ll want to double-check thicknesses if you want to use OSHPark or similar.

You can check out the full write-up here or the NeoPixel Corner Board project GitHub.

On a related link, this document explains differences between WS2812 and WS2812B.

PCB Checklist – What to check before you submit

PCB Checklist Banner

Recently I’ve been expanding my retro game collection to include game cartridges imported from Japan. The problem is that I don’t have Japanese game systems (yet). So I’m creating an open source adapter to convert Famicom carts to the NES. Before I submit the PCB to OSH Park, I’m going to run through this PCB Checklist to make sure I don’t forget something silly.

This PCB checklist is something I’ve built over my years of creating boards. If you’ve got tips from your own list, don’t forget to leave a comment letting us know.

PCB Production Checklist

The concepts on this list will apply to almost any PCB software. The tips I give relate to EAGLE, since that is what I use most often. Feel free to comment to add tips for other design software like upverter.com or KiCad.

Keep reading to see the list.

Make sure you also check out the comments, some really great suggestions there too!

Continue Reading »

Never trust an autorouter

I am not a fan of relying on the Autorouter in EAGLE — or any PCB CAD software for that matter. When laying out a board, I’ll use the autorouter to get an idea if the part placement is going to work or not. In this case, I was reminded how much autorouters suck! Even after running for while, the autorouter could only route up 50% of the nets (signals).

Never Trust The Autorouter

As Chris Gammell‘s T-Shirt Says, Never Trust The Autorouter.

It only took me about 20 minutes to start over and finish the manual layout. I still want to clean it up a little, but over all, I beat the Autorouter.

What is the board anyway?

In January I visited Tokyo on my annual work trip. While there, I ran over to Akihabara to check out a used media store called Traders. The multi-level store (like all those in Tokyo) sold used video games and movies. Each floor featured different platforms. My favorite was the 2nd floor which was all retro 8, 16, and 32 bit systems. Piles of Famicoms (NES), Super Famicoms (SNES), Mega Drives (Genesis), and other systems were all around. In the middle of the floor were racks of cartridges.

While there I picked up a couple of Rockman (Mega Man) carts, Super Mario brothers, and even Adventure island.

A US-based NES can play Famicom games since the basic hardware is the same. However, the pin outs are slightly different. Also, US-based NES systems look for a lock-out ship (CIC) that Famicoms don’t have. Fortunately I ran across a project that uses the ATtiny (AVRCICZZ) to emulate the lockout chip. So armed with that and some pinouts, I’ve created an adapter.

Keep subscribed, after a few more touches, I’ll post the EAGLE files as an Open Source Hardware (OSH) project.

An example of when comments would have helped

What was one of the first things you were taught, when learning to program?  “Comment Your Code!”  And of course, like all programming students, you ignored that advice.  Or, if you are like me, you made vague comments as the lines of “variable called var.”

Tonight I opened up some code I haven’t touched in two years.  Code that when I wrote it, made perfect sense to me… at the time.

The code was for my binary clock project, BinBoo.  So I need your help, check out the code below and see if you can help me remember what it does!

Continue Reading »

Learn how to use a Mixed Signal Oscilloscope

When I teach the Electronics Measurements class at the TechShop in Austin, I take a lot of pride in showing off the Mixed-Signal Oscilloscope.  We have a Rigol DS1102D as well as a standard DSO.  To help illustrate the power of the combined digital and analog channels, I  created a Mixed Signal Oscilloscope Demo Board, based on a counter,  that has an issue that could be turned on or off.  This board is also my first time making use of OSH Park’s PCB service.

Continue Reading »