This AddOhms episode is part 3 of the “design your own Arduino” series. In this one I populate a bare PCB, reflow solder it, debug a few issues, and load the Uno bootloader. Originally, I designed 2 versions of the board. One version contained an error that I planned to fix in the episode. Well, turns out, the “correct” board had two issues which were more interesting.

Check out the #27 show notes for links to a bunch of stuff in the episode, including the design files.

Watch on YouTube

Five Arduino math fixes for when it is wrong

Check these when your Arduino can’t math

Arduino Math

While the Arduino library does an excellent job of hiding some of C/C++’s warts, at the end of the day, it is still just C/C++. This fact causes a few non-intuitive issues for inexperienced programmers. When it looks like Arduino math is wrong, it is probably one of these reasons.

When people ask me for help with their programming, I check each of these Arduino math mistakes. If your code seems to be hitting a bug, check to make sure it is not how the compiler handles math.

Continue Reading »

Arduino EEPROM stores any datatype

.get() and .put() make saving floats easy

Arduino EEPROM Hero 1600px

Funny how a simple idea can spider out into multiple paths. Arduino EEPROM seemed like a straightforward concept. A few a years ago it was as easy as having either 512 or 1024 bytes of flash memory. The Arduino IDE offered an EEPROM library which let you read and write a single byte. Today, however, with many different processor architectures saving data to EEPROM varies. It is now possible to save any datatype to EEPROM but not on all boards and not all using the same method.

While programming an coin accepter sold by Adafruit on an AddOhms live stream, I discovered two “new” methods in the Arduino library. At least, these functions are new to me! A couple of years ago EEPROM.get() and EEPROM.put() appeared. Using these functions, you can store any datatype in EEPROM.

This post covers tidgets related to using Arduino EEPROM to store any value across multiple boards, or platforms. Specifically boards such as the Uno, Nano, Mega, and Zero are covered. Additionally Arduino-compatible boards from Espressif, PRJC, and Adafruit are covered as well.

Continue Reading »

Learn Six Oscilloscope Measurements with an Arduino DUT

Grab an Uno and learn how to use your scope!

Oscilloscope Measurements with RTM3004 Alternative

One of the best ways to learn how to use a new piece of test equipment is to use it. Sounds easy, right? The problem is, sometimes when you are in the middle of troubleshooting your circuit, figuring out what the knobs on your scope do is an immense frustration. Use these 6 oscilloscope measurements, and just an Arduino Uno, to learn how to use a new or unfamiliar digital scope.

This tutorial is not a step-by-step guide on how to make each of these measurements on a particular scope. Instead, it is a general explanation on how to setup the Arduino and a screenshot to help identify if you set up your scope correctly. I reference the R&S RTM3004. However, practically any two (or more) digital channel oscilloscope should work.

Between each measurement, I highly recommend using your scope’s default setup (or autoscale) before proceeding to the next one!

Continue Reading »

5 LDO Regulator Considerations other than voltage and current

A lesson in reading the data sheet

Pryamiduino R4 with LDO Regulator Disabled

For an AddOhms series, I created a DIY Arduino I am calling the “Pyramiduino.” It is an ATmega328p based board in the shape of a triangle. Other than being cute, the shape does not offer any other benefit. The design features a 3.3 volt LDO Regulator, which is also the subject of this post.

I forgot a fundamental aspect of design: read the freaking datasheet. The board’s LDO regulator was not turning on. Adding a passive scope probe to the circuit suddenly fixed the problem. The regulator turned on. When touching the enable pin, it measured about 1.25 volts.  While I am sure Rohde & Schwarz would like me to ship scope probe with each board, that was not an option. With the impractical fix in place, I got to thinking about that voltage level. I remembered that the datasheet mentioned about 1.2 volts was needed for the “HIGH” threshold. Which meant, 1.25 volts applied to the pin enabled an active low input. Not only that, I remember the datasheet clearly said it had a pull-down resistor built-in. What was going on?

Continue Reading »

Common question that comes up about pull-up resistors: what value do you pick and why not just use a piece of wire? In this follow-up electronics tutorial, the bald engineer looks at how to pick a pull-up resistor value. Note that while focused on pull-up everything said in this video would apply to pull-down as well.

If you’re new to pull-up resistors, check out this longer Pull-Up Resistor Tutorial.

Watch the full video

Oscilloscope Probes Primer – Why so many types?

Compare Passive, Active, High Voltage, and Current Probes

Oscilloscope Probes Primer

Unless you have a BNC or SMA connector your board, you will need a probe to get signals into an oscilloscope. Understanding what kind of oscilloscope probes are out there, which ones should you have for your scope and which ones to use for different measurements can be daunting. In this post, I look at some common scope probe types and offer some suggested measurements for each.

Special thanks to Rohde and Schwarz for providing the equipment used in this post. You can learn more about their scopes and probes at rohde-schwarz.com .

This post is not a comprehensive guide of oscilloscope probes. I am covering the types I have used. I do think this information should be enough to least form questions to ask your vendor before purchasing. Asking questions is important. If you have never bought specialized oscilloscope probes, you might not realize they can cost more than the scope itself. Maybe not an individual probe, but get one for each channel, and the cost rises. So picking the correct probe type is essential.

Continue Reading »

Autodesk released EAGLE 9. This new version continues the improvement that Autodesk has been providing since acquiring the infamous ECAD tool. There are three areas I look at in this AddOhms Livestream.

How I looked at EAGLE 9

In the beginning, I use an old training class I wrote about five years ago when I was using EAGLE daily. It shows how to design a 555 flashing circuit from schematic to PCB. A follow-on class taught how to mill the PCB on a Shopbot. I might update the course and release it if I have time. The exercise class helps me find some surprises with EAGLE’s incremental improvements.

After that, I check out three new features. I also looked at the “Design Blocks” stuff which is a way to incorporate completed schematics like the Adafruit PowerBoost circuit. I need to come back and look at that function again later. Also, I am not positive, but I think that feature was introduced before 9.

1. Quick Routing

The quick routing reminds of the old “follow me” option. You can select individual airwires, entire nets, or multiple signals to route interactively. Unlike the Autorouter, which routes the board as the whole. In the video, I build a simple 555-based PCB. I couldn’t try out routing multiple signals, like address and data for DDR memory. The value I see most from this feature is selectively routing your critical signals and then quick routing the remaining non-critical nets.

2. Device Manager

This informational window provides a clean break-down of many pieces of data. Need to know what layers a footprint use? How about the length of an entire net? In the video, I show that you can use this feature to verify all of your passive components have the same package style. The information is all there, Device Manager brings it to your attention.

3. Breakout

Spoiler Alert: I really like the Breakout Feature. (For those that say I don’t smile in videos, I did this time.) Long story short, this is a shortcut to expand all of the pins for an IC. A great example is in the AddOhms Pyramiduino DIY PCB episode. In the beginning, you can see my time lapse as I break out each of the GPIO pins. That can happen in EAGLE now with a single click.

Check it out

Have you had a chance to check out EAGLE 9 yet? If so, what are your thoughts?

Watch EAGLE 9 First Look on YouTube

IoT: Intelligent Outsourcing

How to delegate when producing an IoT product

Whether you are developing a WiFi-enabled coffee maker, a sensor to detect rainfall, or a livestock tracking drone, an IoT device will follow the same product development cycle.

IoT Design Flow

A common mistake that engineers will make is trying to own the development at each stage, at least up until “deliver.” Who can blame us? The idea of delegating any part of our new product introduction can be daunting. Delegating, or outsourcing can be a powerful tool. It allows you to focus on the elements of your process that only you can do. Let others handle the rest. If your core contribution is the machine learning algorithm, then focus your effort there. Spending time designing the enclosure, or negotiating with suppliers, or even laying out the printed circuit board is a waste. Let the people who excel in each of those areas apply their expertise to your product.

Production, or making, is the prominent point for outsourcing. It is common to work with a contract manufacturer to build your product. Some offer complete services that allow them to source your components, produce the product, package it, and drop ship it to your customer. This next statement might sound recursive, but consider outsourcing the step of finding someone to outsource manufacturing.

Let’s look at the Idea, Design, and Source stages for a typical IoT device. At each of these steps, I give some pointers to help identify what you should focus on and what you can delegate to a third-party, as well as, introduce you to a partner to consider.

Continue Reading »

DIY Arduino PCB Pryamiduino (Video)

Addohms video on making a KiCad Triangle.

Pyramiduino KiCad PCB Desgin

Continuing the DIY Arduino tutorial series, this AddOhms episode shows how to create a PCB in KiCad. I make a joke that the original design was a rectangle, which I found boring and pointless. So instead, I designed a triangle to give the board 3 points. Get it? Puns! I am calling it the Pryamiduino. To be honest, I found not having a constraint to be a problem. By forcing a specific board size and shape, many decisions were more manageable.

boring rectangular arduino nano clone

First design – Boring!

In the end, the video ended up more edited than I planned. KiCad is just so finicky and crashy that I could not make a coherent start to finish tutorial. At least, I could not work with a board at this level of complexity. Something simple like a 555 flasher would be easier to show from start to finish. I am planning some immediate follow-ups with quick tips on using KiCad. It is a frustrating suite of applications, but the results can be quite nice.

AddOhms Pyramiduino Show Notes

Continue Reading »