House of Hacks: Digital
Showing posts with label Digital. Show all posts
Showing posts with label Digital. Show all posts

Friday, June 12, 2020

How to make a binary clock: design

Description

Want to make an Arduino project a bit more complicated than blink? In today's episode of House of Hacks, Harley starts a project on how to make a binary clock. This project will use an Arduino and be presented in multiple parts. Today, the first part will be the overall requirements and design. In future videos, the software, circuit and finishing it off with an enclosure will be covered.

Resources

  • All the information to make this project: https://www.house-of-hacks.com/p/arduino-project-binary-clock.html
  • If you just want to buy one: https://amzn.to/3eGXFVD (Amazon affiliate link)
  • Get a digital version of the new Arduino poster by signing up for the House of Hacks newsletter: https://list-optin.house-of-hacks.com/arduino
  • Or a printed copy of the poster can be bought on the House of Hacks store: http://store.house-of-hacks.com

Contents

  • 0:00 Project introduction
  • 0:59 Welcome and about House of Hacks
  • 1:19 Description of BCD
  • 2:14 BCD for binary clocks
  • 3:05 Project requirements
  • 4:02 Controlling the LEDs
  • 5:45 Tracking the time
  • 6:18 Adjusting the time
  • 7:23 Arduino selection

About

Here at House of Hacks we do tutorials, project overviews, tool reviews and more related to making things around the home and shop. Generally this involves wood and metal working, electronics, photography and other similar things. If this sounds interesting to you, you may subscribe here.

If you’re interested in learning more about the House of Hacks' values, here’s a playlist for you.

And here’s the most recent video.

For a written transcript, go to How to make a binary clock

Here's a list of the tools I use.

Music under Creative Commons License By Attribution 4.0 by Kevin MacLeod at http://incompetech.com.
Intro/Exit: "Hot Swing"

Transcript

A number of years ago, at a software conference, one of the evening activities as an outing to a hands-on science museum.

While there, I noticed and picked up this binary clock.

It uses something called BCD encoding and I thought it'd be kind of cool to make my own version of this as a project.

Technically, it could be done with some simple logic circuits and a timer.

But this would involve more hardware design and wiring than I wanted to be involved with and so I'm going to go the easy route and use an Arduino.

This is going to be done in four parts.

Part one today is the basic requirements and design.

Than as I'm waiting for parts to come in, I'll go over the software design and how to actually do some testing without having a complete circuit finished.

The third video I'll assemble all the circuits and get it running.

And then the fourth video will be creating an enclosure for it.

Welcome to the House of Hacks. If we’re just meeting, I’m Harley and I make stuff out a variety of materials.

For example, in this project, we're doing design discussions, and software and electronics and mixed media for the enclosure.

If making a things out of a variety of materials in the workshop is something that's your thing, consider subscribing and you won’t miss future episodes.

BCD is an acronym for Binary Coded Decimal and this was an encoding system that IBM came up with nearly a 100 years ago in the 1920s for use in their early mechanical devices.

As early computers came on the scene, they took this basic coding that they used and expanded upon it to use in the computers.

It was called EBCDIC at the time and was actually used until relatively recently.

Interestingly, early in my career, I had to write an ASCII to EBCDIC conversion routine for use by our business partners.

Before going to the whiteboard, a couple notes.

First, the code and schematics for this project, is available for free download off of GitHub.

And second, a commercial version of this clock, kind of like the one that I picked up at the conference, as well as all the materials I'm using in the project are available on Amazon. I’ll leave links for everything down in the description below.

In BCD, each column represents a decimal digit, coded in binary. The first column is the tens digit for the hours, the second is the units column for the hours. Next, we have the tens and units digits for the minutes and the tens and units digits for the seconds.

In decimal, we need four bits to cover the all digits 0-9 in binary. So all the units columns on the LEDs have four LEDs. Because on a clock, none of the tens digits go all the way to 9, we don’t need a full 4 bits for each of the tens columns. Hours for example only go to 2, so we only need 2 bits for a 24 hour clock. The minutes and seconds only go to five so we only need three bits for those.

So, to make this, what are our requirements?

For the LEDs, we have 3 groups of 4 and 2 groups of 3 for a total of 18 and another 2 for a total of 20 LEDs that we need to control.

Second, we need a way of keeping track of the time.

Third, we need a way to set the time.

I’ll talk about all these requirements in detail but first I’m excited to announce that I’m working on some Arduino training materials. I have an Arduino reference poster available now and am working on a book for people new to digital electronics and programming the Arduino. A digital version of the poster is available by just signing up to the House of Hacks mailing list where I’ll keep you updated on things happening here. I won’t bombard your email with a bunch of stuff. Just occasional updates when products are released and an occasional news item that I think you might find interesting related to making things. If you’re interested in this, there’s a link below in the description below.

Now, back to the design...

Looking at controlling the LEDs, my first inclination was to think about this as a single string of 20 bits where each digit in each group was put inline with the rest of the bits. The common way of working with large numbers of LEDs is to use a '595 based shift register. This only requires three pins on the Arduino but provides a number of digital outputs. This is so commonly used that there’s a shiftOut command built into the Arduino ecosystem. ‘595 chips typically only work with 8 bits (although there are variants that have more bits) but they can be daisy chained together so you can have an almost arbitrary number of digital outputs, all controlled by only three pins.

Since there’s 20 bits needed and each ‘595 provides 8 bits, I thought about using three shift registers, daisy chained together. This would give 8 times 3, or 24, bits. The first 20 bits would be used and the last 4 bits would be ignored.

I coded up a prototype sketch using this idea but it ended up being more messy than I really liked. All the code was one big blob with a bunch of dependencies spread throughout the whole thing. Some of that mess could be cleaned up with some refactoring, but it was still going to be more messy than I really liked.

Upon reflection, I realized each group of two numbers only needs at most 7 bits and I have three groups. For the purposes of this project, I could still use the three ‘595s but instead of daisy chaining them together, I could connect each one to the Arduino directly. This would help make the code cleaner. Each ‘595 needs three pins, so that’d be a total of 9 pins for the LEDs instead of 3. Let’s look at the rest of the requirements and see if there are enough pins.

To track time, the most reliable would be to use a clock module. A real time clock module, also called an RTC, is designed to interface with micro controllers and has it’s own battery backup. There are a number of different models. I selected to use a DS1307 because they can be had inexpensively and communicate with the Arduino using only three pins over the I2C bus.

It would also be possible to use the Arduino itself to track the time although I’m not to sure how accurate that would be. It would provide a software only solution though.

Finally, we need a way to set the time.

The commercial unit I have uses two buttons. One increases the hour each time it’s pressed. The other increases the minute each time it’s pressed and if they’re both pressed at the same time, the seconds are increased.

This could work, but I don’t have any good buttons that’d be appropriate for mounting in an enclosure and, in my spare parts bin, I have a rotary encoder.

Rotary encoders come in different styles. This particular one allows the user to spin it in either direction without any limits. It can also be pressed to indicate an event. The micro controller can detect which direction it’s turned and take appropriate action.

I think this would be easier to make accessible to the user in the enclosure, so I’m going to use it. It uses two pins to the Arduino to communicate the rotary action and one pin to communicate being pressed.

So, all in all, I’m looking at using 9 pins for the three ‘595s, 2 pins for the clock module and 3 pins for the rotary encoder. A total of 14 pins.

Since I want to keep this pretty compact, I’m going to select the Arduino Micro. It’s only about 2 inches long and about 3/4 inch wide and designed to go in breadboards and pre-made circuit boards with standard hole spacing. And it has 18 digital I/O pins. Four more than then 14 that we need.

I think it should work well.

So, I’ll go order the parts and, while waiting for them, I'll show you the software in this video.

If that video hasn’t been released yet, I’ll see you in this other video where I do an Arduino project simulating wind to make wind chimes sound indoors.

After watching that, go make something.

Perfection isn't required. Fun is!

Monday, February 13, 2017

How to Make a Digital Valentine's Day Card


Description

Valentine's Day is tomorrow. Here's how to make a digital card to capture the heart of your sweetie. Well, OK, that might be overstating things a bit, but Harley does show an algorithmic way using trigonometry to generate a beating heart animation in an easy to use programming environment called Processing. This was inspired by a video LeiosOS posted last week.

The original inspiration: LeiosOS: Drawing a heart
Wolfram algorithm site: Heart shaped graphs

For a written transcript, go to How to Make A Digital Valentine's Day Card

Music and special effects under Creative Commons License By Attribution 3.0
Intro/Exit: "Hot Swing" by Kevin MacLeod at http://incompetech.com
Incidental: “Carefree” by Kevin MacLeod at http://incompetech.com

livingroom_light_switch by AlienXXX at http://freesound.com

Transcript

Today at the House of Hacks we're going to make a high-tech Valentine's Day greeting.

[Music]

Hi Makers, Builders and Do-it-yourselfers. Harley here.

I recently ran across a new-to-me programming channel who's name I won't even begin to try to pronounce but I will link to in the cards and description below.

He did a video about drawing a heart where he used a bit of C code and his own graphics library.

I want to take his idea, expand a bit on why it works and show how to use the Processing programming environment to do the same thing.

First let's look at generating shapes...

Many people get overwhelmed by the thought of trigonometry with its sine and cosine, angles and other related things, but at its core, it’s really pretty simple.

Remember the old cartesian graph from math class?

It had an x-axis and a y-axis and points could be located on this graph using just two coordinates.

On this graph, let’s draw a circle with its center at the origin with a radius of one.

Now, let’s imagine a line starting at the origin and going through the circle.

We can draw this line at any angle from the x axis.

If it is on the axis it will be 0 degrees.

Regardless of where we draw it, it’s going to intersect the circle at only one place.

That one place will have an x and y coordinate that, by definition, is the value of the cosine and sine functions at that angle.

So, for 0 degrees, the place where the circle intersects the x-axis, cosine will be 1 and sine will be 0.

As the angle increases, the x value decreases and the y value increases until we get to 90 degrees.

This lies on the y axis where cosine is 0 and sine is 1.

As the angle continues to increase, the x and y values continue to change, always between 0 and 1, always on the circle.

And that’s the fundamental theory behind trigonometry, everything else is derived from this.

Now let’s plot these points a bit differently.

On the x axis, let’s plot the angle and on the y axis, let’s plot of value of sine remembering that sine is the y value on our original circle.

At 0 degrees, sine is 0 so we start at the origin.

As the angle increases, sine increases until we get to 90 degrees and reach 1, then it starts decreasing as we move into the second quadrant of the circle.

At 180 degrees sine is back to 0.

As the angle continues to increase, the y coordinate of our circle drops into the negative values in the third quadrant until it reaches -1 at 270 degrees.

Finally in the fourth quadrant, we see y coming back up to 0.

After this, the cycle simple repeats itself as higher angles are duplicates of the previous angles.

Now, doing the same thing with cosine, at 0 degrees, cosine is 1 since it represents the x value on the circle.

As the angle increases, x decreases to 0 at 90 degrees, -1 at 180, back up to 0 at 270 and finally 1 at 360 degrees, the place we started.

These functions are great for describing a lot of things that are periodic in nature, things that fluctuate between two values.

If we multiply the results of sine or cosine we can make these graphs fluctuate by a different amount.

For example, here’s the result of multiplying the sine by 2.

And if we multiply the angle by a value, the frequency of the fluctuation will increase or decrease.

Here’s what it looks like if we multiply the angle by two.

Things can get really wild if we start adding these two curves together.

Or subtracting them.

Or multiplying them.

Or doing anything else really.

Sines and Cosines are the basis for a lot of things in our modern world.

Today we’re going to see how they can be used to send a message to our sweetheart.

Processing is a programming environment that was developed about 15 years ago and designed to teach the basics of programming within a visual context.

Since it was designed with a visual context in mind, it’s great for experimenting with graphics and drawing things.

The Processing.org website has free installers for Windows, Linux and Macs.

Just download the installer and run it.

This gives us a a Processing environment that, once started, we can start writing programs in.

Let's look at a simple program to draw a circle.

We first define the size of our canvas, the color of our background and the color we want to draw in.

Then we’re going to define a variable to scale our circle by and an offset for the x and y coordinates.

These are needed because sine and cosine return values around the cartesian origin but the coordinate system of the Processing screen is based with 0,0 in the upper left corner of the canvas.

Then we’re going to define a loop from 0 to twice PI, going in small increments.

We used twice PI here because in computers cosine and sine typically use what are called radians instead of degrees as their inputs.

This is just fine though because there’s a one to one mapping between degrees and radians where PI is 180 degrees and two PI is 360 degrees.

Inside the loop we set x to the cosine value of the loop variable and y to the sine value of the loop variable.

Then we’re simply going to plot that point, offset and scaled by the previously defined values.

Let's save our work at this point.

When we press the arrow button in the top tool bar, our program runs and we get this nice circle.

Now that we have the basics of creating a circle, how’s this help us with our Valentine Day project?

A web search for “heart drawing formula” leads us to the Wolfram site that has a number of different formulas for drawing a heart shape.

The sixth one in particular lends itself well to the program we have for drawing a circle.

All we have to do is change the assignments to x and y to get something that looks like a heart.

One of the cool things about the Processing environment is it works well for animating things.

If we put the statements before the loop in a function called setup they will get called one time when we run our program.

Then if we put the loop inside a method called draw, it will get continually called over and over again.

But because we’re drawing the same thing over and over, it's not going to be too exciting.

So before running this, let's add a line to change the scaling each time the draw method is called and adjust a control parameter to keep the scale between a couple values.

Finally, move the background call from setup into draw so it happens every time draw is called. This will clear our canvas each time.

Now let’s run this.

Ah, a nice beating heart.

This is cool and all, but it’s hard to show our special someone.

By adding a line to the end of our draw method, we can tell Processing to save our drawing to a file.

Now let's run this for a little bit, stop it and go look at where we saved our program.

We can see a bunch of individual snapshots of each frame of our animation.

In one last step, we can go to Processing’s Tools menu and select Movie Maker.

It gives us a dialog where we can select the directory containing the shots of our animations and press the Create Movie button.

This compiles our individual images into a MOV file that we can e-mail to our intended.

[Music]

If this is your first time here at House of Hacks: Welcome, I’m glad you’re here and would love to have you subscribe.

I believe everyone has a God-given creative spark.

Sometimes this manifests through making things with a mechanical and technical bent.

Through this channel I hope to inspire, educate and encourage these types of makers in their creative endeavors.

Usually this involves various physical media like wood, metal, electronics, photography but sometimes other things, like programming.

If this sounds interesting to you, go ahead and subscribe and I’ll see you again in the next video.

Now, go make something. Perfection’s not required. Fun is!

Monday, September 12, 2016

Tool Review: PEC Electronic Digital Calipers


Description

In this House of Hacks episode, Harley presents a short overview review of the PEC Electronic Digital Calipers (Model: #8000-F06). These inexpensive digital calipers have turned out to be surprisingly useful around the home workshop.

Assorted digital calipers on Amazon: (Affiliate link)
PEC 0~6" Electronic Digital Fractional Caliper - Model: #8000-F06: (Affiliate link)
357 batteries: (Affiliate link)

Example of using digital calipers mounted to a tool

For a written transcript, go to Tool Review: PEC Electronic Digital Calipers

Music under Creative Commons License By Attribution 3.0.
Intro/Exit: "Hot Swing" by Kevin MacLeod at http://incompetech.com
Sound effect: living-room-light-switch by alienxxx at http://freesound.org

Transcript

Today at the House of Hacks, I’m going to talk about an impulse purchase I made several years ago that’s turned out to be one of the most used tools in my workshop.

[Intro]

Hi Makers, Builders and Do-it-yourselfers. Harley here.

A number of years ago I had an Amazon order that I needed to fill out to get free shipping on. So I ended up purchasing one of these inexpensive digital calipers. It was just an impulse purchase. I figured it’s cheap enough that if I never use it or I don’t like it, no great loss.

As it turned out, this little thing has… I use it on almost every project. It measures up to six inches and anything under six inches I’m pretty much using this to measure with.

It’s just really, really handy.

There’s a whole bunch of these on Amazon. This one I picked up for around 37 or so dollars. It’s one of the more expensive ones. I’ve seen them on, just searching before this video, I was searching and saw them for under ten dollars. They’re so inexpensive, I’ve seen people buy them new, cut them up to use the measuring device in things like jigs and things like that. So, they’re really inexpensive for whatever purpose you want to use them for. Like I said, I use them for almost every project whenever I need to measure things.

They’re great for measuring outside measurements using these big calipers. Using the smaller inside calipers you can measure inside measurements. And on the end you can measure depth.

They have a zero button on them so you can zero it out. You either close the jaws, zero it out and then you get an accurate measurement. Or, you can use it to get the difference between two measurements. Take one measurement, zero it out, take another measurement and that gives you the difference between the two sizes. That can be really handy.

And it’s also good for transferring distances. You can use the ends, they are sharp so you can scribe a little bit. Measure one thing and then use it to scribe.

It does have an on/off switch which doesn’t really work all that well. All it does is turn on and off the LCD display which really doesn’t draw much power. If you’re going to leave these sitting around unused for a week, you really should take the battery out and that’ll give you much longer battery life on it.

That said, the batteries are 357 button cells. Little things that you can get at Walmart, Target, places like that for a couple bucks a piece. They’re much cheaper on Amazon if you buy them in bulk. So I recommend buying them on Amazon because I think they’re less than a dollar a piece whereas the cheapest I’ve found locally is like a buck fifty, two bucks, something like that.

They have a units switch that switches between millimeters, inches as decimal and inches as fractions. So that can be handy depending on what it is you’re measuring and you’re comparing it to other things and what units you’re most comfortable with.

The device also came with a plastic carrying case. Just kind of inexpensive, but it does protect it. And inside it has a foam cutout for the calipers and two places for batteries. So if you’re carrying it around, that kind of protects it and keeps it from getting beat up.

A really, really handy device. I really recommend getting one.

So that’s it for today. I’ll leave a link down in the description for an affiliate link if you’re interested in helping support the channel.

Until next time, go make something. Perfection’s not required. Fun is!

Saturday, February 21, 2015

How to easily read a histogram


Description

The camera’s histogram can be intimidating if you don't understand it, but it's actually really simple. In the first of a short series, Harley introduces this powerful tool to facilitate photographers' quests for the perfect exposure.

For a written transcript, go to How to easily read a histogram

Music and sound effects under Creative Commons License By Attribution 3.0.
Intro/Exit: "Hot Swing" by Kevin MacLeod

Photo credits for Creative Commons license 2
Illusive Photography: Photo
Alessandro Valli: Photo

Sound effects credits for Creative Commons license 3
fasten: Slide projector
VlatkoBlazek: Mechanical Whirring
leosalom: Fire

Transcript


[Click]

Besides the basic controls for making an image, I find the histogram to be one of the most used features of my digital camera. Today at the House of Hacks I'm going to explain what it is and the meaning of what it shows.

[Music]

Occasionally I work with people in photography related teaching situations. Many times I've found individuals trying to evaluate an exposure based on the preview image on the back of their screen.

This is a really bad idea. Chimping is great to evaluate the composition and relative exposure but there are many factors that control how the image is displayed that make it a poor representation of the actual exposure.

The histogram is a powerful tool in the photographer's arsenal to evaluate an image for proper exposure. And it's one of the few features that can't be duplicated on a film camera.

The closest we can get in the film world is an exposure meter. But in the digital world, the histogram provides a whole lot more information. In this episode, my goal is to explain the basics of what the histogram is and the meaning of what it shows.

In future episodes I plan to show how to use it when making an image. They'll be added to this playlist when they're posted.

Simply, the histogram is a chart showing the various brightness levels of an image. The left side of the x-axis represents black and the right side represents white. The values in between are levels of gray from dark to light. The y-axis represents how much of the image is at each value on the x-axis.

Let's look at some simple examples. To make things a bit easier, let's visit an alternate universe.

[Finger snap]

In this world, things are much more pixelated with higher contrast and fewer colors so our histograms can be smaller. When the sun goes down everything goes to black and white and a couple shades of grey.

Here's a nighttime image. Let's construct a histogram for it. First, we'll draw the x- and y- axes.

Since our image only has four values, black, white, dark grey and light grey, the x-axis has four points.

First we count the number of black pixels. Then we draw a bar that high.

Then we count the number of dark grey pixels and draw a bar that high.

We continue the same process with light grey and white.

And there we have it. A histogram for this image.

Let's change the image a little... and see how it changes the histogram.

More grey in the image increases the grey column of the histogram and decreases the white side.

Here is the same scene during day... with it's histogram.

A color image can be treated as a black and white image, with many shades of grey.

In this case, the histogram just has more grey levels on the x-axix.

Let's look at a couple generated images to get an intuitive feel for how the image impacts the histogram.

Previously I've shown simplified histograms with just the number of items on the grey scale x-axis as there are in the image. From now on, the histograms will be configured to have 256 values on the x-axis from black to white.

This black and white image gives us two bars in just the black and white columns on the two edges.

This black and white image gives us the same histogram because the relative amount of black and white portions of the image are the same.

It doesn't matter how we divide this up, as long as we have the same number of black and white pixels, the histogram remains the same.

Similarly, if we have this black and white image with one-third of the image white and two-thirds black, we can see the black side is twice the size as the white because we have twice the number of black pixels.

And again, we can divide those pixels up anyway we want, but the histogram doesn't change.

Now let's look at this gradient image.

Its histogram is a straight light.

Does this surprise you?

If we look at the image, we have a black band and a white band and all these grey bands that are the same size. So the graph reflects this with a straight line.

If we move the black and white start points, then the histogram will have taller ends with a dip in the middle.

But if we move the black and white start points off the image, then the histogram will shorten on the ends and rise in the middle.

[Finger snap]

And the default histogram on your camera works exactly the same way. Each image is treated as black and white and then the histogram constructed from that.

I don't know about all cameras, but all my Canons have two types of histograms: luminance and RGB. The luminance histogram is a single chart that shows the combined luminance values for the overall image. The same thing as what we’ve been looking at here.

The RGB histograms work exactly the same way except there are three charts showing the intensity in each of the color channels.

The default is to show the luminance but it can e changed to the RGB histogram by changing a custom setting in the menus.

This can be useful in situations where you have colored lights or part of your image that is more predominant in one color than the others. In these cases, one channel might become overexposed but it won't be obvious in the luminance histogram. However, when you change to the RGB histogram it becomes quite obvious.

And that's how you read a histogram. The left side shows how much black you have and the right says how much white you have and everything in the middle indicates shade of grey.

In future episodes I plan to show how to use this information while making an image and what it means to shoot to the right. If you want to be notified when that, or any other maker related episodes, are released, hit the subscribe button.

Thanks for watching. If this helped you, I'd appreciate knowing about it with a "like." If you have any other questions or other comments, I'd love to hear them in the comment section below.

Until next time, go make something. It doesn't have to be perfect, just have fun!

Saturday, July 14, 2012

How to make digital photos from film negatives


Description

Have some negatives you want to turn into digital images? Follow along as I show one way of accomplishing this task. This episode shows what to make, how to setup your camera and basic post-processing steps to convert those old negatives into files ready for the digital age.

For alternate ways of doing this:
http://www.diyphotography.net/scan-your-old-film-for-the-cost-of-a-happy-meal
http://www.diyphotography.net/scanning-film-negatives-with-a-dslr

Transcript

Hi Makers, Builders, Do-It-Yourselfers and Photographers. Harley here with another House of Hacks video. I know this one is supposed to be part two of making soft jaws for the vise but I'm currently in the process of working on that, as evidenced by my red fingers. And last night I was talking with my Dad about scanning some negatives to convert them to digital and that kind of inspired me to do this video where I go over some of the details that I've done in the past for this project. So this video is going to be about converting negatives into digital pictures.

I got this idea a couple years ago online from somewhere. I thought it was DIYPhotography.net but when I went to look for it, I couldn't find the original article. I did find two other interesting articles though on that sight about how to do the same task using a different manner, so I'll put a link down in the description if you're interested in some alternatives, go check them out. DIYPhotography.net is a great resource for do-it-yourself photography ideas. Anyway, this is one I put together a couple years ago and that's what I'm going to be showing today.

Ok, we have a pretty simple setup here. We just have a cardboard box with holes cut out on both ends and a camera pointing into it with a means of holding the negative. In this case I have my camera here setup with a radio trigger on top and I'm using a holder for an enlarger to hold the negative. You could just as easily use a piece of cardboard cut out with a hole in it. On the other side of this box there is the flash with the other end of the radio remote. And inside the box there's a piece of paper. Get some light inside there. So you can see it's just taped to the top of the box, about halfway back, and that acts as a diffuser so we don't have a hotspot coming from the flash.

To get the best image possible, you want the negative to be as large as possible in your image, on your sensor. To do this, typically you need to zoom in as close as possible and get the lens as close as it'll focus in order to maximize that image.

In my particular case I have four lenses and two bodies that I can choose from. One of the lenses won't fit on one of the bodies. That reduces me down to seven possibilities, or potential lens / body combinations that I can use in order to try to maximize the number of pixels horizontal and vertical for the final image.

So I took some test shots just to see which combination would give me the largest final image. First of all I checked my full frame 5D and I couldn't fit the 18-55 lens that only fits on my crop factor sensor camera. But I tried the nifty 50, and I tried the 75-300, and I tried the 24-105. In testing the 24-105 I noticed that the auto-focus would only go down to a certain range. That lens also has another focus range called "macro" but you have to manually move it into there and focus it. I actually took two test images with the 24-105 and you can see the difference between the regular that the auto-focus goes to and the macro mode, which isn't really a true macro.

My other body is an XTi crop factor, and so I tried that with the 18-55 and also the 50, the 75-300 and the 24-105. And out of these seven combinations, surprisingly, the one that gave me the largest image on the negative, the largest image of the negative was the 18-55 on the XTi. So that's the one I used.

If you have access to a true macro lens, that's actually better because a true macro will give you a one to one recording of whatever your subject is onto your sensor. And so if you have a 35 mm film and you have a full frame camera then a one to one is going to be a perfect match for the film size to the image sensor. If you have a crop factor, then you don't necessarily need to go all the way to one to one but the macro lenses are design to focus very, very close to the lens. So you really can maximize the image usage with the macro lens. You can rent those if you don't have them, they're not terribly expensive to rent.

Now that we have the box made and we've chosen the camera and lens setup, the next thing is to actually physically set it up to start taking pictures.

The first part is to make sure that you have the distance correct to make the image as large as possible on your image and still be able to be in focus. That's going to be controlled by which camera and lens setup you have. Once you have things setup and in focus, the next thing is to make sure things are plumb and level. You want to be able to get the film plane on your camera to be plumb and parallel to the negative that you're taking the image of, this way you eliminate parallax errors in your images.

The way I did this on mine was to use the bubble level on my tripod to get my camera plumb and level and then I just assume the floor and everything up from there is close enough for the purposes I have here. If you really wanted to dial it in, you could put another bubble level on top and use shims to get everything exactly right.

Next is to make it parallel this way. And to do that, I put a straight edge across the back and measured with a tape measure to each side of the box and got that so it was exactly the same. That should get things dialed in pretty well.

The last thing is to make sure the image is centered as close as possible in the viewfinder. That way you don't have distortion from the edges of your lens.

Next you need some sort of remote for the flash. I'm using cheap Cactus radio triggers. You can get them on eBay for about thirty bucks. You can also use more expensive ones. Use whatever you have. Also, a corded, where you have something that fits on the hot shoe with a cord going around, as long as it's long enough, that would work too. You just need to be able to trigger your flash from your camera remotely.

And finally, it's not required, but it makes things much easier is if you have a trigger for your shutter release remote for your camera.

That's it for the physical side. Next to setup your camera.

First thing you want to make sure you're shooting in raw mode at your highest resolution. You want to be able to have full control of color balance and exposure and your highest bit depth possible for post processing. The only way to do that is with raw. JPEG just won't cut it. You lose too much information when things are saved to JPEG.

Next is the exposure. For the flash that I have, I have quite a bit of flexibility on controlling the intensity of the flash and so I just set my f-stop to be in the middle of the range for the lens to eliminate the most defraction from either wide open or shut down. Then I adjusted the exposure on the flash itself. If you have a cheaper flash that only might have two power levels, like my other flash, then you'd have to adjust your f-stop accordingly to kind of dial things in.

Shutter speed has to be below your sync speed. I just use 125, it makes it easy. And ISO, I just use 100 as a standard rule.

That's it for the physical setup. That's it for the camera setup. At this point you're ready to just start taking pictures.

Ok. At this point I assume you have taken all your photos you want to take of your negatives and you're ready to do some post processing. This is all going to be in Photoshop and Bridge because that's what I have. The concepts are transferrable to other applications if you have them. You just need to figure out which commands they are to do the same types of things I'm doing here.

The first thing is to rotate and crop the image. This is going to open it up in Bridge where up here at the top we'll have our straighten tool. I'm just going to drag this across the top here, like so. And then we can crop this down. I like to give it a little bit of extra head room on the outside so I can do final crop in Photoshop. This is just a first pass to make the file sizes manageable. You can see here I didn't get the negative quite square in the holder when I took this particular image. That's pretty much all I need to do here in Camera Raw. I'm going to do everything else in Photoshop where I can put things on layers and that kind of thing.

This base cropping is going to be the same for all you images so you can actually apply this, in Bridge anyway, you can apply this once and then tell it to do it to all the files that have the same setup. So it makes it easy.

These first several steps, they're going to be the same for all the images in a given shoot, for a given set of negatives so you can actually make actions out of these to repeat, so you don't have to sit there and continually go through clicking on all these different things repetitively.

So we've got it rotated, we've got it cropped. The next step is to go up to Image, and go to adjustments, and under Adjustments you have Invert. That will convert this from a negative image into a positive image.

And you can see our color balance is a little whacked out so that's going to be the next thing we tackle. I like using curves because it's a one button adjustment. I just use this middle eye dropper tool which sets a grey point. So I can click on that and then click on something that should be a neutral white / grey color. I'll use my brother's pajamas here and our colors get pretty nice. It's a little whacked out but not too bad. Much better than it was before.

One thing I notice is these images are always really soft. To fix that I like to use a high pass sharpen. So I duplicate the background layer with a control J. And then I go up to Filter and choose Other and then High Pass. The radius you use is going to depend on the size of your image. Smaller images you want a smaller radius. Larger images you want a larger radius. Use just what works well. For images of this size, I like 4, that works fairly well. Then we go into our blending mode and change it from Normal to Overlay. And we have a sharper image. It's still not super sharp, but it's better than it was. This is what it was out of camera. And this is what it is now with an overlay, a high pass overlay. It's quite noticeable. That's before and that's after.

That's pretty much what you'd do to every photo in a given set. Anything after this is probably going to be done on a per photo basis rather than across the whole batch.

The next thing I'm going to do, I noticed on my histogram that it's kind of dark. There's a lot of area over here that we can bump up. So I'm going to go in here and add another layer. This time I'm going to use the Levels. And I'm going to just drop this white point down to where we're just starting to clip some of the bright highlights. Like so. And that kind of brightens that up. Before it's darker and now it's much, much brighter, a nicer exposure.

Now with that being brighter, it's more noticeable that this couch is kind of blue. I remember that couch. That was originally a black leather couch that my parents purchased long ago. I'm going to use the hue/saturation, this is just going to be a quick change. I'm going to go in here, since there really aren't any other blues in the image, I'm just going to select the blues and desaturate them. That fixes up that couch pretty nicely. It's still a little on the blue side but not too bad. I guess I could go into the cyans and play around with more, but, for this it's good. I did lose some of the blues in my brother's pajamas so I'm going to go in on the layer mask and paint in some black to bring those back in, kinda like so.

And then I'd do a final crop on this particular image. Something sort of like this. Get rid of all this yucky stuff on the outside edges. About like so. And you end up with a final image. Actually I think I missed something there at the bottom. Let me do that crop again. Bring it in here. I think I took it down too low before. Trim off the yellow on the top right and the grey on the bottom right. Then get rid of the yellow on the bottom left.

And there we go. There's the finished image. Like I said, the first several steps you can put in an action and save yourself a whole lot of hassle. And then each individual photo is going to need a little bit of touch-up, like I did on this one.

That's pretty much it for post-processing.

That wraps up this House of Hacks episode. If you liked it, hit the thumbs up button. Next episode we should be back on track with part two of the soft jaws project. To be notified, you can hit the subscribe button up here.

Until next time, go make something. It doesn't have to be perfect, just have fun.

Update: Fixed typo.

Tuesday, March 6, 2012

Tool Review: AWS Blade Digital Scale


Description

Review of an inexpensive digital scale: the AWS Blade 1KG (Affiliate link).

Transcript

Hi Makers, Builders and Do-It-Yourselfers. Harley here. I've got a project coming up in a couple months that requires measuring things in grams. I'm born and bred here in the United States and grams don't mean a whole lot to me. So, to kind of put that in perspective, a nickel, a US nickel, is five grams and a penny is two and a half grams. A 1000 grams, a kilogram, is about 2.2 pounds. So, I needed to measure things that are very light. All I had available to me was a kitchen scale that measured up to 10 or 12 pounds or a bathroom scale, neither of which would work well measuring down into these low ranges. So, I went out to Amazon and did some searching around and based on reviews, I picked up this little scale. It's made by AWS and it's a Blade one kilogram digital pocket scale. A tenth of a gram accuracy. Backlit display. Includes two AAA batteries. So, we'll open the box, do some initial tests and see what it looks like.

After finishing up the unboxing, I kind of cleared off the table and got rid of everything, so we really have a vinyl case, a little hard plastic protection case that the thing fits in, and the scale itself. It's 2.7 inches square and designed, I think actually it's designed for a food scale. It's small enough to carry with you so if you're on a diet you can measure the quantity of food you're taking in.

To open it up, you just push and it pops open and now we have a little display here with three buttons. We have an on/off button, mode button and a tare button. On/off does exactly what it says. Mode allows you to switch between grams, ounces, troy ounces and pennyweight. I've heard of troy ounces, I think it's used in jewelry making. I've never heard of pennyweight; I'm not sure what that does or what that's used for. And then tare allows us to put something on here and zero out the scale to be able to weigh just the contents of what's in there.

So let's turn this on. Speaking of power, you noticed in the unboxing the batteries were shipped put in backwards with a little plastic tab in there. So during the unboxing process, I put the batteries in properly and pulled the tab out. They put that in there for shipping so it doesn't drain the batteries.

When we turn it on, it comes up in the default mode of grams with a zero zero. I've got some pennies here. According to the US Mint web site, pennies are supposed to be 2.5 grams. We'll take a look and see what we end up with here. This one is, this one is 3.1 grams which is a little heavy. I'm not sure what's going on there. This one shows 2.4. And this one says 2.5. And this one says another 2.5. Hmm. This one shows 2.6. 2.5. 2.6. This one also says 3.1. Wonder if they changed the weights sometime, over time. This one says 2.6. This one says three also. I'm guessing these are older pennies based on their color. That's a '76. This one's an '81. This one says, ooh, '59, wow. That's an old penny. So apparently older pennies weigh more than newer pennies do. These are all much newer based on their color. And, looking at the years, yeah, these are all within the last decade or so. Here's one from earlier in the '90s. But, yeah, these are all '90s and 2000s. So apparently somewhere in the late '80s sounds like they changed the weight. So four pennies should be 10 grams if things are calculating right. And right at 10.1. So this looks like it's weighing pretty well.

And just for grins and giggles, I've got some nickels here. Nickels are supposed to be five grams and five and ten and 14.9 and 19.9. So, yeah, they seem to be adding up. It looks like it's working pretty well for these ranges of weights.

I've got a one and a quarter pound weight. I did some conversion, I think this is supposed to be 567 grams. We'll see if that fits on there and what it weighs out to. It shows 587 grams, but you know, it's just a weight. Twenty grams is I'm sure well with in tolerances for just an iron weight for working out with. And that one shows exactly the same. I'm guessing these are more inaccurate than the scale itself from what I've seen so far with pennies and such. So I'm going to call this kind of good. The mode you just cycle through to get the different weighting systems.

And let's give tare a try. So, if we put something on here we're going to use as a container, that comes out to be 141 grams, we hit tare and it resets to zero so now we can weigh just the contents. Let's use some of our older pennies. So that should be like 9.3, right on the nose. There we go. 9.4. So it looks like those are 3.1 grams originally from the older pennies. Looks like everything works well.

I did find after the unboxing, inside the box stuffed in there, there was a user's manual which I didn't see in the initial unboxing. I did go online and find it. It's also available there at the manufacturer's website. This scale can be calibrated which is kind of nice if it gets out of calibration. I don't have a calibration weight though; you need a 500 gram weight to be able to calibrate it. But, you just hold down the mode button and it goes into calibration mode and automatically does its thing and it's done. So that's it. I don't remember what I paid; it was in the $22, $23 range I think on Amazon. Maybe $18 or something like that.

It looks like for my purposes it's going to work really well. It's nice, small, lightweight, looks like it's reasonably accurate.

I recorded that video a couple weeks ago and since then I've had an opportunity to use it. There were two features that I discovered that were not documented in the manual.

First of all it has an auto-off feature. When you let it sit for somewhere, I'm not sure what the exact timeout value is, it's somewhere less than a minute, probably 30 seconds to 45 seconds, without having any changes in the weight, it would automatically turn itself off.

The second feature that it had is that when you did turn it on, anything that you had on the plate, it would calibrate that to be zero. It's kind of like the tare feature button that I mentioned earlier that automatically happens when you turn the device on.

These features individually seem like decent features to have. I can't complain about either one of them. However, when they're combined in the particular workflow that I was experiencing, they caused some problems. And I didn't find any way to be able to turn them off, which would have been nice.

The workflow I was doing was I'd weigh something out, I'd go do something, I'd come back to it and want to add to what I'd already weighed out. And the problem of course was in that time period that I was away from it and come back, it'd turn itself off. Then when I turned it back on, of course what was on there got zeroed out. So I had to do the math in terms of what was on there and what I was adding, I had to do all that in my head. It would have been nice, because I was looking for a total weight, it would have been nice if I could have turned one of those features off, and then it would have worked exactly, perfectly, for my workflow.

Other than that one caveat, it worked really well. The accuracy seem to be decent. I didn't have anything that was obviously wrong with it. Everything worked out in the end as if the weights were correct. So, I can't say they were wrong. And it worked correctly every time, other than the one caveat. So overall I thought it was a good little scale, particularly for the price.

So that's it for this review. Until next time, go make something. It doesn't have to be perfect, just have fun.