Close
0%
0%

Affordable Reflectance Transformation Imaging Dome

A simple and inexpensive way to image and analyze subtle surface details on objects.

Similar projects worth following
Reflectance Transformation Imaging (RTI) creates a computerized virtual lighting model of an object's surface using multiple photos taken at different lighting angles. It reveals subtle surface details difficult or impossible to see without complicated & expensive techniques. It's used in archaeology, paleontology, forensics, numismatics, and any other field where you're interested in seeing enhanced surface details. Custom-made automated systems are available, but cost tens of thousands of dollars. The technique can be done manually, but it's tedious and time-consuming. My system is fully automated, and can be put together for less than about $600 (plus camera), making it affordable for schools, museums and individuals.

All plans for building this system will be released under the Open Hardware standard, and these build instructions are licensed under Creative Commons. All software needed to run the system will be released as Open Source, GPL version 2.0.

Hackaday 2016 Prize Video

Ever hold an object at an angle to the light, to see subtle details in the surface? Now imagine that technique on steroids, and you have Reflectance Transformation Imaging, RTI for short. Photographs are taken of an object at multiple lighting angles with the camera position fixed. These images are then analyzed and combined in a computer to create a virtual lighting model, where you can arbitrarily set the lighting direction to maximize the visible surface details. What's more, because the lighting model is in computerized format, it can be mathematically manipulated and changed to further enhance surface details.

The technique was invented in 2000 by Tom Malzbender of HP Labs, and originally intended for use in more realistic lighting of 3D graphics; it's still used for that purpose under its original name of Polynomial Texture Mapping (PTM). Malzbender quickly realized RTI's applications in imaging subtle variations in surface details, particularly for archaeological artifacts. Since its development, RTI's most famous use has been in helping to decode the Antikythera mechanism, the oldest known computing device. But it's also been used for imaging ancient Middle Eastern writing tablets (e.g. Proto-Elamite, Cuneiform, inscription "squeezes", and Aramaic); ancient coins; ancient manuscripts (links one, two, three, four); and many more. There are also other non-archaeological applications, such as forensics and paleontology. For more information on the technique and its applications, visit the website of the non-profit Cultural Heritage Imaging, where you'll also find links to free information and software to aid in the creation of processed RTI data files. A search for RTI on YouTube will bring up many videos on the technique and its applications.

My original interest in RTI was for use in imaging and analyzing prehistoric lithic artifacts, stone tools like arrowheads and dart points. It is often very difficult to photograph these in a way that shows the obvious details of their manufacture. So difficult, in fact, that it's standard practice to use line drawings instead of photographs. I presented a talk on using RTI for imaging lithic artifacts at the 2015 Society For American Archaeology, and I've put up an extended version of that talk along with associated data files at this website. Just to quickly show what the technique can do, the images below are of a Clovis spearpoint found in Arizona, dating back about 13,500 years. The first image is a regular photograph, and little to no detail of the spearpoint's surface features can be seen. The second image was generated using RTI (plus some extra Photoshop processing), and the surface details are now dramatically clearer.

Clovis point: original photo

Clovis point: RTI-derived image

There are two common techniques for generating sets of photos for use in RTI. The manual technique is called Highlight-RTI, and requires manually moving a light source to different angles relative to an object (at a constant distance), and using a shiny reflective ball to determine the lighting angle (see the Cultural Heritage Imaging website for more info on this technique). While this non-automated technique doesn't require much in the way of special equipment, it's slow and cumbersome, and often requires two people to perform. The other technique, Dome-RTI, involves putting your object under a dome with multiple light sources on the inside, and a camera looking down through a hole at the object. An electronic controller turns lights on and off in sequence, and fires the camera shutter in sync with the lights. Because this technique is commonly fully automated, and because the lighting angles are always the same, obtaining the required photoset is much faster and easier with the Dome-RTI technique.

When I first started working with RTI in late 2012, there were no plans available to build such a dome system, only rough descriptions. There were several institutions (Cultural...

Read more »

RTI_Processor_.Net_64.zip

Latest version of RTI_Processor program, to create datafiles from photosets. This is for 64-bit Windows only. Adds the "ptmfitter" program from the University of Southampton, which speeds up PTM datafile creation tremendously, and allows for images up to 100 megapixels in size. Also includes the original "ptmfit" program to use in creating RGB PTM files. A few additional minor tweaks and improvements.

x-zip-compressed - 12.40 MB - 01/18/2019 at 19:24

Download

multiCameraIrControl.zip

Sebastian Setz's Arduino library for IR remote shutter control of several camera types (Canon, Nikon, Sony, etc.). Original link is dead, software is Creative Commons license so it can be ffreely distributed.

x-zip-compressed - 15.61 kB - 01/18/2019 at 19:08

Download

RTI_Processor_.Net_031117.zip

Helper program to speed up processing of RTI photo datasets generated by the RTI-Mage system. This is the new .Net version, replacing the older VB6 version. 32-bit, so should run on all versions of Windows from XP through 10.

x-zip-compressed - 1.92 MB - 03/11/2017 at 21:53

Download

RTI_Processor_source_code.zip

VB .Net source code for RTI Processor .Net utility. Works on Visual Studio 2015 Community Edition and later.

x-zip-compressed - 4.30 MB - 03/01/2017 at 19:09

Download

RTI-Mage Assembly Flowchart.svg

Build/assembly flow chart for the RTI-Mage system, breaking down the build into modules that can be built concurrently by multiple participants.

svg+xml - 15.74 kB - 12/26/2016 at 05:22

Preview

View all 15 files

View all 83 components

  • CAT is back in the bag!

    Leszek Pawlowicz04/25/2023 at 22:21 0 comments

    Even though the US maker of CATA4101 LED Driver chips (ON Semiconductor) has discontinued them, looks like they're still available from Chinese suppliers. Try this link at AliExpress for a listing of vendors who carry them.

    https://www.aliexpress.com/w/wholesale-CAT4101.html?catId=0&initiative_id=SB_20230425141540&SearchText=CAT4101&spm=a2g0o.productlist.1000002.0

  • The CAT Is Out Of The Bag.

    Leszek Pawlowicz11/05/2022 at 19:33 0 comments

    ON Semiconductor, the maker of the CAT4101 LED driver that is a critical component of this system, has discontinued this item. So, as of now, this project is no longer practical. I am looking for an acceptable substitute, but as of yet have not found one. There are alternative approaches to creating an RTI dome, some of which are far simpler than the one outlined here, but each has a set of drawbacks. If I come up with a reasonable solution, I'll post it here.

  • Blacker Than Black

    Leszek Pawlowicz04/10/2017 at 05:38 0 comments

    In order to minimize scattered light from the inside of the dome, it needs to be painted a flat/matte black. In the instructions, a flat black spray paint or chalkboard paint is specified, but you will still get some scattered light from both of those. It hasn't been a problem until now, but I've been doing some RTI on shiny metal surfaces that are doing a great job of picking up scattered light from the dome surface, resulting in odd artifacts. So I've been poking around for a solution.

    Vantablack would be an ideal solution, as it absorbs up to 99.965% of visible light. However, it's not really available in commercial form, and the only paint version of it is dedicated to exclusive use by one artist. That has pissed off a number of other artists, one of whom has created a quasi-clone of it called Black 2.0 that he is offering for sale. Not cheap (150 ml for about $30 including shipping from the UK). I've just ordered a bottle, and will check out whether it's worth the price..

  • News

    Leszek Pawlowicz03/11/2017 at 22:12 0 comments

    A few items of interest....

    1. Just got back from the "Illumination Of Material Culture" symposium on RTI at the Metropolitan Museum of Art in NYC. Full house of 115 attendees, lots of great presentations and conversations. Videos of some of the presentations are online at the Met's Facebook page.

    2. Just posted a slightly-revised version of the RTI Processor software. Discovered that problems might occur if you try to process two sets of data simultaneously with the RTI fitters. Now there's a popup that cautions you against running two sets of data at one. You can always run in batch processing mode to get around this limitation. Source code isn't up for this yet, and I am working on a bigger update that will vastly speed up processing of groups of data, so I'll hold off on updating the source code until then.

    3. Jean Roc Morreale, in the IT department for archaeology, Département du Pas-de-Calais, has transferred the build documentation over to a read the docs web page. Looks really nice, and I will probably keep the build instructions as current as possible on both that site and the PDFs on this site, and bail on updating the instructions on the Hackaday website. He's also translating the instruction to French prefatory to having a system built.

    4. The University Of Minnesota has built two domes based on my design, one small and one big. Reports are that it works exactly as intended. Here are a few photos they sent me:

  • Not Dead Yet (nor pining for the fjords)

    Leszek Pawlowicz03/01/2017 at 19:09 0 comments

    Been very busy recently, but still planning further additions/enhancements to this project. That's why it's not marked as completed. I have just uploaded the source code for the RTI Processor utility that simplifies the job of processing the data (but there will be additional enhancements to that as well shortly).

  • Happy Holidays!

    Leszek Pawlowicz12/26/2016 at 05:29 0 comments

    Since it's Christmas today, a small present. I've broken down the "logs" section of the PDF build instructions into categorical sections, cleaned them up, and put the new versions up in the Files section. One of the new sections deals with Assembly Logistics, where I break down the assembly into modules that can be done concurrently by multiple people; using this approach, a small group of people should be able to build a system in a weekend of work. I've also created a flowchart that shows this breakdown; you can see it in the PDF file, I've uploaded an SVG version of it to the File section, and you can see it below:

  • The Difference Between A Comma And A Dot

    Leszek Pawlowicz12/12/2016 at 22:03 0 comments

    Got an email telling me that the RTI Processor program was throwing up an error at startup concerning a bad conversion from string to double. Threw me for a minute, until I realized that the emailer was from France (thanks, Jean-Roc!). The .lps file loaded by the program when it starts has light positions in string decimal format, where the decimal point character is the standard US ".". In France, that character is a ",", so the program was labeling that string as unconvertible since it had a non-standard decimal point character. This was easy to fix since the subroutine where that problem arises is no longer needed - deleted that, and the problem went away. Also added a check for the ptmfitter.exe program required to generate PTM-format datafiles; if it doesn't find it, it disables the PTM fitting options, and sends you to the website where you can download the needed files. The new RTI Processor executable program is now up in the Files section; the source code will be up shortly.

  • Anybody Want To Buy A Gently-Used RTI Dome?

    Leszek Pawlowicz11/30/2016 at 18:18 0 comments

    Now that I've completed the basic build documentation for the Hackaday Prize project (with refinement and minor additions to come), I am now the proud owner of one 18" RTI dome with controller, and two 12" RTI domes with advanced stands. This is more than I need, so I'm looking to sell the older of my 12" domes. It is identical to the newer dome except for two features:

    1. It doesn't have an OLED display on the front.

    2. It isn't wired for the servo shutter control I hope to develop. It should be easy to add that capability to it once I have the design down; you'd just need to use different output pins and wire it manually.

    Neither of these affect the quality of the data you get, so functionally the older dome will give the same results as the newer one.

    If you're interested, or have questions, drop me a line at leszekmp at gmail dot com.

  • New RTI Processor Software Up

    Leszek Pawlowicz11/30/2016 at 18:05 0 comments

    I've polished up and tested the .Net version of the RTI Processor software, and it seems to work fine. So I've pulled the older version (written in VB6) from the Files section, and replaced it with the newer version. I've also modified the instructions for calibration and sample runs, but the differences between old and new versions are trivial. Source code isn't up yet - have to clean it up, comment it properly, and may also add some additional features.

    I've also updated some of the PDF files in the Manual zip files, located in the Files section, a process that will continue slowly but continuously. From now on, these will be the primary instructions for building and using the dome, rather than the instructions on the Hackaday project page. I will try to keep the Hackaday instructions updated, but it's really cumbersome and difficult to edit those pages, so I can't promise that they will be updated in a timely fashion. Not only will the PDFs always be kept up to date, it's far easier to use them as a guide to construction than the online pages.

  • Advanced Stand Instructions Are Done!

    Leszek Pawlowicz11/27/2016 at 22:11 0 comments

    Took a lot longer than I thought, but the advanced stand instructions are done. Sorry it took so long, but there are a crazy number of pictures (around 60). You'll find it at the bottom of the instructions, but I should have a PDF in the files section shortly.

    This design is really only for smaller domes (< 15" in diameter), but allows a number of unique configurations that you can't do with the simple stand. Simple stand is still the only inexpensive and practical option for larger domes, though if you have access to a machine/woodworking shop you could probably come up with some more interesting designs than mine.

    Here's a video showing what the advanced stand can do:

    Of the short-term plans I wrote up in an earlier log, I've done two: the Bluetooth HID shutter control, and this stand. I'm actively working on a third, cleaning up the instructions, but that will take a while to complete. The servo shutter should be next on the list, but I forgot to list the .Net version of the processing software I wrote, and that will likely be next on the list. Then the servo shutter, then writing up a more detailed description of how to process and analyze RTI imagery. Even though the Hackaday prize contest is over, I will keep updating this project until I've got everything done that should be here. Stay tuned.

    PS Almost forgot - hope to get all the software and documentation up on GitHub in the near future.

View all 54 project logs

  • 1
    Step 1

    Note: I've started converting these instructions into PDF format, and uploading them to my project Files section. These will ultimately be combined into a single large PDF file that will serve as a full manual for building and operating the system. The manual will be kept fully up to date; I will try to propagate updates to these instructions, but can't guarantee how frequently this will happen. And, these instructions are huge, and take a long time to appear in your browser. So, I strongly urge you to use the PDF files as your guide for building a system.

    Addendum: Jean Roc Morreale has created a Read the Docs page that incorporates these instructions. Looks really nice, and I expect I'll try to keep both that site and the PDFs up to date at the expense of these instructions at Hackaday. You've been warned.

    These instructions are going to be excessively, even painfully detailed, especially if you're an experienced maker. Apologies for that upfront. A lot of the people who would benefit from using this system aren't necessarily makers (archaeologists, paleontologists, numismatists, museums), and I'm hoping that by making the assembly process as clear as possible, they'll be more likely to make one of these gizmos.

    Quick note: Clicking on any picture will open it full-screen in browser; if there's a magnifying glass for a cursor, clicking will zoom to full resolution.

    This first section will deal with prepping the dome for installing the LED lights on the inside. This boils down to two operations:

    1. Marking the positions where the LEDs will be mounted on the inside, so that they'll still be visible after you paint the inside of the dome.

    2. Painting the inside of the dome matte/flat black, to minimize scattered light.

    By now, you've hopefully read the two project logs (one, two) on how to select a dome, have ordered it, and now have it sitting before you, like this one:

    (Note: not exactly like this one - I've already marked the LED positions and painted the inside. But I'll use it as a model for this section.)

    When construction is completed, and all the LEDs installed, the inside of the dome will look something like one of these:

    Interior of 12" dome

    Interior of 12" diameter dome

    Interior of 18" dome

    The LEDs are mounted in rows with shifted columns, with even/odd rows lining up; this is to maximize the variation in angular position. The 12" dome has 48 LEDs in 6 rows/8 columns, while the 18" dome has the maximum of 64 LEDs, 8 rows and 8 columns. 8 rows and 8 columns are the maximum, but you can have fewer than those. It's even OK to have rows with varying numbers of columns, but I don't recommend it - it makes wiring the system and managing the software a real pain. Plus, you want to have the LEDs spaced uniformly in angle for best results, and that can be tricky with varying column counts. So the first thing to do is figure out where the LEDs will need to be mounted inside the dome, and mark those positions. It's best to do this before you paint the inside of the dome black.

    Before proceeding, a quick comment about accuracy. While getting the rows and columns laid out evenly will make assembly easier, you shouldn't get too obsessive about accuracy, as small errors won't make that big a difference in the results you get from the system. While the software needs to know the positions of the lights in order to do its calculations, it gets those positions from a calibration file that's generated from the actual light positions. So even if one or more lights are a bit "out of line" with others in their row or column, it won't make a significant difference in the results, since the calibration file will take that into account.

    Part A. Determine and mark the angular positions of the columns.

    1. To find the angular spacing, just divide the number of columns into 360 degrees. So for 8 columns, the spacing would be 45 degrees; 60 degrees for 6. I wouldn't use fewer than 6 columns, and 8 is preferable to 6.

    2. Place the dome on a sheet of paper large enough to allow you to trace a circle around the edge of the dome flange, then trace the circle.

    Trace circle; dome obscures about half of it.

    3. Find the center of the circle you've just drawn. There are several methods you can use (ask Google), but this one is probably the simplest and cleverest.

    Center found!

    4. Erase all the lines you've drawn except one, which you'll use as a reference. Using a protractor, and the reference line, mark the angles at the spacings you determined in A.1, i.e. 45 degrees or 60 degrees; 45 degrees for the picture below.

    Angles marked at 0/45/90/135 degrees

    5. Draw lines through these marks extending out to the edges of the circle; make an accentuating mark (x, dot, whatever) where the line and circle intersect.

    Lines intercept edge of circle at 8 points (45-degree spacing)

    6. Draw one additional mark halfway between two of the accentuating marks. You can determine the position by eyeball, or more accurately with a protractor used to bisect one of the angles (e.g. 22.5 degrees for a 45 degree spacing as it is in this example, 30 degrees for a 60 degree spacing). Differentiate it clearly from the other marks. The reason for this mark will become clear shortly.

    Extra mark at 22.5 degree angle

    7. Place the dome back on the paper so that it is centered inside the traced circle. Mark the flange clearly at every position where the angle lines intersected the circle. You may find it tough to find something that can temporarily mark acrylic plastic. Sharpies work, and the mark can be removed by rubbing with a paper towel soaked in WD-40; other solvents may work, but test them first to make sure they don't dissolve the plastic.

    Dome flange marked at 45-degree increments

    8. Now take the dome and rotate it in the traced circle until one of the initial marks lines up with the mark created in step A.6. Repeat the process of marking the dome flange at all the positions where the angle lines intersected the circle; try and differentiate this mark somehow from the first set (different color, put a slash through it, etc.). You have now marked the angular positions for all the columns. Half the rows will have their LED columns lined up with the first set of marks, the other half will be lined up with the second set of marks.

    Second set of marks spaced at 45 degrees, located between first set of marks

    Step B. Determine the heights of the rows, and mark the LED positions on the dome.

    1. Using standard RTI guidelines, the lowest angle the LEDs should be mounted is at 15 degrees above the plane of the ground; below this lighting angle, the object you're photographing may be too dim. The highest angle should be somewhere around 65-75 degrees; above this, the object may be too bright. With your desired top and bottom angles, the number of LED rows you'll be installing, and the size of the dome, you can figure out the proper spacing on the rows.

    Example 1: My big dome (18" dome diameter, 8 rows of 8 LEDs, 16 through 72 degrees). With 8 rows, there will be 7 angular gaps between the rows (8-1). The total angular distance between the low and high rows will be 72-16=56 degrees. The angular distance between individual rows will be 56/7=8 degrees. So there will be rows at the following angular positions (where bottom = 0 degrees):

    16
    24
    32
    40
    48
    56
    64
    72

    To figure out the true arc distance up the side of the dome these angles correspond to, divide the angle by 90, then multiply by 1/4 the circumference of the dome. For an 18" diameter, the circumference is 18" x pi, or about 56.4"; 1/4 of that is 14.1". Divide the table above by 90 and multiply by 14.1", and you get (after rounding):

    2.5"
    3.8"
    5.0"
    6.3"
    7.5"
    8.8"
    10.0"
    11.3"

    So these are the row distances above the base of the dome/flange junction. But the columns in adjacent rows will be shifted by half the angular spacing, so you should group the heights into two staggered sets of rows (each set has LED columns aligned with each other):

    2.5"
    5.0"
    7.5"
    10.0"

    and

    3.8"
    6.3"
    8.8"
    11.3"

    Example 2: The small dome (12" dome diameter (the size of the dome I'm building here), 6 rows of 8 LEDs, 15 through 65 degrees).

    Angular distance between high&low = 65 - 15 = 50.

    Angular distance between individual rows = High&Low / (# rows -1) = 50 / (6-1) = 10 degrees between rows.

    Row angles = 15, 25, 35, 45, 55, 65.

    1/4 circumference = 12" x pi/4 = 9.4"

    Row distances (from bottom) = 1.6", 2.6", 3.7", 4.7", 5.7", 6.8"

    Row distances paired by column alignment = 1.6", 3.7", 5.7" and 2.6", 4.7", 6.8"

    If this isn't 100% clear, just keep reading - hopefully after you see the actual marking operation, you'll understand.

    2. Now you need some way to mark these distances on the dome. Take a piece of string, make one mark on it to indicate the zero reference point, and then measure and mark positions for the first set of row distances on that piece of string (1.6", 3.7", 5.7" in this case). Create a similar second string for the other set of row distances (2.6", 4.7", 6.8"). Taping the ends of the strings down while marking them helps keep them straight.

    Marking sets of distances on two string segments. The long marks at left mark the zero point on the right edge of the mark. These are distances for the 12" dome, Example 2.

    3. Tape the first string to the dome at the base with the flange at one of the marked angles, so that the zero distance mark is at that base. Tape or hold the other end of the string on the top edge of the hole, making the string as perpendicular to the base as you can. Make marks on the dome next to the marks on the string. Repeat this for all matching marks with the same angular spacing as in A.1.

    Marking the first set of columns

    4. Repeat step B.3 with the second piece of string, on the other set of marked angles (the ones offset by half the spacing of the first set; these should lie exactly halfway between the first set of marks you made).

    Marking the second set of columns

    And this is how the dome should look when you're done when viewed from above:

    48 marks on this dome for 8 columns x 6 rows of LEDs

    Step C. Transfer the marked positions to the interior of the dome.

    The marks on the outside of the dome correspond to the positions of the LEDs on the inside of the dome. Thing is, you're about to paint the inside of the dome black, which will make it difficult to figure out what the corresponding position is. So, before you paint the dome, you'll need to put some kind of mark on the inside that will remain visible even after you paint it. There are several options:

    a. Put a blob of paint or nail polish on the inside of the dome at the same position as the mark on the other side.

    b. Drill or scratch a small dimple at the same position as the mark on the other side. Be careful with this approach - I used an electric drill with the dome picture above, and came close to punching through the dome in several spots. Do it by hand and you should be OK.

    c. Put a tiny piece of masking tape in the matching position, and peel it off after you've painted the inside.

    d. Got a better idea? Let me know!

    By the way, this is why I recommend either a clear or white dome; both of those make it easy to see where the marks are on the outside of the dome when you're looking at the inside. A dark-colored dome makes this a lot tougher.

    Once you've marked the interior positions, you can remove all the marks from the outside, including the flange marks. If you use WD-40, take care not to get any on the inside of the dome.

    Step D. Paint the inside of the dome.

    To minimize scattered light, the inside of the dome should be painted flat/matte black. Simplest (and probably best) way to do this is with spray paint. Use a brand specifically labeled as being appropriate for plastic, with the color marked as "flat black" or "matte black" to minimize reflections. Avoid "satin" or "glossy" finishes. My preferred brand is Rustoleum Flat Black Ultra Cover Paint + Primer ; Krylon will work, but seems to require more coats.

    1. Make sure interior of dome is clean and dust-free; use soap and water if necessary, then dry completely. Instructions suggest lightly sanding the inside, but that's not really necessary for this application, as long as the surface is clean.

    2. Cover the outside of dome with masking tape to protect it from stray spray paint. Pay special attention to the hole at the top, as that's the most likely place for paint to leak through.

    3. Follow instructions on paint can. Apply paint to inside of dome in steady back-and-forth motion, overlapping strokes. Not too heavy, or you will get drips/runs inside the dome. You will almost certainly have to apply more than one coat to achieve full light blockage. Allow the first coat to dry for a few minutes, then apply a second coat. I'd even recommend a third coat if you have enough paint left. Let the final coat dry to the touch, then remove the masking tape from the outside. Hold the dome up to a bright light source (the sun works great for this), and check to see if you've put on enough paint to block all the light. If not, re-mask and put on another coat. The Rustoleum instructions say you should put successive coats down less than one hour before applying the previous coat, or after 48 hours.

    4. Set the dome aside to dry. The instructions on the Rustoleum can say that it takes 5-7 days for the paint to fully bond with the plastic, but don't worry too

  • 2
    Step 2

    Next few instructions steps will be on building the high-side driver side of the controller. This has the P-channel MOSFETs that control the plus-side voltage to the LEDs, through the columns of the LED matrix. These will be installed on the Arduino Mega Shield, which plugs directly into the Arduino Mega control board:

    On the bottom are the pins that go into the female headers on the Arduino. This shield makes connections with the Arduino so easy and convenient, I had to use it. But there is one drawback: the limited amount of space you have for components. There is just barely enough room for every component needed for the MOSFET drivers, as long as you place them correctly on the board. I will show you where everything needs to go, modify these positions at your own risk.

    The first set of parts is easy, and is good warmup practice if you haven't done any soldering recently. You'll be soldering a female pin header to the right side of the board - this is where the protoboard with the minus-side current controllers will plug in and connect to the Arduino. Then, you'll be soldering eight resistors in that will eventually connect to transistors that control the P-channel MOSFETs (but more on that in the next set of instructions).

    First, grab the 20-pin right-angle female header:

    And stick it into the 20 holes on the far right side of the shield. Don't do what I almost did, and stick it in the holes to the left of the correct ones! If you've got something you can use to clamp it in place (binder clips, alligator clips), use those to hold it in place:


    Now flip the shield over, and solder the pins at opposite ends. Once you do that, you can remove the clamps/clips and solder the remaining pins to the holes:

    Next, you'll be soldering 8 10K resistors to the shield; these will eventually be connected to the bases of the 2N3904 transistors, which will in turn control the P-channel MOSFETs. One lead of each resistor will go into a hole immediately to the left of the header you just installed, the resistor will straddle another set of soldered pins on the shield (the ones marked 36-52), then most of them will have their other lead go into the holes directly to the left of the number labels. When you solder the resistors, give them enough height that they clear the soldered pins on the left, or you might have problems with shorting. If you like, you can put a thin strip of electrical tape on top of the pins, or paint them with nail polish or rubber paint, to make sure they don't short out the resistors.

    Start by putting the leads of the first resistor into the shield, as in the picture below. Note the hole positions - on the left, the hole at bottom right on the shield, on the left, the 4th hole from the bottom:

    Flip the shield over, and you'll see the two leads sticking out:

    Now solder the resistor leads to the holes they're in. Put the next resistor into the next set of holes (above the first set), and continue until you've done all 8 resistors. If you have trouble getting the resistors to stay in place when you flip the shield, you can bend one or both of the leads down to hold it more securely:

    When you're done, the top of the shield should look like this:

    On the opposite side, leave the leads for the first and fifth resistors from the top uncut (you can bend them down to get them out of the way if you like), and trim the leads for the rest to a length of about 1/4":

    Next up: installing the MOSFETs and associated parts.

  • 3
    Step 3

    Now it's time to solder in the high-side driver channel components - P-Channel MOSFET, npn transistor, and 10K resistor. Here's a rough schematic for one driver:

    You've already installed the 10K resistor at left, though it still has to be connected to the driver (a future step). So this section will deal only with the MOSFET, the npn transistor, and the other 10K resistor. Here's a pic of the MOSFET; note that the position of drain and source in my schematic are swapped compared to the actual MOSFET (gate is correct):

    And here's a pic of the npn transistor:

    A few cautions before you begin. Some of these may seem obvious, even insultingly so. But I'm including them because I've either come close to making all these mistakes, or have actually made them and had to go through the pain of fixing them.

    1. MOSFETs are notoriously sensitive to static discharge. Make sure you've discharged any static buildup before handling MOSFETs. If you have a grounding wrist strap, now would be a good time to put it on.

    2. Make sure you install both transistors in the correct orientation.

    3. Remember that when you flip the shield over, what was on the left is now on the right, and vice-versa; make sure you're making the right solder connections.

    4. When trimming leads, check to make sure the trimmed lead doesn't wind up wedged someplace where it can cause a short. This has happened to me several times, and can drive you crazy as you try to figure out why things aren't working.

    Here's a picture of the shield board, with the location of the first MOSFET circled in red:

    Insert the MOSFET into the marked pins, with the black labeled side facing to the right of the shield; solder one pin in place to fasten it to the shield:

    It can be tough to solder it upright - what I usually do is solder it in place at any angle, then re-melt the solder while pushing he MOSFET until it's perpendicular. Careful - it can get hot.

    Next, the 10K resistor is put as shown in the picture below, with one lead in a hole right next to the source pin, and the other lead two rows up and one row to the left of the gate pin. Pull the leads tight from the underside so that the resistor is flush with the shield board, using needle nose pliers if necessary.

    Flip the shield over, and bend the resistor leads so that the one closest to the source pin is flat and next to the source pin, while the other lead is bent parallel to the MOSFET pins:

    Now it's time for the 2N3904 npn transistor. The lead spacing on this resistor is smaller than the hole spacing on the shield, so you'll have to first gently spread the leads further apart until they will fit into the shield. Then insert the transistor with the flat part facing the MOSFET, and the curved part facing to the right side of the shield:

    Note that the three npn transistor pins are in the same rows as the MOSFET pins.

    Flip the shield over, and bend the collector pin down over the resistor lead and next to the MOSFET gate pin (better than I did in this pic):

    Now solder the collector pin on the npn transistor to the gate pin on the MOSFET; the resistor lead under the collector pin to the collector pin; and the other resistor lead to the source pin:

    Trim off the excess lead on the resistor leads, and on the collector pin:

    And that's it - you've created a high-side p-channel MOSFET driver circuit! Hope you enjoyed that, because you'll now have to repeat the process 7 more times for the remaining high-side driver circuits. Here's a picture showing the locations of all the MOSFETs, including the one you just did:

    Just follow the exact same steps as the first driver circuit for all the successive ones. It's best to work left to right on the shield when installing the driver circuits, as it gives you the easiest access to the board when installing parts. When it's all done, the shield should look like this on top:

    And like this underneath:


View all 39 instructions

Enjoy this project?

Share

Discussions

David H Haffner Sr wrote 11/30/2016 at 20:34 point

This is a really useful and cool ass project! I hope one day soon, to develop my own reflectance spectrometer for microscopy, impressive how much topography detail you are getting here. 

  Are you sure? yes | no

Leszek Pawlowicz wrote 11/30/2016 at 21:37 point

Thanks, David! Just followed two of your projects - Raman spectroscopy is a useful too for analyzing some archaeological artifacts, and an inexpensive one would be a great boon.

  Are you sure? yes | no

David H Haffner Sr wrote 11/30/2016 at 21:57 point

Hey Leszek, yes it will be a boon if I can get it to work correctly, I'm ordering the 3D parts I designed tomorrow, and beginning phase II. So if this project is successful, it will give me motivation to pursue the reflective microscopy spectrometer. 

  Are you sure? yes | no

KD9KCK wrote 07/30/2016 at 19:44 point

I mean to decrease the number of pics that need to be captured you could activate different color leds at different locations so you have what would be three normal captured took in one capture.

  Are you sure? yes | no

Leszek Pawlowicz wrote 07/30/2016 at 18:04 point

Not easily as currently designed. There are only 8 column channels and 8 row channels for the LED matrix in this system, for a max of 64 LEDs. Using three separate color LEDs would limit you to a max of 21, which is borderline for good RTI results.  It's theoretically possible to add 16 more column channels (p-channel MOSFET circuits for high-side drivers) to bring you back up to 64 picture sets, but finding space for the additional circuitry, not to mention the added complications in wiring, would be a nightmare. You'd need to buy more expensive RGB LEDs as well, since you'd want to have the light position identical for all three colors.

If you're interested in grayscale pics, or different color channels, I would have thought you could do that easily in any image editing software from the original color pictures. For your application, what's the advantage of shooting in 3 different LED colors and then combining the components later on?

  Are you sure? yes | no

KD9KCK wrote 07/30/2016 at 18:41 point

I mean if you use the colors as the separate locations you can take three locations in on capture. And convert the red value into one pic. The green value into another pic and the blue value in to a third pic.

  Are you sure? yes | no

Leszek Pawlowicz wrote 07/30/2016 at 18:46 point

Still not sure what you're trying to achieve with this. How is this different from taking a single color pic and extracting the RGB channels into three separate grayscale pics? You could do this with the color pic taken at any LED lighting angle.

  Are you sure? yes | no

Leszek Pawlowicz wrote 07/30/2016 at 19:56 point

Okay, I think I understand what you're getting at. That won't work, or at the very least won't work very well. RTI looks at the scattered light from an image point on the surface for every lighting angle, and uses the intensity of that scattered light to fit a virtual 2D lighting curve for that point, since scattered light intensity will be a function of the lighting angle. It does that for every point on the surface. If you shot different colors from different locations and combined them into a single image, you'd be averaging out the intensity at that point from three different lighting angles. This would degrade the intensity accuracy, and in turn degrade the accuracy of the derived lighting curve substantially, possibly even fatally.  There are other issues, like having to create software that will preprocess and combine these multiple photos into single images compatible with the current RTI software.

  Are you sure? yes | no

KD9KCK wrote 07/30/2016 at 17:45 point

would it be possible to use diffrent colors leds (red green and blue) to allow for taking three of the pictures at once. Then extract each gray scale picture from the different color components of the picture? 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates