|
|
 TM240A building USB Host Shields
Some time ago I noticed that I’m spending more time building boards and less time developing and needed to increase my manufacturing capabilities. After thorough reading Dangerous Prototypes’ Chinese desktop pick and place machine forum thread I got in contact with a factory and bought TM240A – the big brother of TM220A. Earlier this week a DHL van carrying 70kg crate pulled in my driveway. After a day of hands-on learning I started building boards. This article was written after 2 days of using the machine and contains my first impressions as well as a couple of hints.
First, it is a real Chinese machine – well built, simple, and reasonably priced. At the same time, an owner must be prepared to fix mechanical issues and work around software bugs without relying on manufacturer’s support – the folks at Neoden are helpful but due to a time difference a reply to an e-mail would arrive the next day. Fortunately, the user base for these machines is expanding and the thread linked above as well as videos by Ian@DP and other people provide lots of useful info.
I was ready to face issues like air lines clogged by small pieces of styrofoam, non-functioning vacuum pumps and such; luckily, the only problem out-of-the box was racked gantry causing feeding fault. Thanks to this post in DP thread I was already aware about the symptoms as well as the fix – so I fixed it. While doing this I learned that to implement the fix no tools were necessary – a typical human finger jammed between the front support and the gantry works just as well as originally specified screwdriver.
I loaded some tapes and proceeded to stuffing boards. During test runs double sided removable scotch tape placed over the pads helped keeping parts in place. “Removable” type is preferable since it leaves no residue. Also, since the machine has no vision, accurate board registration is paramount. Here is how I do it.
Continue reading Neoden TM240A Pick and Place machine – first impressions
 The product being tested on animals
To make my growing season preparations more high tech I built a grow light with more than 25000 lumens light output while spending less than US$300. During the build I posted pictures/short notes on Makers, Hackers, Artists and Engineers Google+ community and received a lot of questions concerning LED choice, drivers, build of materials and construction details. This article is intended to answer these question and hopefully generate others – please don’t hesitate to ask!
The goal of this project was to produce a decent grow light for personal indoor gardening – mainly starting vegetables for subsequent transplanting outside some time in May and possibly extending the grow season in the autumn. While trying to determine necessary light output I realized that good numbers are impossible to find. By reading numerous indoor gardener’s forums I learned that people are having good results with light sources ranging from household-type compact fluorescent bulbs to high pressure sodium street lights. After analyzing pros and cons of all available light sources I decided to use high-power white LEDs. Here’s why:
- They are low-voltage devices therefore they are much safer to work with than HID/fluorescent light sources. Low-voltage (<60V) LED drivers are also inexpensive
- They are efficient as grow lights. Photosynthesis in plants occurs differently under different wavelengths of light; the “good” light is known as Photosynthetically active radiation (PAR). White LED emits most of its light in PAR – out of all light sources it produces most “PAR lumens” per unit of electricity used to produce these lumens. In addition, LED outputs all its light from one side therefore a light fixture doesn’t need a reflector.
- They can last long time. LED manufacturers specify 50000 hours at some pretty high emitter temperature (75-85C) – it’s 11.4 years if lights are on 12 hours a day. At the end of 500000 hours a LED maintains 70% of its light output. The main factor here is temperature of the LED – if it is kept lower than specified the LED will last longer (and produce more light, see below).
Continue reading High-power LED grow light – a build log

While designing USB Isolator I needed a 5V supply to power the device side. I picked Linear Technology LT1376-5 part which proved to be pretty reliable and mellow converter. I’ve had used this part for 3.5 years now, in a product and also in the kit and I haven’t had any serious issues with it. Some time ago I decided to put together another kit based on the same controller – at this time containing only PTH components to make assembly easier for beginners. This kit is now available at the store for $20 plus shipping and the following is a short overview of the capabilities.
The kit contains a PCB plus all parts necessary to build a DC-DC step-down converter. Voltage setting resistors to make output of 3.3V, 5V and 12V are included. The converter is capable of supplying 1A at any of the output voltages over 6-25V input voltage range ( 23Vmax for 12Vout), and can be pushed up to 1.3A if input and output voltages are close enough. Output voltage ripple is 50mv@1A.
The biggest advantage of switch mode supplies is efficiency. It is possible, for example, to step down from 24V to 3.3V without generating excessive heat even at 1A load. Also, switchers are fascinating circuits, fun to build and play with.
In addition to full kit, a bare PCB is offered for makers who prefer to source parts themselves. Eagle CAD files of the circuit are also available.
Enjoy,
Oleg.
 Dummy load Jig Complete
Here is a little jig I made to test and characterize the BLDC controller I wrote about a while back. It is a dummy load consisting of two coupled motors: one driven by a controller and another having its windings shorted either directly for maximum load or through series resistors when measured load is desired. Title picture shows finished jig (click on it to make it larger). The construction details follow.
Two brackets made of 2″ aluminum angle profile hold 50-size brushless outrunner Chinese motors rated at 100A. The brackets are bolted to 0.5″ polycarbonate base. The motor shafts are coupled with a flex coupler. Finally, the contact plates are bolted next to each motor – this way if I burn a motor, changing will be easy. The high-current wires are soldered to the female contacts. I’m using double wires to increase current capacity of the wire and also to allow observing half of the flowing current with my little 50A current probe.
I tested the load with my prototype BLDC controller and was very pleased with results. The testing is documented in the short video – check it out.
 VCCIO
Here is a neat trick I learned today – changing FTDI FT232 interface levels on the fly. An ever popular FT232RL-based USB to serial converter typically comes in two varieties: one is configured for 0-5V logic levels on its TTL pins and the other one for 3.3V. It is usually done by connecting VCCIO pin of FT232 either to 5V coming from USB VBUS or 3.3V from FT232RL internal regulator. Both Sparkfun’s Basic Breakout and Adafruit’s FTDI Friend are made this way. This power arrangement works quite well for simple situations. For more difficult ones, it is possible to make this circuit more clever with a simple modification.
I’m currently working on a controller with battery backup. If regular 5V disappears, the MCU gets its power from a small lithium battery. Debug messages are sent to a PC via UART and I need to see them in both modes of operation, the most interesting being events which occur during the power switch. For the reference, ithium battery through a Shottky diode gives ~2.9V.
That’s how I handle this: The VCCIO pin is disconnected from the rest of the circuit and connected directly to a power pin of the MCU. Since voltage on VCCIO defines the TTL level, the serial communication is functional throughout the whole voltage range of my system. Title picture shows the implementation. I’m using very old Sparkfun “full” FT232RL breakout board, where all pins are available on the side headers. More compact “basic” boards can also be used by simply opening both sides of the power selector jumper and using pad named ‘VCC’ or ‘POWER’ (the pad which is typically used to provide power to the MCU) to connect to MCU power.
I have tested the functionality down to 2.7V and everything works quite nicely. I haven’t checked the datasheet for VCCIO voltage limits but I would imagine it should stop working at about 1.8V. In any case, undervoltage shouldn’t cause any damage to the chip.
Oleg.
 BLDC rev.0
I got pretty tired of coding recently and had to switch my brain to something as distant from USB protocol as possible. Also, I’ve being planning a quadcopter build for which I need a motor controller less basic than PPM-driven R/C electronic speed controller AKA ESC. I needed something fast, reliable and scalable and at the same time not too hard to understand. After studying several existing open source designs I decided to make my own. This article is a status report of testing the initial prototype of sensorless brushless DC motor controller.
The prototype can be seen in the middle of the title picture (click on it to make it bigger). The green board contains a controller ( Allegro A4960 ) plus power stage – 6 N-type MOSFETS. In addition to performing typical control functions – setting speed and direction of 3-phase brushless sensorless DC motor, this controller also has a tachometer and fault indicator outputs as well as number of configuration registers available via SPI interface. The controller IC consists of 2 main functional blocks – a logical interface and power bridge driver. The former is compatible with 3.3V and 5V logic and the latter is specified in 5.5V-50V range (startup is possible from as low as 6V), making it suitable for projects ranging from 2S LiPo-powered models to electric scooter drives.
Continue reading Advanced brushless DC motor controller
 Scanning barcodes using Arduino and USB Host Shield
An addition of Human Input Device Class support to USB Host Shield library 2.0, announced several days ago allows using powerful and inexpensive input devices with USB interface in Arduino projects. Sample sketches demonstrating sending and receiving data to one of the most useful HID device types – boot keyboard/mouse, has been released along with the library. The beauty of boot protocol lies in the simplicity of device report – a data packet containing information about button presses and mouse movements. However, samples were designed to demonstrate all features of the class and because of that, they are somewhat heavy. In real-life applications, it is often not necessary to implement each and every virtual function – only what is needed. In today’s article I will show practical application of HID boot device building a simple gadget.
Originally, HID boot protocol was meant to be used with keyboards and mice. When USB became popular, other keyboard-emulating devices, such as barcode scanners and magnetic card readers have been migrated from PS/2 standard to USB while keeping their keyboard-emulating property. As a result, many modern “not-so-human” input devices behave exactly like a keyboard including boot protocol support. A gadget that I demonstrate today is portable autonomous barcode scanner built using Arduino board, USB Host shield, handheld USB barcode scanner and LCD display (see title picture). The operation is simple – when handheld scanner button is pressed, it scans the barcode and sends it to Arduino symbol by symbol. Arduino then outputs these symbols on LCD display. LCD is erased before outputting each new barcode by tracking time between arrival of two consecutive symbols. To keep the code simple, I intentionally did not implement any data processing, however, since Arduino sketch for the gadget compiles in just a little over 14K, there is plenty of memory space left for expansion.
Continue reading Connecting barcode scanner to Arduino using USB Host Shield
 HID r.2.0 released
I pleased to announce that after a long and difficult development period Human Input Device AKA HID class support has been added to USB Host Shield Library r.2.0 and is available on gitHub – I suggest downloading the whole directory, since some modifications has been also made to core files to accommodate a new class. HID devices include popular devices like keyboards, mice, joysticks, game controllers, bar code scanners, RFID and magnetic card readers, digital scales and UPSes, to name a few.
I previously wrote about interfacing to HID devices here, here, and here. The code examples in these articles were written for legacy USB Host Shield library and can’t be compiled with current revision, however, the basic principles are the same – the device is periodically polled by the host and sends back data block called report containing changes in device controls (buttons, switches, jog dials etc.) since the last poll. Even though different devices have different report formats, for a certain device, report format is stored in the device in data structure called report descriptor. Therefore, it is possible to learn about device controls from the device itself by parsing its report descriptor.
There is one special case where report format is known in advance. Almost all HID keyboards and mice support so-called boot protocol intended for communication to very simple systems like PC configuration screen when computer runs from BIOS. Keyboard boot protocol report consists of 8 bytes containing state of modifier keys (CTRL, SHIFT,etc.) in the first byte, second byte being reserved, and up to 6 key scan codes in the rest of the report. Mouse boot protocol report consists of 3 bytes, first of which contains state of left, right and middle buttons and other 2 store X and Y travel since last poll.
In many cases boot protocol capabilities are more than enough for an Arduino project; for this reason, boot protocol class is the first to be released. To demonstrate operations of this class, 2 simple sketches has been developed, one for mouse, another for keyboard.
Continue reading HID support for USB Host Shield Library 2.0 released
 Focus Stacking Assistant var.Mini
After spending a week with focus stacking assistant I realized that I need more units. I’d like to have one unit dedicated for studio work, another to carry in camera bag and yet another one to control my Nikon (code for which I’m hoping to finish soon). Full-size Arduinos are big and expensive and I wanted this controller to be cheap and portable so I built my next controller using Arduino Pro Mini 3.3V, USB Host Mini, and a small home made PCB with buttons and LED. Finished mini-assistant can be seen on title picture and uses the same code as its big brother. What follows is a build log of mini-controller. It follows traditional layout, used, for example, here – a sandwich where Arduino Pro Mini sits on top of USB Host Mini. In addition to that, I needed to add another board on top of the sandwich to carry control and indication bits.
 Step 1. The base.
Continue reading Focus stacking assistant var.Mini – build log
 Focus Stacking Assistant
[EDIT] Here is a build log of mini-variant of this device.[/EDIT]
One of my favorite shooting techniques is focus stacking. Many pictures on Circuits@Home site are made using this technique. I use Helicon Focus for post processing and even though this program has camera control built-in, it obviously requires a computer close to the object of shooting. In order to be able to control my camera in the field, I wanted to replace a laptop with simple lightweight controller able to move focus of camera lens and take pictures between steps. In this article, I will show how to build one from Arduino, USB Host Shield and several small parts.
Finished circuit can be seen on the title picture. As you may already have guessed, the sequence of shots used to produce the picture has been made with the very unit depicted on it. Focus stacking assistant is controlled by 3 buttons: first moves focus towards the camera, second moves focus away from the camera, third button starts shooting sequence. Long press on focus move button sets “near” of “far” points, after both points are set shooting sequence can be run – it always starts from “near” point. The sequence can be stopped at any time by pressing on any of focus move buttons. It is important to understand that after a point is set, subsequent focus moves must be performed with focus move buttons only.
The controller can also be set to “free run” mode. Long press on third button starts shooting sequence from current lens position (which in this case can be set by hand using lens’ focusing ring) towards infinity and will run indefinitely. It can be stopped at any moment by pressing on a focus move button.
A single LED shows states of the controller. Short blink once a second indicates “idle” state – controller is connected to the camera, PTP session is open. Continuous frequent blinking means some kind of an error – most likely, controller not being able to initialize the camera or open PTP session. 3 short blinks act as a feedback to long press, focus move, etc. Additionally, more detailed diagnostic is output to Arduino serial console.
Even while connected to the camera, Focus Stacking Assistant allows camera buttons to function as usual. For example, camera LCD can be turned on and zoom area can be moved to the area of interest and then zoomed in to help focusing. Shooting mode, as well as aperture/shutter speed/ISO can be changed. It is also possible to access or erase images on the card and perform other manipulations as necessary.
Continue reading Focus stacking assistant for EOS cameras
|
|
Recent Comments