Merging modern software development with electrons and metal
Random header image... Refresh for more!

Posts from — December 2013

Cool Components: Compact C-Mount Autofocus Lens

In the past, I’ve always used fixed focus lenses for machine vision because although autofocus lenses are cool, they added a lot of cost and size and I could manage without them.

Last year at Photonics West, Varioptic had an impressive demo: two tiny 2D barcode readers (from Cognex and Microscan) that both sported autofocus lenses using Varioptic’s liquid lens technology.  Back then, Varioptic only made autofocus modules in M12 size or smaller.  Most machine vision cameras, however, use C or CS mount.  (In the future, maybe Micro 4/3 (M43) will become common for machine vision, which would add a lot of affordable autofocus lenses, although they might not be optimized for machine vision).

Recently, however, Varioptic introduced a compact C-mount autofocus lens.  It’s not a cure-all; I don’t know the price and currently only one model is available (16mm).  Control options are analog, I2C, SPI, or RS-232.  Next time I have to use machine vision, I might not use this lens, but I’ll definitely check out the details.

Why use autofocusHere’s one example of why an autofocus lens can be handy: suppose I need to inspect different parts of various sizes.  The camera is in a fixed location.  The parts are picked up by  a robot, so I can move the parts to any desired distance from the camera.  Ideally, I’d like to be able to position the part so that it fills most of the camera’s field of view, thus providing the best image.

However, if my depth of field is less than the distance between the optimal positions for the biggest and smallest parts, I will get less than optimal images, since I will have to position the smaller parts farther away (in my diagram above, at position 2 instead of 1).  With an autofocus camera, I can either use an autofocus routine, or have a set focus position for each part size.  Also, at times maximum depth of field is not desirable: sometimes a shallow depth of field gives an better inspection image, or you need to use less light (larger depth of field requires smaller aperture, which means more light is required for the same image brightness).

Blog note: I’m still working on the robot series, but the next few posts are taking more research and time than I expected.

December 5, 2013   No Comments

Interesting Microcontrollers

As I’ve mentioned before, I like to follow embedded development, but unfortunately don’t have much time to do it, either at work or at home.  There truly is an amazing number of very capable microcontrollers, such as the ST STM32F4, NXP LPC18xx, and Microchip PIC32MZ, that most don’t stand out.  However, I’d like to highlight a couple MCU families that have uncommon features:

  • TI’s Tiva TM4C129x is a typical high end ARM Cortex M4F MCU with FPU, up to 256K SRAM, up to 1M flash, and lots of connectivity and other peripherals.
    • What’s unusual?  It includes an Ethernet PHY on chip (IIRC, the only other ARM MCU with PHY was TI Stellaris LM3S9B models, which are now legacy parts.  Freescale also has some MCUs with Ethernet PHYs, such as the Coldfire MCF5223X).
  • NXP’s LPC4370 is another Cortex M4 MCU, clocked at 204MHz,  with FPU, 264K SRAM, no flash, Cortex M0 co-processor, and lots of peripherals.
    • What’s unique?  An 80M samples/sec 6-channel 12-bit ADC.  Even if the ADC isn’t as good as a dedicated ADC chip, that’s still quite impressive, especially for the price (~$10 in small quantities).
  • Freescale’s Vybrid series features a Cortex A5 at up to 500MHz, optional Cortex M4 co-processor, 1.5M SRAM, no flash, and lots of communications peripherals; a low cost dev board is available.
    • What’s unusual?  The most SRAM in an affordable (VF3xx is <$12 in 100’s) and available chip; double precision FPU is also uncommon.  (Renesas has some MCUs with 1M SRAM, with up to 10M SRAM coming, but they aren’t widely available or affordable).
  • Cypress’ PSoC 5LP is a Cortex M3 MCU with up to 64K SRAM, 256K flash, 2 1M samples/sec ADC, and a 20-bit ADC.
    • What’s unique?  Cypress’ PSoC programmable analog peripherals combined with a powerful ARM core.
  • The XMOS xCORE-XA has a Cortex M3 core, up to 192K SRAM, up to 1M flash, and a $15 dev kit that attaches to a Raspberry Pi.
    • What’s unique?  It also has 7 deterministic XMOS cores, for a total speed of 500 MIPS, which can be used to create peripherals in software.  The concept is very similar to Ubicom’s chips (Ubicom started by making the speed PIC-compatible SX chips, then created a multi-threaded (IIRC) MCU.  They went bankrupt, and IIRC, Qualcomm bought their assets), and a bit similar to the Parallax Propeller (but much faster).  Note: the dev kit uses the xCORE-Analog A8 chip with  8 xCORES, but no Cortex M3.
  • Spansion’s FM series of MCU’s are a broad range of ARM-based MCUs.
    • What’s unique?  All series include parts that can run at 2.7V to 5.5V, which is very unusual for a 32-bit MCU.

Note that the Tiva and FM series aren’t in full production yet.

December 2, 2013   3 Comments