D930SW
D954SW
Operating Voltage Range No Load Speed Range Peak Torque Range
4.8V ~ 7.4V 0.11 ~ 0.07 Sec @ 60° 8.0 ~ 13.0 kg-cm 112 ~ 182 oz-in
Maximum Current Draw
0.19 ~ 0.12 Sec @ 60° 18.0 ~ 29.0 kg-cm 251 ~ 404 oz-in
18.0 ~ 29.0 kg-cm 251 ~ 404 oz-in
5,200mA
Dimensions Weight
D955TW
40.0 x 20.0 x 37.0mm / 1.57 x 0.78 x 1.46 in 66g / 2.33 oz
68g / 2.40 oz
66g / 2.33 oz
Hitec continues to expand our innovative D-Series servo line with the latest introduction of our Premium trio, the D930SW, D954SW and D955TW. Powered by our 32-bit MCU (Microcontroller Unit) and 12-bit ADC (Analog to Digital Converter) industrial science, this high-resolution, ultra-durable gear group delivers exactly what you need and have come to expect from Hitec. Our D930SW is the perfect upgrade from the HS-8330SH; the D954SW replaces the HS-7954SH while the D955TW is the advanced version of the HS-7955TG. Servo Engineering Reimagined!!! Hitec RCD USA, Inc. | 12115 Paine Street | Poway, CA 92064 | (858) 748-6948 | www.hitecrcd.com |
Full Page.indd 2
7/4/2017 7:02:54 PM
SERVO MAGAZINE ... Paving the way for the next generation of Robotics Experimenters!
GAZINE SERVO MAGAZINE SERVO M SERVO MAGAZINE SERVO MAGAZIN ERVO MAGAZINE SERVO MAGAZINE GAZINE SERVO MAGAZINE SERVO M SERVO MAGAZINE SERVO MAGAZIN ERVO MAGAZINE SERVO MAGAZINE GAZINE SERVO MAGAZINE SERVO M SERVO MAGAZINE SERVO MAGAZIN ERVO MAGAZINE SERVO MAGAZINE GAZINE SERVO MAGAZINE SERVO M SERVO MAGAZINE SERVO MAGAZIN SV Sub Ad.indd 3
7/4/2017 7:40:51 PM
TOC - Aug 17_TOC SV Mar 15.qxd 7/4/2017 8:51 PM Page 4
tails re de ing, o m rib For n ubsc on s our ad o see ge 3. Pa
08.2017 VOL. 15 NO. 8
Subscription Information
Columns
SERVO Magazine — PO Box 15277 North Hollywood, CA 91615-9218 Call 877-525-2539 or go to www.servomagazine.com Subscribe • Gift • Renewal • Change of Info
08 Ask Mr. Roboto with Eric Ostendorff
I love a good mystery and challenge. So, to answer a reader’s question about adding Bluetooth control to a small inexpensive robot, I ordered the D2-6 Smart Car Kit with a Bluetooth remote and began an interesting and enlightening exploration of this fun little robot chassis.
54 Twin Tweaks by Bryce and Evan Woolley
Crazy Drive Train Even after adding 100 lbs of gravel, our simple two-wheel drive “Protobot” just wasn’t up to the task of handling our new experimental weapon. Could we build a drive train worthy of our cool steel cannon? Could we do it all with just an old drill press and some hacksaws? To find out, we donned our safety glasses, cranked up the garage stereo, and got to it.
60 Then and Now by Tom Carroll
So, You Want to Design a Marketable Robot In this article, I'd like to explore how someone with a great dream and the drive to bring that dream to fruition can design and produce a successful robot product. This process is a bit more involved than a quick amateur build, and should encompass a thorough design strategy.
PAGE 60
Departments
06 Mind/Iron
07 Bio-Feedback 07 Events Calendar 14 New Products
Extending Your Life as an Embedded Intelligence
The Combat Zone
20 22 25 27
15 29 65 66
RoboLinks Showcase Advertiser’s Index SERVO Webstore
Atrocious: The $200 Hobbyweight Warwick Robotics STL Travels to Colorado BUILD REPORT: A 3 lb Full-Body Spinner InsaniTi: When Overkill is Just Enough
SERVO Magazine (ISSN 1546-0592/CDN Pub Agree#40702530) is published monthly for $26.95 per year by T & L Publications, Inc., 430 Princeland Court, Corona, CA 92879. PERIODICALS POSTAGE PAID AT CORONA, CA AND AT ADDITIONAL ENTRY MAILING OFFICES. POSTMASTER: Send address changes to SERVO Magazine, P.O. Box 15277, North Hollywood, CA 91615 or Station A, P.O. Box 54, Windsor ON N9A 6J5;
[email protected]
4
SERVO 08.2017
TOC - Aug 17_TOC SV Mar 15.qxd 7/4/2017 8:52 PM Page 5
In This Issue ...
30 The Multi-Rotor Hobbyist
PAGE 30
by John Leeman Taking the Earth’s Temperature with Aerial Infrared Mapping Build an infrared/color sensor package and install it on a multi-rotor to collect your own ground temperature surveys. We will tag the data with a GPS position, and then plot and explore our data. Since I’m using IR temperature and color sensors, this project can easily be adapted to your sensor of choice — everything from range sensors to Geiger counters.
39 Interfacing an FPGA PMOD Sensor with the Digilent ARTY FPGA Board — Part 1
by Steven Howell The Silicon Labs’ PMOD sensor module combines an Si1145 proximity/UV/ambient light sensor with an Si7020 humidity/temperature sensor on a small board with an I2C interface. In Part 1 of a three-part series, this article covers outlining the module interface, reviewing the I2C protocol, and developing a flowchart to assist with the details of writing Verilog code.
46 Animatronics for the Do-It-Yourselfer
by Steve Koci Legacy Effects Hidden away in an unmarked building in a quiet industrial park outside of Los Angeles, CA, is a prop builder’s Nirvana. I had the opportunity to tour one of the most respected and sought-after special effects studios and see characters created there for such movies as Jurassic Park, RoboCop, Iron Man, and Terminator.
16 Bots in Brief
• • • • •
Rocket Man Don’t Toio with Me Robots Can Jump Make Mine a Cozmo Music Man
PAGE 46
SERVO 08.2017
5
Bergeron - Mind-Iron - Aug 17_Mind-Iron - Feb15.qxd 7/4/2017 9:03 PM Page 6
Mind / Iron by Bryan Bergeron, Editor ª
Extending Your Life as an Embedded Intelligence: What Could Possibly Go Wrong?
W
hile you’re working on that carpet roamer or quadcopter, it’s fun to imagine where technology will bring robotics in your lifetime. There’s likely to be some resistance from animal rights organizations, but at some point, quadcopter and predator drone guidance systems will likely have the thought processes and perhaps even memories of hawks or other birds of prey. Eventually, someone is going to download some part of a human’s cerebral cortex into synthetic memory. That’s when it gets tricky. As dozens of science fiction authors have detailed, there are issues of rights, of enslavement, and no death to escape it all. Granted, there will be all sorts of social and political issues. For now, let’s look at what could possibly go wrong on the technological front. Foremost on my list is disease/decay. Every life form that I know of is susceptible to disease, and every synthetic object is prone to decay. While a human is remarkably self-healing in most respects, machines and computer chips are not. Flash memory degrades with read/write operations, for example. While the average human lifespan might be 72 years, I don’t know of any computer that hasn’t gone down in the past five years. And while I’ve seen early room-sized computers that date from the ‘50s in museums, none of them were working. One obvious workaround may be to frequently back up the system. However, that’s going to be a time-
6
SERVO 08.2017
consuming expensive process, assuming the systems will require several hundred TB of memory. It’s probably cheaper to toss the embedded AI when it’s corrupted and drop in a new one. (So much for living forever.) Related to disease/decay is that humans are not logical creatures. Our nervous systems often break down for unknown reasons -perhaps from a stroke, a viral infection (e.g., meningitis), physical trauma to the brain, or PTSD from a war or a bad childhood. Given we don’t know how to cure most of these neurological diseases/disorders in humans, how can we possibly repair a synthetic brain that exhibits similar behaviors? Recall the depressed robot, Marvin from The Hitchhiker’s Guide to the Galaxy? Probably another case of tossing the embedded AI and starting over. I have yet to meet a perfect human. As such, the first human downloads will certainly contain errors, even if the transfer process doesn’t introduce additional issues. It’s hard for me to imagine how a paranoid schizophrenic embedded AI in a toaster might manifest itself – perhaps burning the toast when it knows you’re already running late for work? SV
FOR THE ROBOT INNOVATOR
ERVO
Published Monthly By T & L Publications, Inc. 430 Princeland Ct., Corona, CA 92879-1300 (951) 371-8497 FAX (951) 371-3052 Webstore Only 1-800-783-4624 www.servomagazine.com Subscriptions Toll Free 1-877-525-2539 Outside US 1-818-487-4545 P.O. Box 15277, N. Hollywood, CA 91615 PUBLISHER Larry Lemieux
[email protected] ASSOCIATE PUBLISHER/ ADVERTISING SALES Robin Lemieux
[email protected] EDITOR Bryan Bergeron
[email protected] VP of OPERATIONS Vern Graner
[email protected] CONTRIBUTING EDITORS Tom Carroll Kevin Berry R. Steven Rainwater Eric Ostendorff Steve Koci John Leeman Bryce Woolley Evan Woolley Steven Howell Brandon Young Ricky Matsko Dylan McCarthy Andrew Burghgraef CIRCULATION DEPARTMENT
[email protected] WEBSTORE MARKETING COVER GRAPHICS Brian Kirkpatrick
[email protected] WEBSTORE MANAGER/ PRODUCTION Sean Lemieux
[email protected] ADMINISTRATIVE STAFF Re Gandara Copyright 2017 by T & L Publications, Inc. All Rights Reserved All advertising is subject to publisher’s approval. We are not responsible for mistakes, misprints, or typographical errors. SERVO Magazine assumes no responsibility for the availability or condition of advertised items or for the honesty of the advertiser. The publisher makes no claims for the legality of any item advertised in SERVO. This is the sole responsibility of the advertiser. Advertisers and their agencies agree to indemnify and protect the publisher from any and all claims, action, or expense arising from advertising placed in SERVO. Please send all editorial correspondence, UPS, overnight mail, and artwork to: 430 Princeland Court, Corona, CA 92879.
Bergeron - Mind-Iron - Aug 17_Mind-Iron - Feb15.qxd 7/4/2017 9:03 PM Page 7
Fraction of an Error
Fully Armed
I've just spotted a couple of (minor) mistakes in my second article on the Arduino controlled robot arm in the July 2017 issue. The formula:
I'm a long-time reader of SERVO and just wanted to tell you that I really enjoyed the two articles about the robotic arm. For me, they were very timely because one of my next projects is a 6 DOF robot arm. I've been a SERVO reader since the first edition and still enjoy it a lot. I'm also a ham operator and lately I've been enjoying a kit radio called the BitX40. The Bitx40 is SSB QRP and I've made contacts all over the western US and BC. It's being sold as an experimental radio and there are lots of mods and user groups for it. Even nicer is the price which is only $59. Shipping is free but it definitely comes on a slow boat from India. With my second rig, I paid the $10 shipping charge and it arrived within a week. Thanks again. You're doing a great job. Steve Jackson KE7RTV
m = B + n + 90° = sin -1
(
b • sinC c
)
+ sin -1
()
(
b • sinC c
)
+ sin -1
()
Xw c
Should be: m = B + n + 90° = sin -1
Xw c
+ 90°
This formula: W = m – 180° Should be: W = 180° – m My apologies for any inconvenience! Ricardo Caja Calleja
EVENTS AUGUST
SEPTEMBER
4-6
Robot Challenge Beijing, China Events include Parallel Slalom, Slalom Enhanced, Mini Sumo, and Micro Sumo. www.robotchallenge.org
1-4
DragonCon Robot Battles Atlanta, GA Events include autonomous and RC combat. www.dragoncon.org
4-8 10-20
Missouri State Fair Robot Expo Missouri State Fair, Sedalia, MO Events include FIRST Robotics, VEX Robotics, and 4-H Robotics competitions. www.mostatefair.com
World Robotic Sailing Championship Horten, Norway Robot sailboats must navigate an ocean course around bouys. www.roboticsailing.org
16 12
CIRC Central Illinois Bot Brawl Peoria Civic Center, Peoria, IL Events include Sumo, Line Following, Line Maze, and RC Combat. http://circpeoria.org
Robotour Žilina, Slovakia Autonomous robots navigate a park carrying a five liter barrel of beer. www.robotika.cz
17-18 15-23
ERL Emergency Robots Piombino, Italy Autonomous robot compete in a simulated disaster response. www.eurathlon.eu
Canadian National Championship Saskatoon Comic & Entertainment Expo http://kilobots.com/events/upcoming-events
SERVO 08.2017
7
Ostendorff - Mr Roboto - Aug 17_MrRoboto - Sep 15.qxd 7/4/2017 7:06 PM Page 8
Ask Mr. Roboto
by Eric Ostendorff
Tap into the sum of all human knowledge and get your questions answered here! From software algorithms to material selection, Mr. Roboto strives to meet you where you are — and what more would you expect from a complex service droid?
Q
. I’ve built several robots from kits, starting with simple line followers and most recently a robot controlled by an infrared remote. Next, I’d like to add Bluetooth control so I can drive it with my phone. How hard is that? — James Hull Bronx, NY
A
. What a terrific and timely question since I discovered a neat little kit recently. A column or two ago, we hacked the $5 line following D2-1 “smart car” kits on eBay from China. These use an LM393 hardware comparator to control two DC gear motors to follow a line. The PCB (printed circuit board) is the chassis, and the front skid is an acorn nut. Very simple, but it works. Of course, all this robot can do is follow lines. (Okay, with some rework it could also track towards a flashlight or other light source, but that’s another column.) That bot’s “big brother” is the D2-6 version (Figure 1), which is microprocessor-controlled and has three modes: line following, free roam with obstacle avoidance, and Bluetooth remote control. The entire robot kit costs just $12-$16 (search “D2-6 Smart Car” on eBay, Banggood, ICstation, or Aliexpress), and (IMHO) is a tremendous value and a great way to start with Bluetooth. You can drive the robot using the touch screen or by tilting the smartphone/tablet — pretty nifty! What you learn here can be ported over to another robot if you like. Only two caveats: First, there is some surface-mount soldering involved. I’m no SMT pro, but I did a passable job that worked the first time. There are many great online SMT soldering tutorials, such as https://www.youtube.com/ watch?v=5uiroWBkdFY. The pros make it look so easy! If your SMT soldering confidence needs a boost, here’s a nice $1 kit to practice your mad skilz with: www.ebay.com/itm/162141836942. Blinking LEDs rule! The second caveat is that the app provided is Android only, so iPhone users need access to an Android phone or
8
SERVO 08.2017
Our resident expert on all things robotic is merely an email away.
[email protected]
tablet. Fortunately, both are cheap. Anybody in the market for a great little 7” tablet should grab a 16GB RCA Voyager. Walmart.com sells the tablet alone for $40, or $45 with a detachable keyboard (Pogo pins).
Solving the D2-6 Mystery Although this kit is available from numerous sellers, I found little information available for it. No instructions; only mixed cryptic reviews on Banggood. Banggood’s own description is less than encouraging: “If you need to learn microcontroller programming or re-download the program, please use your own downloader, we do not provide tutorials. It is assumed that users have soldering skills and troubleshooting skills to assemble this kit. Buyers are advised that due to skills of user involved in assembly it is not guaranteed every kit will end up being a working device. But we will make as much efforts as we can to approach that goal.” My YouTube search on “D2-6 Figure 1. robot” only turned up one poor Russian fellow who indeed couldn’t get it working: https://www.youtube.com /watch?v= 3DsiSc_MrzQ. I thought it was tragic to allow this potentially neat little kit to remain in the shadows, wallowing in obscurity. I love a good mystery and challenge, so I ordered one. (Okay, three.) After poking around Banggood’s web page, I found a less-than-obvious link (http://files.banggood.com/2016 /11/SKU503908.zip) which downloads a zipped folder containing numerous files. The two we need are the D2-6 Instructions PDF (in English, hooray!) and the “MagicCar” app in the aptlynamed folder, “Android mobile phone Bluetooth remote control software” (Figure 2). It’s the small (168 KB) APK file you can store on a micro SD card and sideload onto your smartphone/tablet. This is Beta version 1.0.2 and although it’s nowhere to be found on the Google Play store, you can download the app and instructions from the
Ostendorff - Mr Roboto - Aug 17_MrRoboto - Sep 15.qxd 7/4/2017 7:06 PM Page 9
Your robotic problems solved here.
To post comments on this article and find any associated files and/or downloads, go to www.servomagazine.com/index.php/magazine/issue/2017/08.
Figure 4.
Figure 2.
article link. (SparkFun hosts an older Beta version 1.0 at http://cdn.sparkfun.com/datasheets/Robotics/Magic Car.apk which is not as user friendly.) The MagicCar app is by Chinese Arexx/DAGU but their email reply to my request for information didn’t say much about it: Hi Eric, DAGU made this Magic Car app before, and this app was used on Magician Chassis. This [D2-6] robot kit is made by the other company, not DAGU. Best regards, Dagu Hi-Tech Electronic Co., LTD. Even DAGU’s former lead designer and chief mad scientist, Russell C (a.k.a., oddbot) didn’t have much to add. So, this app appears to be orphaned in Beta form, but thankfully it still works great with the stock robot. Speed and direction values are constantly displayed at the top left of the screen. The D, A, G, and U letters at the bottom right are buttons which send unique codes via Bluetooth. Although not used by the stock microcontroller, we can use these in our own code for other purposes. Banggood’s zipped folder includes information on reprogramming the 16-pin STC15W201S microprocessor for anyone who wants to accept that challenge. After “mastering” the stock robot, I replaced the STC chip with a more familiar PICAXE 20M2 and expanded it by adding an IR input and a beeper output. The robot’s PCB chassis includes male headers (Figure 3) which allow direct access to each pin, so you can DIY your own plug-in module using most any controller. This bot was meant for hacking!
Battery This robot uses a single 3.7V 14500 Lithium-Ion battery
Figure 3.
(not included). It’s roughly AA sized; barely longer. Four batteries and a charger are just $5 (www.ebay.com/itm/162285518252), but don’t be mislead by fantastic capacity claims of 2,500 mAh or more. Most awesome-sounding Trustfire, Ultrafire, and GTF brand cells are under 400 mAh, so they won’t last very long in your robot. Grab yourself an eBay $3 ‘ZB2L3’ battery capacity tester to know what you’re getting (review at https://syonyk.blogspot.com/2015/10/zb2l3-v20-zhiyubattery-tester.html). I have tested many batteries, and my highest capacity types are old generic blue batteries claiming a modest 1,200 mAh, which actually deliver over 400 mAh. Caveat emptor! You may prefer to substitute a small 3.7V LiPo if you have one and the matching battery connector. Enough talk! Let’s fire up the soldering iron and build a robot. Kit contents are shown in Figure 4 and the schematic and BOM in Figure 5. The build took me about two hours following Banggood’s English assembly SERVO 08.2017
9
Ostendorff - Mr Roboto - Aug 17_MrRoboto - Sep 15.qxd 7/4/2017 7:06 PM Page 10
instructions. The board is good quality and clearly marked which aided in assembly.
Use an ohmmeter to verify resistances since four color bands are used. Don’t forget to install the unmarked half inch long jumper wire near pot R16! Since I lost SMT caps C4 and C5 almost immediately, I soldered 0.1 µF disk caps directly across the motor terminals, which might be more effective anyway (sour grapes). The forward-facing obstacle detectors use clear LEDs (outside) and black phototransistors (inside). Watch the polarity; match the flats on the components to the image printed on their PCBs. I’m not a fan of that little tiny power switch awkwardly adjacent to a tall filter capacitor, but what’s a “girl” to do? The $5 line follower kits use preassembled gear motors with spur gears, but this robot uses worm gears to drive the wheels. Assembly is a bit tricky, so once again refer to the photos in the instructions to properly position those small yellow spacers. Light taps from a small hammer will get the shaft through the gear and wheel. Get the wheel/gear/shaft and supports installed properly, with the gear centered in the PCB slot. Make sure the whole axle spins perfectly freely before installing the motor with two screws. One axle hole was tight, so I ran a #46 drill through it by hand and then it was perfect. Press the worm gear on the motor shaft just far enough to retain it so it is centered on its mating gear. I’m not a huge fan of worm gears, which have lower efficiency than spur gears and can wear quickly under load — especially when the gears are exposed like this and easily pick up dirt and hair from the floor (don’t add any lube here, it will just hold the dirt on). However, I was impressed with the precision of this mass-produced PCB mounted assembly. It’s a light duty application and the gears should last a long time if properly assembled and kept clean. Once both wheels and motors are mounted, install the front screw skid. This establishes the ride height so you can start the somewhat tricky installation of the hang-down line-sensing black phototransistors and clear LEDs. The instructions say to mount with 5 mm ground clearance, although mine worked fine at 3 mm.
Caution: Don’t lose microscopic SMT capacitors C4 and C5 like I did. They were loose in the bag!
Warning: Don’t overheat these LED/PTX PCB traces when soldering! You’ll risk breaking them off.
Lightly clean the copper PCB pads with a Scotch Brite pad. Solder all the components except for the motors, battery holder, and line following LEDs and phototransistors. Do the hard stuff first. Start on the bottom with the SMT components: C4 and C5; a pair of L9110 H-bridges; and an LM339 quad comparator. Refer to instruction photos, the component list, and PCB markings.
The location and mounting of these four parts is the Achilles heel of this design IMO. Analog calibration depends on all parts maintaining fixed positions, yet they are subject to abuse in a crash. They hang out in the breeze where a light impact with a low-lying object may bend something or break off the PCB trace, undoing all of your careful calibration.
Figure 5A.
Figure 5B.
10
SERVO 08.2017
Ostendorff - Mr Roboto - Aug 17_MrRoboto - Sep 15.qxd 7/4/2017 7:06 PM Page 11
If your line follower starts misbehaving or you can’t change modes, check these connections first. A homemade bumper attached to the front skid screw to protect these sensors is a very good idea. Figure 6 shows one I fabricated from scrap plastic. The LM339 quad comparator does the level sensing for two line sensors and two obstacle sensors. Each sensor consists of a 3 mm black phototransistor (D7, D8, D9, D10) in series with a 10K resistor to form a voltage divider. Four 10K trimpots provide the adjustable reference voltages for the comparators. The innermost pots adjust line follower sensitivity; the outermost pots adjust the front obstacle sensors (CCW = more sensitive). An LED near each pot shows the comparator status: ON = IR reflection sensed; OFF = no reflection sensed. Note that these sensors are always on and active whether or not the robot software is monitoring them.
Mode Selection Momentary pushbutton switch S2 is used to select modes. Unlike the $5 line followers, the red LEDs near each motor are not simple hardwired “motor on” indicators. They are processor controlled and used here as mode indicators. The robot defaults to the line following mode when first switched on and the motors start. Important: You can’t switch modes if either line sensor is triggered (LED on), so hold the robot off the ground and don’t let your hand trigger the bottom sensors. To change modes, press and hold pushbutton S2. Motors turn off, then after two seconds, the left red LED (only) comes on, still indicating line follow mode. Continue holding S2 for two more seconds. The left LED goes out and the right LED comes on, indicating free roam/obstacle avoidance mode. Release the button to enter this mode, or continue holding two more seconds to enter Bluetooth mode when both rear LEDs turn on. I recommend going into Bluetooth mode for initial sensor test and adjustment since this is the only mode where the motors are initially stopped. Adjust the innermost line sensor trimpots to turn the LED on when that sensor sees white and off when it sees a black line. You want a high contrast black line; 15 mm wide is suggested. Next, adjust the front obstacle sensors by holding a white paper in front of each sensor while adjusting the two outer trimpots.
Mode 1/Line Following Quite frankly, the stock robot is underwhelming. Line following is actually slower than the $5 robots; there is a lot
Figure 6.
of overcontrolling/oscillating from the microprocessor algorithm used here. These motors reverse, so perhaps they can follow tighter turns than the $5 robots. The motors have sluggish response from their stock 10 ohm series resistors. Replacing each resistor with a pair of silicon diodes offers better speed and zippier performance, as shown at https://www.youtube.com/watch?v= BIaMd4hkk00. Caution: Diodes won’t limit maximum current like the resistors do, so don’t stall your motors using diodes or the L9100 H-bridges might burn up. Each channel has a continuous current limit of 800 mA, and the Li-Ion battery can deliver that much.
Mode 2/Obstacle Avoidance The simple IR reflectance sensors are very colordependent: white objects are most easily seen; darker objects less so. In my tests, the stock microcontroller program gets the best results adjusted to a very short range (about an inch). If the range is much more than that, it can get stuck near a wall and just oscillate. You can see my demo (with the diode modification and bumper) at https://www.youtube.com/watch?v=q7dMGY33Gxs.
Mode 3/Bluetooth Control Here’s where this bot shines. First, make sure the BT04A module is properly oriented in the socket (hanging forward of the four-pin header, over the resistors, red LED blinking), and download the MagicCar app on your device. Refer to Figure 2 and pair with the robot. Turn the robot on, the phone Bluetooth on, search, pair (password 1234), and connect (solid red LED). If the motors start, touch the center circle of the joystick to stop. Now, use the joystick finger slider to drive the robot around. It’s not full proportional speed control, but there is just enough PWM going on that with some practice you can get graceful arced turns in addition to spinning in place and going straight. Get jiggy with it! Once you’ve mastered that, set the phone down on a SERVO 08.2017
11
Ostendorff - Mr Roboto - Aug 17_MrRoboto - Sep 15.qxd 7/4/2017 7:06 PM Page 12
flat surface for initial orientation and hit the tilt sensor button to toggle tilt control ON. Now, you can drive the robot by tilting the phone. Ain’t life grand? Note that the joystick still works in this mode too. Hit the gyro button again to turn off tilt control mode.
Figure 8.
Hacking As previously mentioned, this bot is quite hackable and expandable. As mentioned, I replaced the stock processor with a PICAXE 20M2. Figure 7 shows my mini board installed, attached to the headers on the robot PCB. The 20M2 has more than enough I/O pins to connect to every header pin. I added a beeper and 38 kHz IR receiver to the extra pins. It would also be very easy to add a Sharp IR or ultrasonic distance sensor. PICAXEs are great for small robots for several reasons: small size; wide voltage range; simple to program in BASIC; multiple ADC and touch sensor channels; and dedicated PWM, servo, and ultrasonic commands. Feel free to choose another processor, and let the pinout guide in Figure 3 help you wire up the connections. Each H-bridge requires two output pin connections from the controller; preferably with PWM for full speed control of each motor. You can see my PICAXE controlled Figure 7.
robot following an oval line much faster at https://www.youtube.com/watch?v=0C84Q0aA5QIdriv ing and driving a programmed figure 8 pattern at https://www.youtube.com/watch?v=ANdUnWKToh8. Clearly, there are many performance advantages and opportunities for customization and improvement when you install a programmable controller. If your processor has two or more ADC channels, you could consider bypassing the LM339 comparator and reading the phototransistor voltage dividers directly. That way, you could do software calibration to operate in different lighting conditions. With some experimentation, you could read the edges of the line to follow it better using a smooth PID routine instead of the original bang-bang routine afforded by the comparators.
Reading Bluetooth Signals Your processor can easily read the values transmitted by the MagicCar app and use those for control. The serial signals (9800 baud, True, N, 8, 1) will come from the BT04 module’s TXD pin, so connect that to your micro’s input pin and read with a SERIN command or equivalent. Here’s the PICAXE code for my 20M2: #picaxe 20m2 pause 200 setfreq m8 ‘ 9800 baud comms require m8 or higher do serin b.7, T9600_8,b0 ‘ read bluetooth value on pin b.7, store as b0 sertxd (#b0,13,10) ‘ display value in serial terminal loop
Like a robot program using an infrared remote, you’ll read the Bluetooth value in a loop. Then, based on the
12
SERVO 08.2017
Ostendorff - Mr Roboto - Aug 17_MrRoboto - Sep 15.qxd 7/4/2017 7:06 PM Page 13
value, branch to various routines. The values sent by the MagicCar app are shown in Figure 8 and demonstrated at https://www.youtube.com/watch?v=ORxx_qbOfEE. Here are my observations about using this app:
questions with me via email at
[email protected]. SV
1) Fine steering control using the touchpad is possible, but difficult since you don’t get any touch feedback. Typically, you’re watching the robot, driving it around, and the robot’s direction/response is the only feedback you get. It’s easy to “lose your place” on the touchpad. Just using your phone/tablet (no robot), move your finger while watching the speed/direction readout and you can see how a very small motion makes a huge difference in the values — especially near the center. It’s easiest to just look for the eight extreme values (forward, reverse, left, right, and the four diagonals) since the intermediate values are somewhat arbitrary. 2) There’s a bigger dead band (center off zone) when using the tilt sensor. This is necessary since your perception and orientation of the “off zone” is arbitrary. The center off orientation is zeroed when tilt mode is engaged. I find it helpful to lay the phone flat on a tabletop for the OFF position. 3) Steering and direction data is sent as a continuous stream (see #4), whereas the four pushbuttons (D, A, G, U) send a single value per touch (click feedback heard from phone). 4) There’s a bug in the touchscreen (not tilt sensor) when sending Bluetooth data. The data stream is continuous as long as your finger is moving, but sometimes when your finger stops, the data slows down and stops. When you remove your finger, the value should (but sometimes doesn’t) automatically return to zero. Depending on how you write your code, this may be a factor. The speed/direction displayed on the app screen is always correct, but the Bluetooth data has this glitch. This is Beta software, after all. I would suggest this workaround: If driving by using these BT values, plan to use one of the D, A, G, U keys to send a zero to stop the robot. Repeating, the tilt app does not have this glitch and may be preferable to use. That’s a wrap for this column. Thanks for your question! I sure had fun hacking and experimenting. I hope you enjoyed following along and learned something. Maybe you’ll decide to get one of these $12 robots for yourself and have some fun. I highly recommend it! As always, please feel free to share your thoughts, ideas, and
CNC Mill Starting at:
$4950
smallmachine BIGRESULTS x
Design New Ideas
x
Prototype Without the Wait
x
Cut Real Metal
x
120VAC - Plug in Anywhere
TORMACH.COM SERVO 08.2017
13
New Products - Aug 17_Mar15 - NewProd.qxd 7/4/2017 7:35 PM Page 14
NEW PRODUCTS Monthly Kit Service
T
himble — a monthly subscription service and learning platform — is now shipping learn-andbuild electronics kits. The kits are a part of a directdelivery monthly service to empower kids (as well as adults) to understand the fundamentals of electronics including building, embedded programming, and advanced manufacturing design techniques. Each kit includes step-by-step instructions for the maker to code, build, and hack a DIY electronic device. Kits build in level of difficulty the longer an individual continues to subscribe, enabling the maker to always feel challenged and to encourage them to constantly learn and innovate. Thimble is the invention of two young Buffalo entrepreneurs: a computer engineer and a former college admission officer who came together to share their passion for STEM (Science, Technology, Engineering, and Mathematics) education and to make it more accessible to the masses. The company started as a grassroots Kickstarter campaign, and offers the kits both through individual sale and monthly subscriptions. The first kit received comes with a reusable Arduinocompatible microcontroller and the option to purchase a
Online Course to Brush Up Skills
D
eveloped in association with Books to Courses, EPTSOFT Limited is offering an online self-study course on electronics that addresses the problem of key employment skills shortages — especially among young workers in STEM (Science, Technology, Engineering, and Math) subjects. With no time off work or classes to attend, those joining the course can study on their mobile devices by working through a series of lessons where they assess their own progress through to completion, and are awarded a certificate at the end. All lessons are fully interactive and will accept almost any value that occurs in a real situation enabling the user to explore the colorful graphics that are immediately updated on their phones or tablets. Existing employees requiring a basic grounding in electronics for their work or those just looking to refresh their existing knowledge can benefit from this series. All EPTSOFT courses are comprehensive and aimed at both the beginner (a basic level of understanding in Electronics is assumed) and more advanced students looking for a refresher. The course is menu-driven,
14
SERVO 08.2017
toolkit that will help novices to hit the ground running. “Through Thimble, we hope to inspire all individuals — from budding hackers to semi-professional hobbyists — to fulfill their curiosity and interest in building electronics,” says Oscar Pedroso, CEO and co-founder of Thimble. Individual kits are available for $89 or can be as low as $59 each when they are part of a 12 month subscription. Pricing includes US shipping. For further information, please contact:
Thimble
www.thimble.io
New Products - Aug 17_Mar15 - NewProd.qxd 7/4/2017 7:35 PM Page 15
beginning with the basics, and is extremely interactive, encouraging exploration and experimentation. Included with each lesson is an assignment or discussion question. Normally in electronics textbooks, readers would find a number of questions to test their understanding of the topic. The interactive nature of the EPTSOFT courses means they can take a much more exciting approach with a broader assignment, encouraging students to explore the topic further and learn by testing their own inputs/measurements within the apps. As these courses are self-evaluated, users do not have to satisfy an instructor — only themselves that they fully understand the topic before moving on. Businesses can purchase these courses as an employee
benefit or around which to develop their own trainees and apprentices. Parents wanting to provide a little extra help to their children can buy the course as a gift. In addition to the online course content, EPTSOFT is giving a free PC based app (‘Electronics, Mechanics, Maths & Computing;‘ worth around $150 and available on Amazon). First published in 1992 as PC based Educational Software, these apps have since been developed and installed on thousands of computers by individuals, schools, and colleges worldwide. For further information, please contact:
EPTSOFT Limited
www.eptsoft.com
Affordable Robots-as-a-Service
R
EADY Robotics announces their robots-as-aservice solution to handle real industrial tasks; the system (called TaskMate) is flexible enough to be deployed in just hours. READY Robotics' unique combination of plug-and-play tooling and easy programming interface makes the formerly expensive and complicated task of automation achievable for manufacturers. Traditionally, industrial robotics has required a lot of highly customized integration work, with upfront costs typically running several times the cost of the robot arm itself. Even worse, with the process often requiring weeks, integration took up lots of time. The TaskMate can be up and running in a matter of hours at a fraction of the cost of traditional solutions. One main advantage of the READY Robotics’ TaskMate platform is its flexibility. The system can be retooled in just minutes with grippers from companies such as Schunk, Piab, Schmalz, and Robotiq. It can connect with machine tools and peripherals using a multitude of interfaces, including 24 volt I/O, PLC, and TCIP/IP. The TaskMate can store tasks for later and be deployed in minutes where the need is greatest using its mobile base and READY's proprietary localization system. In addition to its flexibility, READY Robotics also disclosed that the TaskMate now carries an IP54 rating, significantly increasing the number of applications in which the system can be safely and reliably deployed. The
READY Robotics
www.ready-robotics.com
If you have a new product that you would like us to run in our New Products section, please email a short description (300-500 words) and a photo of your product to:
[email protected]
LED Lighting for Everything
)
For the finest in robots, parts, and services, go to www.servomagazine. com and click on Robo-Links.
TaskMate also supports the entire line of collaborative robot arms from Universal Robots. For further information, please contact:
SERVO 08.2017
15
bots
Bots in Brief - Aug 17_Bots in Brief Mar15.qxd 7/4/2017 9:20 PM Page 16
IN BRIEF
thrust motors. The robot is mounted on an angled rail and when n terms of overall bang for your it’s time to fly, it spins up its reaction buck, solid-fuel rockets are pretty wheel and sets off the primary great. They’re simple, very reliable, rocket. The rocket launches the and offer respectable efficiency in a robot on a parabolic trajectory with very small form factor — as long as a maximum range (in earth gravity) you’re prepared to handle a lot of of up to about 30 meters, which thrust all at once and then never would increase to about 200 meters again. under lunar gravity. While some robots have The reaction wheel minimizes attempted to use rockets to jump the effect of the robot body from place to place, controllability tumbling during flight, keeping the has always been an issue, since robot going in a straight line. Since solid-fuel rockets give you a fixed solid-fuel rocket engines can’t be amount of thrust whether you want throttled, the opposing thrust it or not, and that thrust isn't always motors are fired when necessary to directed in exactly the way you'd alter the robot’s trajectory for a Photo: Evan Ackerman/IEEE Spectrum like. targeted landing. At the recent ICRA, researchers It’s a fairly effective technique, and from the Japan Aerospace Exploration Agency (JAXA) in their tests the standard deviation of a series of launches introduced a small robotic explorer that uses a single soliddecreased from 1.2 to 0.29 meters. fuel rocket to launch itself into the air. What’s new is that The obvious downside with a robot like this is its lack of their robot includes some braking rockets that help it make reusability. However, you might decide to bring a bunch of pinpoint landings, as well as a clever gyroscopic system to these little rocket explorers along on a rover mothership, make sure that it flies straight as well as providing a way for rather than a single larger system that’s reusable, but has the robot to get around after landing. shorter range and is more complex to operate. The 450 gram robot consists of a housing with batteries and sensors, a reaction wheel (also inside the housing), a primary solid-fuel rocket engine (an Estes C11 with a total impulse of 10 newton-seconds), and two smaller opposing
ROCKET MAN
I
Photo: Toio
DON’T TOIO WITH ME ew from Sony — the company that brought you Aibo and Rolly — comes a new consumer robotic toy: Toio. It’s a “toy platform” consisting of little robotic cubes on wheels. It’s much cuter and way more fun looking than it sounds, and could be just clever enough to keep kids interested for more than five minutes. There’s not a lot of technical details on how the Toio cubes work, but they appear to have a pair of wheels at the bottom, some number of basic sensors, and bumps on top that are compatible with
N
16
SERVO 08.2017
Bots in Brief - Aug 17_Bots in Brief Mar15.qxd 7/4/2017 9:22 PM Page 17
bots
IN BRIEF ROBOTS CAN JUMP ate last year, Duncan Haldane ended up on the cover of the inaugural issue of Science Robotics with his jumping robot, Salto. Salto had impressive vertical jumping agility, and was able to jump from the ground onto a vertical surface, and then use that surface to change its direction with a second jump. It was very cool to watch, but the jumping was open-loop and planar, meaning that two jumps in a row was just about all that Salto could manage. However, thanks to some mechanical fine-tuning and the clever addition of a pair of thrusters, the new Salto-1P is jumping longer, faster, and higher than ever. Prepare to be amazed! Salto is short for “Saltatorial Locomotion on Terrain Obstacles” — a reference to saltatorial animals, which are adapted to locomotion by jumping. Kangaroos and rabbits are a few saltatorial animals that you’re probably familiar with, but Salto was particularly inspired by the galago (or bushbaby) which has a vertical jumping agility that no other animal can match. The galago is able to manage this thanks to a rather clever bit of leg design which uses variable mechanical advantage, leveraging the
L
shape of their leg to amplify the force that their muscles can deliver. The original Salto was able to control its pitch through the use of a rotating inertial tail. By spinning the tail one way, the robot could pitch itself in the other direction. This worked very well but only in one plane, which made Salto difficult to control. Salto-1P is,(according to Haldane) essentially “Salto with half of a mini-quadrotor glued to it.” Those two little thrusters are able to control Salto-1P’s yaw and roll. When they’re thrusting in different directions, the robot yaws; when they both thrust in the same direction, the robot rolls. Combined with the tail, that means Salto-1P (which only ways 98 grams) can stabilize and control itself in three dimensions — even in mid-air — which is what allows it to chain together so many jumps. Other hardware modifications include a deeper crouch than the original Salto which allows more energy to be transferred from the jumping motor into the spring, giving it the highest vertical jumping agility of any battery powered robot at 1.83 m/s.
LEGOs. The robots are each approximately 32 mm x 32 mm x 19.2 mm (width x depth x height). They communicate via Bluetooth to a video game-type console where you insert a cartridge, which tells the robots how to behave. There are also motion-sensing rings that act as controllers and let you make the robots drive and spin around. Toio kits come with special mats, so it appears all the tricks Toio does are made possible by optical pattern localization. This method allows robots to find their position by using a downward facing camera and looking at patterns underneath them. The robots then communicate with a centralized controller to simulate interactive behavior with one another.
SERVO 08.2017
17
Bots in Brief - Aug 17_Bots in Brief Mar15.qxd 7/4/2017 9:23 PM Page 18
MAKE MINE A COZMO hen Anki introduced Cozmo about a year ago, there was a bit of skepticism, and a feeling that Anki was going slightly overboard with the kinds of promises that it was making for this cute and capable little robot. What was more exciting was when Anki followed up a few weeks later with Cozmo’s software development kit (or SDK) allowing access to a variety of very sophisticated features through relatively simple lines of code. Instead of having to worry about the software necessary for navigation, object recognition, manipulation, and all of that complicated robotics programming, Cozmo already knows how to do it and gives you direct access to its capabilities — all on a robot that will cost you under $200. Now, Anki is announcing Code Lab, which takes that SDK and adds a graphical drag-and-drop interface that makes it incredibly simple to get Cozmo to do complex tasks involving vision, manipulation, and decision making — even if you have zero programming experience. Cozmo has a great SDK that allows access to lots of high-level functionality. For example, a few simple commands can leverage Cozmo’s ability to localize and plan paths that avoid obstacles, manipulate blocks, and even recognize faces and emotions, and respond with its own “emotions.” In order to use the SDK, however, you do have to know how to code. You’ll need some experience with Python, and be willing to read the SDK documentation so you understand how to get the robot to do what you want. For most people who buy a Cozmo, this is a significant barrier to entry. It’s also a barrier for parents or teachers who might want to help young kids learn to code with Cozmo. To solve this and make the whole process easier and more accessible, Code Lab adds a graphical user interface (or GUI) on top of the SDK, based on MIT’s visual programming language, Scratch. Colorful interactive blocks represent different functions, and by dragging and dropping those blocks (and making some minor edits to their parameters), you can get Cozmo to do all sorts of custom behaviors. Once you’ve reached the limitations of the GUI, you can comfortably take the next step into the underlying Python code. Anki also plans to release another layer (called “vertical grammar”) that will allow you to go the other direction, implementing custom Python code and more complex functionality into blocks in the GUI, which is a very cool idea.
W
Photo: Anki Anki’s Code Lab is an easy-to-use graphical interface based on MIT’s Scratch: a popular visual programming language.
18
SERVO 08.2017
Bots in Brief - Aug 17_Bots in Brief Mar15.qxd 7/4/2017 9:24 PM Page 19
FREE Software
Photo: Georgia Tech
MUSIC MAN he Georgia Tech Center for Music Technology, led by Gil Weinberg, has a reputation for doing incredible musical things with robots, with a mix of creativity and technical expertise in robotics and AI. For example, a cybernetic second arm for a drummer, a cybernetic third arm for a drummer, and a bunch of interesting research on ways that robots can dynamically collaborate with humans in the context of improvisational music. That last thing usually features Shimon: a four-armed expressive robotic marimba player which can analyze music in real time and improvise along with human performers. It’s an impressive thing to watch, but Shimon’s talents were mostly restricted to riffing on what other human musicians were doing. Now, Shimon has leveraged deep learning to create structured, coherent, and totally unique compositions of its very own. Shimon’s teacher (of sorts) is Georgia Tech Ph.D. student, Mason Bretan. The melody and harmonic structure that you would hear is the output of a four-measure-long seed melody running through a neural network that’s been trained on nearly 5,000 complete songs (including music by Beethoven, The Beatles, Lady Gaga, Miles Davis, and John Coltrane), along with two million motifs, riffs, licks, and other foundational musical elements. It’s important to understand that Shimon isn’t just mushing together different bits of music that it’s been programmed with or that it’s using some kind of random-music generator. The special thing about what Shimon is doing is that its deep neural network has — in effect — listened to those thousands of songs, and its compositions represent everything it’s learned from analyzing them. It’s able to generate harmonies and chords, and it focuses (like humans do) on the overall structure of the composition rather than simply what note should come next in an existing sequence. Bretan calls this “higher-level musical semantics.” Shimon’s music isn’t something that we can necessarily identify with at this point because we’re hearing the creative output of a deep-learning system. Weinberg calls Shimon’s music “beautiful, inspiring, and strange.” It’s something with coherence and structure, but it’s also completely unique.
T
FRONT PANELS & ENCLOSURES YOU DESIGN IT WE MACHINE IT
NEW DIGITAL PRINTING
1-800-373-9060 www.frontpanelexpress.com SERVO 08.2017
19
Combat Zone - Aug 17_Combat Zone - Aug 15.qxd 7/4/2017 7:16 PM Page 20
To post comments on the articles included in this section and to find any associated files and/or downloads, go to www.servomagazine.com/index.php /magazine/issue/2017/08.
Atrocious: The $200 Hobbyweight — Part 2
● by Brandon Young
n Part 1 about Atrocious (that appeared back in the May 2017 issue), I went over some of the background information about this build, including inspiration for the robot as well as the design inspiration. In this article, we’ll continue on to the
I
Featured This Month: 20 Atrocious: The $200
Figure 1.
Hobbyweight — Part 2 by Brandon Young
22 Warwick Robotics STL Travels to Colorado by Ricky Matsko
25 BUILD REPORT: A 3 lb Full-Body Spinner by Dylan McCarthy
27 InsaniTi: When Overkill is Just Enough — Part 1 by Andrew Burghgraef
20
SERVO 08.2017
acquiring of parts and showing the beginning of construction. With the design of a lifter being nailed down, I decided to start gathering parts. By having a cost cap of $200 and a weight cap of 12 lb, it put me in a bit of a squeeze. Generally, my robots are constructed with the use of UHMW (Ultra-High Molecular Weight) polyethylene plastic.
It’s naturally very good at flexing, making it a good contender to absorb impacts and (hopefully) some of the forces of the more massive machines. I elected to keep using this material since I was accustomed to it. After receiving them from McMaster-Carr in only about a day and a half (Figure 1), I went to use the mill available at my college’s machine shop. I began constructing
Combat Zone - Aug 17_Combat Zone - Aug 15.qxd 7/4/2017 7:16 PM Page 21
the chassis from this material. The result of this first round of milling is shown in Figure 2, with the central frame rails being linked to the front block. In addition to this chassis design, I went with brushless in order to keep the price low. In “modern day” combat robotics, there is a movement affectionately called “Brushless Hipsterism” which refers to the transition towards using brushless motors over brushed ones. There have been previous articles here in the Combat Zone that have talked about this topic in-depth, but the gist of the movement is that by using brushless Figure 4. motors of comparable size to a brushed motor you get a larger amount of power. This is due to brushless motors having much more power pound-forpound than a comparable-sized brushed motor (this term is known as power density). Therefore, with this design, I used a pair of Traxxas Velineon 3,500 kV motors that I had from hobby monster trucks that I race on the side. These motors (which will be running on 3s LiPo batteries) were then paired together with drill motor gearboxes from Harbor Freight. By pairing these together, I was hoping to get a fast and cheap drive train to offset the lifting weapon (when one doesn’t have a high kinetic energy like a spinner, it’s good to be able to run faster!), and keep weight down. Moving on, the next stages of manufacturing included building the drive train. In Figure 3, you can see that the base is starting to take shape, as well as the drive train. The wheels are 3” x 7/8” Colson versions which are being driven by hubs (shown in Figure 4), which will be used to connect the FingerTech Robotics’ pulley to the drive motor. Those hubs will be tapped for #6-32 screws and lock the hub in place. This whole driving arrangement can be seen in Figure 5 (though the end cap is
Figure 2.
Figure 3.
Figure 5.
SERVO 08.2017
21
Combat Zone - Aug 17_Combat Zone - Aug 15.qxd 7/4/2017 7:16 PM Page 22
covering a part of it). The second key factor of the drive train is the use of 3D printed pulleys. Since it is relatively quick and inexpensive to 3D print items, I had the idea to print pulleys as a means to easily create and replace drive train components. Since the game of this robot was to keep things cheap, I used the makerspace at my college to print several experimental types of pulleys to try. I tried to maintain the
Figure 6.
use of 3 mm HTD pitch for the teeth, but due to the small size and low tolerances of the shape, it wasn’t wellsuited to print on machines that are more accustomed to print less precise geometry. Additionally, I took the gamble to use the common material, PLA since it is so plentiful. The results of this choice, wrapping up the manufacturing, and the event report will be covered in Part 3. Stay tuned! SV
Warwick Robotics STL Travels to Colorado ● by Ricky Matsko
knew with the lack of events in the Midwest, someday I would have to travel for a robotics tournament. I saw the perfect opportunity when Casey Kuhns posted that he was hosting an event at the Rocky Mountain Steamfest in Boulder, CO back in April. I signed up my Antweight: 10 Days Til Destruction (referred to as TDTD from this point on). I was very excited to debut a new setup with a 5.2” 3 mm titanium blade (ditching the 3-3/8” carbide tipped blade I had used up to that point) and a pair of titanium skids designed to keep the blade suspended, preventing it from
I
causing difficulty driving and coming in contact with the ground. From the 3D prints I mocked up, these skids made driving so much easier! I picked up the water-jetted parts the day before our flight, and found I had a lot of trouble with mounting the new blade. I somehow managed to strip the only two weapon hubs I had in my possession. Thankfully, Sergeant Cuddles builder, Robert Cowan came to the rescue and generously offered to help me get TDTD ready for combat. As soon as we landed in Colorado and picked up the rental car, we went straight to Robert’s home and got to
working on drilling the hole pattern to mount the blade on the weapon hub, rather than screw it on. I should also mention at this point that I signed up my new Beetleweight, From the Top of Skyscrapers, but unfortunately, despite staying up until 4 in the morning before the competition (you know, a normal bedtime before a competition), the wiring demons kept me from being able to get this bot ready to go in time. Admittedly, in the weeks before the competition, I put more time in getting the Beetleweight ready, so imagine my surprise when I put TDTD
The 5.2” 3 mm titanium blade.
New skids installed showing suspended blade.
22
SERVO 08.2017
Combat Zone - Aug 17_Combat Zone - Aug 15.qxd 7/4/2017 7:16 PM Page 23
Makeshift hotel workspace.
The damaged Angry Accountant.
in the arena to safety, only to find that I had somehow wired the new motors completely backwards. This will be one of the many instances that displayed how novice my bot-building skills are. As I was going to take the bot out of the arena, Zach Goff asked me if all was good with the bot and said I was up against Zoolander — a crazy bot that consisted of a monstrous horizontal saw blade and a pair of FingerTech wheels attached to one drive motor. This bot was built by Luke Quin — the same builder as the super powerful Beetleweight, Rum Ham. I’ve practiced driving enough to where I felt fairly comfortable with the bot’s botched configuration, so TDTD was locked in the arena and battling it out in one of the most destructive fights I’ve been a part of. By the time I was finished with Zoolander, my *brand new* viper frame was completely bent, one of the skids was mangled, and Zoolander’s giant blade managed to hit the space between the body and one of my wheels, which managed to sheer the head completely off of one of the bolts that holds the motor in place. (This fight is uploaded online, and it is very entertaining!) The weapon hub I wound up using on the day was the same one that I used for a total of 10 fights over two competitions, so it was seeing better days. Unfortunately, the new weapon hub that I bought sat slightly lower on the shaft, so the
blade hit the ground when I used it. I’m not sure if it was the age of the weapon hub or the additional weight of the new blade, but TDTD’s weapon blade flew off five out of six fights. Also, after the Zoolander fight, I tried to quickly swap the wiring on the motors which fixed the front to back issue, but left still went right, and right still went left. Thankfully, I’ve put in many hours practicing driving TDTD right side up and inverted, so I was okay with driving like the bot was upside down. Being that I was using up all my repair time between matches, I wound up keeping this driving configuration the rest of the day. My second fight was against Angry Accountant, who I have anxiously followed since I saw pictures Pete Covert posted in the Combat Robotics group on Facebook. The new blade Pete made for RoboGames looked like it was going to cause quite a bit of damage, so I knew I needed to strike fast and strike hard (and hope my blade lasted a few hits before the inevitable eject mode I didn’t realize I added into the weapon system). Fortunately for me, I got in some really good hits early, and Angry Accountant’s weapon stopped working. This fight went to a judge’s vote, where TDTD took the win on a 2-1 decision. Afterwards, Pete said that TDTD dished out some of the biggest damage he’s ever taken, which was a massive compliment to
the new weapon. My third fight was against a fun little 3D printed lifter bot called NoStepOnSnek. Out of the gate, I got a good pop which caused pieces of PETG to fly and NoStepOnSnek ended up getting stuck on his back, giving TDTD the win. Let’s skip ahead to the final match of the day, where I finally went up against Sergeant Cuddles: the bot I’ve wanted to face since I saw the build report video online over a year ago. Robert completely redesigned the bot from the previous AVC event in July, and added a titanium beater drum. The day was coming to an end, and TDTD just finished a quick match against Oreo Blizzard. I took TDTD out of the arena and was told I had one match left against the not so cuddly one. I asked Robert if he was ready, and we were locked and primed to go. I should have at least tightened the blade on the weapon hub for TDTD because the blade kamikazed itself less than 15 seconds into the match. Cuddles took full advantage of this, and proceeded to knock me upside down. My shoddy soldering work showed as the wire came off one of the motors, and TDTD attempted to strike fear into the heart of Cuddles by crab walking towards him. Somehow, that didn’t concern Robert very much, and he ripped one SERVO 08.2017
23
Combat Zone - Aug 17_Combat Zone - Aug 15.qxd 7/4/2017 7:16 PM Page 24
Front view with the titanium skid removed. TDTD from the top showing the damage from Cuddles.
I also saw that the of the titanium skids from battery was scraped by the the body. I have made it a beater drum a few times, but point to try and make my not enough to cause a LiPo matches as entertaining as kaboom. they possibly can be -Somehow, despite the whether I’m on the winning blade having trouble staying or losing side. I’ve also on most of my fights, TDTD promised myself that unless a went five wins and one loss battery is exposed, I will not on the day. When it came tap out of a fight. time to announce the overall Most people would have standings of the event, it tapped out 45 seconds into Most of the participants. In Beetles, Rum Ham got first was revealed that TDTD this battle, but I wanted place and Just A Wedge got second place. came in second place to the Sergeant Cuddles to have the well-deserved victor, Angry opportunity to entertain the Accountant. the jack to disable the bot, only to crowd and show them what his I had an incredible time traveling find that the jack was knocked free weapon could do, so I let him go flip to Colorado, and I hope to make it from the bot and sat loose inside. crazy on TDTD. back for the AVC event in October. Final death toll for this fight was Robert decided that he would Event Organizers, Casey and Zach put as follows: two Silver Spark motors leave the bot for a few seconds to on an amazing event, and I had so completely destroyed; the front of the drive across the arena and send my much fun throughout the day. detached blade flying into the Lexan frame that held the titanium skids was I met a lot of great people, and I wall. Casey asked if I was finished, significantly damaged; the nut that felt we kept the crowd very and I said I was having too good of a was used to secure the power switch entertained. Casey and company did a time, and he would have to count me was gone; and the Turnigy D2822/17 top notch job on the new arena, and out for this to end! weapon motor (that had lasted me 16 fights before this one) was completely hopefully the new non-viper kit I made it a majority of the match ripped from the body of the bot and version of TDTD will get to see the before being counted out. I went to inside of those Lexan walls sooner the shaft was noticeably bent. put the FingerTech power switch into
24
SERVO 08.2017
Combat Zone - Aug 17_Combat Zone - Aug 15.qxd 7/4/2017 7:16 PM Page 25
BUILD REPORT: A 3 lb Full-Body Spinner pinjitsu is my second attempt at a Beetleweight robot with a horizontally-spinning weapon. After the failure of my previous three pound robot, Nocturne, I decided to start from scratch and design a brand new Beetleweight for Motorama this year. After looking at several designs and weapons, I chose to design a fullbody “shell” spinner. I’ve always been a fan of this design, and after seeing Zac O’Donnell’s 30 pound Triggo dominate the Featherweight scene, I wanted to see if I could replicate its success in a smaller weight class. There are very few full-body spinners in the 3 lb class, which is part of the reason I made it. It’s something different. Spinjitsu was designed with weapon power in mind. It’s a fairly standard design for a full-body spinner; the only real difference of note is the tooth shape. I designed it to slice into UHMW frames and wheel guards, with sharp points at the end of a curved shape.
S
This design was inspired by both Xo Wang’s robot, Margin of Safety (for the concept) and Brandon Wiebe’s Scary Thing (for the shape). If nothing else, they look cool, and I always want my robots to at least look nice. After opening up my CAD software and designing the basic framework, I got to work cutting materials. To conserve weight, the box chassis was constructed from 3/8” UHMW, with 1/16” garolite from FingerTech Robotics acting as both the top and bottom covers. The weapon shaft (made of 3/4” steel) is held into place using two UHMW blocks and screwed into the bottom frame with a large bolt. Originally, I had a steel shaft collar from McMaster-Carr on the top of the shaft to keep the shell from popping off, with a thin UHMW “flag” screwed into that so I knew which way the front was pointing. However, this turned out to be too heavy, so at the last second I cut a different flag out of thicker plastic, foregoing the shaft collar entirely. The
● by Dylan McCarthy
weapon shell itself was cut out of a large sheet of steel my dad had lying around at the shop, using a template I was able to print out from the CAD software. The teeth were cut from a different sheet of 1/16” 4130 steel. As far as electronics go, I chose FingerTech’s Silver Spark motors and tinyESCs due to their reliability in my Antweight robot, FireArrow, as well as their light weight. I figured that since the wheels were protected by the shell, the thin drive shafts would not be an issue in combat. I originally planned to run four motors, but weight constraints forced me to run two, with two other wheels free-rolling on 3/16” shafts. The weapon motor is an NTM Prop Drive motor, which I chose due to the success many other builders have had in using them. I selected the 28-36 size because it was the tallest motor that would fit in the chassis. The battery was a standard Turnigy Nanotech LiPo with a capacity of 850 mAh. This was the same battery Nocturne used, so I knew it
CAD drawing of Spinjitsu. The self-righting pole was scrapped due to weight constraints.
Spinjitsu’s frame and shell mid-assembly, showing all of its internals.
SERVO 08.2017
25
Combat Zone - Aug 17_Combat Zone - Aug 15.qxd 7/4/2017 7:16 PM Page 26
Bent teeth after combat. They weren’t solid enough at all.
The finished version of Spinjitsu, ready for Motorama.
would run for the full three minutes. Spinjitsu debuted at Motorama in February, and struggled from some bugs and design flaws that could only be discovered in the arena. In its first match, I fought a robot with a wedge and a vertically-spinning beater bar. The first hit my opponent got with its beater bar knocked the whole shell assembly upwards, pushing the pressfit flag off of the shaft and causing the weapon belt to pop off of the pulley. I chose to tap out rather than suffer three minutes of damage.
This match also proved that the teeth were not made of a thick enough material, as they had bent upwards after only a few seconds of combat. After hammering these flat, we decided to drill a hole into the top of the shaft, and screw a bolt in which would hold some washers in place over the flag. This whole assembly was to keep the shell from jumping again. In its second fight against a standard wedge bot, Spinjitsu was putting up a decent fight when it stopped dead after a wall impact. I was able to trace this problem back to
a loose wire in the system. An unfortunate way to lose, but that’s how it goes sometimes. The teeth had also bent upwards again; this time from simply hitting the arena kickplate. For the next competition, I plan to replace the blades I had designed with much thicker weapon teeth in order to prevent this. In conclusion, a full-body spinner is a tough robot for anyone to pull off, so watching mine take shape was an exciting process. Despite its early failure in its debut, I have hopes that I can keep improving on this design and eventually emerge with a championship-winning machine. SV
Make your machine move MICRO LINEAR ACTUATORS · 10mm-300mm stroke · 25kg+ available force · 6v-12v power supply · 15g-100g net weight ACTUONIX . COM
26
SERVO 08.2017
Combat Zone - Aug 17_Combat Zone - Aug 15.qxd 7/4/2017 7:16 PM Page 27
InsaniTi: When Overkill is Just Enough — Part 1 ● by Andrew Burghgraef
et me tell you a little bit about myself to help everyone understand why I built such an over-the-top 3 lb combat robot. This is my second custom bot (not including the FingerTech Viper kit I built, as featured in the August 2016 issue), with the first being a boring 12 lb 2WD wedge bot. I'm also a machinist apprentice which gives me free shop time off the clock, so using machined parts is what I do without costing a fortune. I also did a year of mechanical engineering at college where I learned how to use SolidWorks and, of course, got the student version of the software.
L
This project all began in fall 2016. I wanted to build a Beetleweight (3 lb) for Motorama 2017 to go along with the 1 lb and 12 lb bots I competed with at last year’s event. I originally started by designing a horizontal spinner in the summer, but it was a terrible idea in so many ways that I changed direction and started
Early CAD photo showing one of the initial weapon rail designs, as well at the aluminum rear panel.
on a vertical spinner. I wanted to build something cool and unique — yet effective. So, I started drawing something up in SolidWorks. It was going to be a hybrid frame, using UHMW (ultra-high molecular weight polyethylene), carbon fiber, and titanium. The idea was to use thinner UHMW with carbon fiber making it rigid, and titanium on the front to protect it from horizontal spinners. With the thinner than normal UHMW, this was done to build a lighter (yet equally strong as the more common 3/8” UHMW) construction. This idea ended up falling short in a few ways; the biggest one was that it was actually heavier. Carbon fiber weighs more than UHMW and I couldn't make the UHMW thin enough to save weight without compromising its rigidity. That idea was a bust. This is where things got interesting. I was talking with a fellow roboteer about the new bot he was
designing, which used a lot of titanium. He has access to a water jet machine to do all his cutting, and had just ordered some material and would have some left over. After a bit more discussion and for entertainment purposes, I started drawing an all welded titanium frame. It was going to use 1 mm, 2 mm, and 4 mm material. My friend had the thicker material and I already had the 1 mm sourced from FingerTech Robotics. After a few hours of drawing, I noticed this would, in fact, be possible.
Why Titanium? Who in their right mind would make an all titanium frame for a Beetle? Titanium is very expensive, but has a very high strength-to-weight ratio, making it ideal for combat robots. It’s also very stiff and springy, and fairly hard. I wanted to take advantage of this by making a very rigid frame with the main focus being
The quick initial CAD drawing of the UHMW/carbon fiber hybrid chassis.
SERVO 08.2017
27
Combat Zone - Aug 17_Combat Zone - Aug 15.qxd 7/4/2017 7:16 PM Page 28
The final render of InsaniTi as built.
on energy transfer. With a soft plastic like the common UHMW, it will dampen the shock of big hits a bit, which is good to keep electronics happy. However, I feel that would take the edge off the big hits, and I wanted a very hardhitting bot. With the frame itself damping basically no shock, I’d have to see how the electronics liked it. Paired with a timing belt driven weapon, there should be no slip or give in anything leading to very hard hits.
All Welded Frame Making an all welded frame has some big positives and some big negatives. The single biggest con to having a fully welded frame is serviceability. I can’t tig weld, and it’s a safe bet there won’t be someone else set up to tig weld titanium at most events. I planned to deal with this by simply building it so beefy it wouldn't get damaged with 4 mm thick weapon rails and front plate, 2 mm sides, and 1 mm for the back and bottom.
28
SERVO 08.2017
All the frame parts fitted together Now on to the real before welding, note the aluminum reasons I did it ... bar to align the weapon rails. With the thin material required due to its high panel (even with screws near the strength, end tapping it and screwing edge), I believe it could have been it together simply isn't an option. Not peeled back, scoring against me for to mention that tapping titanium is damage, as well as possibly exposing zero fun. The other option was to use any of the many wires back there. All FingerTech NutStrip (or equivalent). in all, with the fully welded frame I basically put all my eggs in one I didn't go this route for a couple basket, believing (hoping!) that it reasons. I would have needed to make wouldn't get damaged. the frame a bit bigger as the NutStrip After about three months of takes up space inside the bot which I working on the design, I finally had it simply didn't have. The other reason is all done. During this time, it changed it would have created seams on the a whole lot while I was trying to outside. Especially with the thin back figure out the best way to make it all go together, as well as how to design the whole front end. The sides and bottom were virtually unchanged from the initial design, other than adding some small details (mounting holes for the drive motors and power switch placement mostly). Plus, the back panel was changed from an elaborate milled aluminum piece to the 1 mm titanium — mostly to The titanium frame save building time. Since the all together, ready frame would be water jet for assembly. cut, this also gave me the
Combat Zone - Aug 17_Combat Zone - Aug 15.qxd 7/4/2017 7:16 PM Page 29
The motor mount start to finish, squared up block, 3 sides machined, and completed part, milling away over 85% of the original block. All done on a manual mill.
chance to have the bot name etched into the back panel as well. Using the Metallica font, the bot name looked great in my CAD program, but I forgot to account for the big stream diameter (about 0.040”). So, the radiused corners looked terrible for the size and shape of the font, so a second back panel was cut. I made the main frame basically as small as I could and still have confidence that everything would fit inside. It ended up being about 4.125” x 4.250” — just wide enough for the drive motors and long enough to have the weapon motor in front and the battery flat in the back. The front end had seen a few changes in design ideas, but I ended up settling on using 4 mm titanium for the weapon rails and the front plate, with 2 mm gussets. If you're wondering why I have such thick material on the front when it can't get hit, this is to give it crazy rigidity. I decided to attach the weapon motor on an L shaped motor mount that would bolt to the front plate instead of the bottom plate. With the goal of hitting really hard, I didn't want the motor moving or flexing at all. I put a lot of pocket in it to reduce weight, but it was still stiffer than 2 mm titanium would have been.
Mounting the weapon motor like this wouldn’t allow me to put slots for motor position adjusting, as I was afraid under impact it would move the motor. So, instead, I could make shims to space the whole mount back to tighten up the belt if necessary — all while having no chance of it moving. The next critical feature was the profile of the actual weapon rails. I originally was aiming to protect the weapon from horizontal spinners, but opted to trim it back for a pretty minimalist profile with little wedgelets to help get under wedges. This was done so there's much less frontal area of the bot that can be hit, making it more likely to have an advantage over other vertical spinner. So, that's it for the design process and frame construction. Next month, I'll cover the rest of the build, including the beater assembly as well as all the electronics used, and other details. The rest of the bot had the same amount of brainstorming and work, so you certainly want to hear about that! SV SERVO 08.2017
29
Leeman - Multi-Rotor Hobbyist - Aug 17_Blank Rough SV.qxd 7/4/2017 7:09 PM Page 30
Taking the Earth’s Temperature with Aerial Infrared Mapping
The Multi-Rotor Hobbyist
By John Leeman To post comments on this article and find any associated files and/or downloads, go to www.servomagazine.com/index.php/ magazine/issue/2017/08.
Knowing the temperature of the earth’s surface can tell us a lot of things. Is there ice or snow on the ground? Could snow stick if it falls? Is the ground wet? What is the soil temperature crops are experiencing? Ground temperature data is collected by many weather stations (the Oklahoma Mesonet even has temperatures at different depths https://www.mesonet.org/index.php/ weather/category/soil_temperature; Figure 1), by aircraft, and by satellites. Unless we actually put sensors into the soil (in-situ monitoring), we have to measure the infrared radiation that comes off the ground.
T
his month, we will build an infrared/color sensor package and install it on a multi-rotor to collect our own ground temperature surveys. To be useful, the data needs to be geotagged. We will tag the data with a GPS position, and then plot and explore our data. While I’m using IR temperature and color sensors, this project can easily be adapted to your sensor of choice — everything from range sensors to Geiger counters.
IR Sensors
Figure 1: The Oklahoma Mesonet measures ground temperature at several depths across the state — an important piece of information for the agriculture industry.
Theory of Operation Contactless IR temperature sensors are generally pyrometer sensors. This type of sensor measures the temperature change of some radiation absorbing element and relates that to the amount of radiation coming from the object of interest — and therefore the temperature of the object. More specifically, we will be using a sensor from Melexis’ MLX90614 family (P/N MLX90614ESF-BCF-000-TU). These are nice self-contained non-contact sensors that have the temperature measuring, amplification, ADC (analog-todigital converter), and signal processing onboard. This saves us the frustration of dealing with the small signal generated from these devices and implementing our own filtering.
30
SERVO 08.2017
(Image courtesy mesonet.org)
More specifically, these sensors are based on a thermopile. This means that there are multiple thermocouples in series with their hot junctions connected to the IR absorbent material and their cold junctions bonded to the silicon wafer of the sensor. The very small voltages generated by each thermocouple are summed at the inputs of a built-in chopper amplifier. The amplified signal is then digitized and filtered to give us the desired update rate and highest resolution. In fact, for the temperature ranges we will be working in, the sensor should be good to about a half of a degree Celsius. To protect the thermopile, there is a silicon window on the front of the sensor. A normal sheet of glass is
Leeman - Multi-Rotor Hobbyist - Aug 17_Blank Rough SV.qxd 7/4/2017 7:09 PM Page 31
transparent to light in the visible range, but is an excellent blocker of infrared radiation. The silicon is opaque to visible light, but transparent to infrared wavelengths. Thanks to advances in silicon fabrication and machining techniques, not only is this a protective layer, but it can be formed into a lens to help focus the infrared radiation onto the sensor. This (along with any shielding) can determine the width of the sensor’s field of view (FOV). Since this sensor will be used high off the ground, we would like the smallest FOV possible to be able to measure the temperature of the ground at the highest spatial resolution possible. There is more to these sensors, including emissivity corrections, but that is beyond what we need to know for this simple application. Communicating with the Sensor The MLX90614 uses a peculiar form of I2C, but luckily, there are libraries out there to easily talk to it. I chose to use the Adafruit library, which can be downloaded from their GitHub page (https://github.com/adafruit/AdafruitMLX90614-Library) and installed by putting it in the Arduino/Library directory on your computer. To use the sensor, we need to include the Wire and Adafruit library headers. We then create an instance of the sensor class and call the .begin method. Then, the temperature of the object the sensor is “looking at” as well as the ambient temperature of the sensor (the cold junctions) are easy to get with the readAmbientTempC, readAmbientTempF, readObjectTempC, and readObjectTempF methods.
GPS We will also use a GPS that allows us to record the time and position of the temperature readings we get from the IR thermopile. The GPS network is really an incredible piece of engineering that you can access for just a few dollars! Most any GPS module will work, but I’ll be using a very old Parallax version that I had in my scrap bin. If you don’t have a GPS in your parts bin, something like the GP735 (https://www.sparkfun.com/products/13670) or GP-20U7 (https://www.sparkfun.com/products/13740) would be a good choice. We will be using the raw NMEA output of the GPS. This is the National Marine Electronics Association’s standard GPS message format. Data is sent across a serial connection as a simple ASCII text string that is standardized and can be understood by a multitude of parsers and devices out there. To decode our NMEA strings, we’ll use Mikal Hart’s TinyGPS++ library, which can be downloaded from his website (http://arduiniana.org) or GitHub (https://github.com/mikalhart/TinyGPSPlus). We connect the GPS to a serial port and the library parses the strings and makes the data available as attributes on the GPS object.
On Arduinos with only a single hardware UART port (Uno included), the software serial library can be used to create a software buffered serial port. There are disadvantages to using software created serial ports; mainly missing messages due to limited buffer sizes. An Arduino with multiple UARTs can be used. In my case, I’m using the Wildfire from Wicked Device (http://shop.wickeddevice.com/product/wildfire) as it has two UARTS, as well as an SD card slot built in. There is also an onboard watchdog timer and Wi-Fi, though we won’t be taking advantage of those for this project. I highly recommend keeping one of these in your dev-board tool kit as I often reach for it when working up projects. You can look at the examples included in the tinyGPS++ library for exhaustive querying of the NMEA string, but for this project, we will just log the latitude, longitude, altitude, speed, course, and number of satellites along with sensor readings.
RGB Color Sensor I was planning to stop with the IR sensor and GPS, but I stumbled upon the ISL29125 RGB light sensor (https://www.sparkfun.com/products/12829) and thought it would be a simple and fun addition. (The fact that I can swing by SparkFun on my way home from work is also an added bonus.) Could such an inexpensive sensor resolve the color changes at the surface from altitude? The sensor is a set of three photodiodes sensitive to the red, green, and blue potions of the spectrum. SparkFun has produced a library to talk to the sensor that is available on GitHub (https://github.com/sparkfun/SparkFun_ ISL29125_Breakout_Arduino_Library/tree/V_1.0.1). The sensor talks via the I2C protocol, similar to the MLX90614. We include the library and start the sensor with the init method. Then, we simply have to call the .readRed, .readGreen, and .readBlue methods to get the 16-bit value of each channel.
Logging to SD Card The Arduino IDE (integrated development environment) includes the SD library and some examples of how to read and write data to/from SD cards. Basically, it’s an SPI interface to the card. We call SD.begin with the chip select pin as an argument to get started. The library assumes connection to pins 11, 12, and 13 for the interface, and pin 10 for the chip select. Again, pinouts will vary depending on your setup. You can even hook up a separate SD card breakout such as the SparkFun version (https://www.sparkfun.com /products/13743), or even use the Adafruit Ultimate GPS logger shield that has the GPS, RTC, and SD card on one PCB (printed circuit board; https://www.adafruit.com/ product/1272). To write to a file, we need to open a reference to it SERVO 08.2017
31
Leeman - Multi-Rotor Hobbyist - Aug 17_Blank Rough SV.qxd 7/4/2017 7:09 PM Page 32
Figure 2: The completed instrument, ready for benchtop testing. Though there are a lot of wires, it really is a relatively straightforward application of the sensors and level shifter.
with File dataFile = SD.open(“datalog.txt”, FILE_WRITE); where datalog.txt is the name of the file we wish to write. We can then print and println to that file object — much like we would to the serial port: dataFile.println(dataString);. Once the writing is done, we need to close the file dataFile.close();. While opening and closing the file is not a particularly fast process, it is better than risking a corrupt or partially written file. Our data rate of 1 Hz is very slow, so we won’t have any problems opening the file reference each time we wish to write to it.
Hardware Construction If using these sensors on our quad was going to be routine, we could make a more permanent setup with a custom PCB and nice enclosure. Given that this is really a proof-of-concept application of these sensors, I elected to build up the circuit on a breadboard and temporarily affix it to the top of the quad’s flight deck. First, I soldered 6” lead wires (22 ga solid) to the power, ground, data, and clock pins of the IR sensors, as well as the color sensor. Both of these sensors are 3.3 VDC logic, but the Wildfire is 5 VDC logic; we need a logic level converter. I hooked the clock and data lines to the LV1 and LV2 ports of a SparkFun logic level converter (https://www.sparkfun.com/products/12009). I connected the LV and GND ports to the 3.3 VDC and ground header pins on the Wildfire, and then connected
32
SERVO 08.2017
Figure 3: IR sensor unit test sketch.
the sensor’s power as well. Next, I connected the 5 VDC power output of the Wildfire to the HV pin of the logic converter, and connected SCL and SDA to HV1 and HV2. The GPS will vary some from module to module, but my GPS unit requires the \RAW pin be tied to low to output raw NMEA strings. Otherwise, it operates in a “smart” call/response mode. I powered the GPS with 5 VDC and hooked the serial pin to pin D2 on the Wildfire. This is the receive port for the second onboard UART. If you are using an external SD card breakout board instead of the Wildfire, be sure to follow the hookup guide for that board. For those using the Wildfire, you’re all set! We now have a complete hardware setup (Figure 2). Next, we need to test out the various sensors to be sure that we don’t have anything hooked up incorrectly. Most of the sensor’s libraries come with example sketches that test out the sensor, but I’m perpetually frustrated by their output format. Often, I want to log the output for a few hours to make sure the sensor is responding like I think it should or to perform a simple calibration. Logging and parsing the output of many of these example sketches is frustrating! They are a multi-line poorly delimited display that is slightly more human readable, but mostly just odd looking. Maybe I’ve spent too much time watching data scroll across screens in various labs, but I prefer looking at tabular data. In the code repository and the zip file accompanying this article at the link, I’ve included improved examples that print simple tabular data in a comma separated values
Leeman - Multi-Rotor Hobbyist - Aug 17_Blank Rough SV.qxd 7/4/2017 7:09 PM Page 33
Figure 5: Color sensor unit test sketch. Figure 4: The poorly formatted output of most stock test sketches will drive you insane. It’s impossible to plot with the serial plotter and difficult to read as it scrolls by.
(CSV) format. Using programs like CoolTerm (http://freeware.the-meiers.org), I’ve logged data from these overnight to make sure light levels and temperatures made sense. Start out with the temperature sensor. Open the IR_Sensor_Test sketch (Figure 3) from the Test_Sketches directory and click the upload button. After a successful upload, open the serial monitor by clicking the looking glass icon in the upper right of the window or by going to Tools > Serial Monitor. You should see a header showing that we are displaying the ambient temperature in Celsius, followed by the object temperature in Celsius. Every fifth of a second, a new value should pop up on the screen. Pointing the sensor at your hand, ice water, etc., should yield reasonable values for the object temperature and little change in the ambient temperature. In some early testing of these sensors for another project, I pointed the sensor into a skillet of ice water overnight, making sure it was stable at around 0°C until the ice was gone and making sure the room temperature readings corresponded to my thermostat’s program. Another relatively recent addition to the Arduino IDE is the serial plotter. Go to Tools -> Serial Plotter and you will see a rolling strip chart type recorder showing curves for each of the sensor values (Figure 4). This is a handy way to quickly view sensor outputs, and sometimes is even enough to accomplish your goal. If you’re having trouble getting data from the sensor,
Figure 6: GPS unit test sketch.
double-check that the clock and data lines are not reversed and that the sensor has power. Next, upload the Color_Sensor_Test sketch (Figure 5) to the Wildfire. Again, opening the serial monitor, we should see 16-bit values for red, green, and blue scrolling down. To test out the sensor, I shined a flashlight onto it, SERVO 08.2017
33
Leeman - Multi-Rotor Hobbyist - Aug 17_Blank Rough SV.qxd 7/4/2017 7:09 PM Page 34
Figure 7: SD card unit test sketch.
Figure 8: Velcro straps and double-stick tape made quick work of securely mounting the Wildfire and breadboard to the flight deck of the H-Quad.
elevation of the GPS. We are not looking to show off the bells and whistles here, just do a simple functionality check. After a lock is achieved, copy the latitude and longitude into the Google Maps search (https://www.google.com /maps) and make sure the location shown is indeed where you are. My older GPS module took quite a while to lock but it was surrounded by buildings, likely complicating things with significant multi-path effects. Finally, we need to test the SD card writing. This part actually was the trickiest because different Arduino boards will use different pins for the chip select CS line. Insert a FAT formatted card into the SD slot. If you need a good formatting utility, the official tool from the SD Figure 9: Electrical tape temporarily affixed the sensors to the side of the airframe facing the ground (or nadir) direction. Association is highly recommended (https://www.sdcard.org/ downloads/formatter_4). being sure the sensors saturated at 65535 — the full 16-bit Upload the SD_Card_Test sketch (Figure 7). This is a reading — then by holding a phone displaying a solid screen simple writing test. The card should have a file named of pure red, green, or blue, and ensuring that the “testing.txt” on it after the sketch runs that contains a line corresponding values spiked. In ambient lighting, my sensor of test text. values were all well below the maximum value. Now that all of the unit tests are passing, we’ll upload Next up: the GPS. Upload the GPS_Test sketch (Figure the flight firmware and give the integration test a go. 6) and open the serial monitor. Make sure your GPS has an Upload the GST_SD_Logger sketch from the Flight_Sketch open view of the sky, and give it a few minutes to get a directory. There are a few serial messages displayed to help lock. I find having a 15’ USB extension cable around is troubleshoot if things are getting stuck somewhere, but great to be able to stay at my bench and have the since we’ve already tested each module the sketch should hardware running outside on the back patio. run smoothly, blinking the onboard LED during writing and This test sketch just displays the latitude, longitude, and logging data once per second.
34
SERVO 08.2017
Leeman - Multi-Rotor Hobbyist - Aug 17_Blank Rough SV.qxd 7/4/2017 7:09 PM Page 35
Figure 10: Extra tie-in points on the power distribution PCB made it easy to add a 2.5 mm DC power jack to power this and any future sensor projects.
Let this sketch run for a few minutes and then remove the SD card, verifying that there is a data file there with reasonable values.
Flying the Survey With completed hardware and firmware, all that’s left is to attach the sensor package to our drone and go collect some data! I used double-stick tape and Velcro™ straps to attach the Wildfire and breadboard to the H-Quad’s flight deck (Figure 8). The sensors were taped to the side of the frame, facing down (Figure 9). For power, I tied a 2.5 mm power plug into the power distribution board of the quad and fed the battery voltage straight to the Wildfire, which accepts 7-12 VDC (Figure 10). A small USB battery would also be an easy way to power-up your setup. With everything set up and running, I was ready to fly the survey. First, make sure the SD card is inserted — there is nothing worse than flying a survey and (upon landing) realizing there is no data. Similar to the photogrammetry surveys we flew back in April/May, we want to do a “mowing the lawn” pattern. The height and line spacing directly affects the resolution and flight time. If your quad can be programmed to fly to waypoints, program a grid over your survey area. Otherwise, try to fly a good coverage pattern manually. As always, be sure that you are not breaking any of the FAA rules about altitude, proximity to airports, etc. I found a park with some sidewalks that was a great place to collect some data (Figure 11). I was able to walk around the circular sidewalk and performed a hub-and-spoke like survey pattern. The survey itself took about 10 minutes of weaving
Figure 11: This city park with a circular sidewalk should provide a nice thermal contrast in the late afternoon. We would expect the sidewalk to be warmer than the grass in the center.
Figure 12: Add a header to the CSV output file and remove and pretakeoff/post-landing rows. The cleaned data file is ready for analysis.
back and forth, hoping that nothing was vibrating loose and that data was being written onto the card. After landing, I anxiously pulled the SD card and found a file with all of the data. Happy, I packed up the flight gear and headed back to the house.
Plotting the Flight Path Once you have your hands on the data file (or use mine from the repository), we need to do a little QC on the data. Open the file in your favorite text editor and inspect the header. If it is poorly formed or partially written, replace it with the correct header: “DATETIME,LAT,LONG,ALT,SPD, COURSE, NSATS,TA,TO,CR,CG,CB.” Also look at the data SERVO 08.2017
35
Leeman - Multi-Rotor Hobbyist - Aug 17_Blank Rough SV.qxd 7/4/2017 7:09 PM Page 36
Figure 13: The QGIS application: a great piece of free and open source software that can plot many types of geographic files and make publication quality graphics.
Figure 15: The WGS-84 coordinate system is used for our data, but feel free to explore the others and see how big of an offset there is between the datums at your location.
and delete any rows you don’t wish to include in the analysis (Figure 12). I deleted the rows where my altitude was low as I was taking off and landing. We don’t want to contaminate our grid with oversampling at those locations! Next, head over to www.qgis.org and download the free QGIS application. This will be familiar to those of you Figure 14: The delimited text layer import tool is relatively that followed along when we were looking at intelligent and makes good default selections for our file. Be sure to photogrammetry data. Follow the installation instructions set the X and Y coordinate variables. and fire up QGIS (Figure 13). Head up to the Layer menu and find the Add Delimited Text Layer option (Layer -> Add Layer -> Add Delimited Text Layer...). Click the browse button and find your file. QGIS is smart enough to detect that this is a comma delimited file and that the first row contains header information. The only things we have to tell it are the X and Y fields for the coordinates. Select LON for X Field and LAT for Y Field (remember latitude is your angular distance from the equator; Figure 14). Next, select OK. The coordinate system selector pops up. In our case, we will stick with the WGS-84 coordinate system, which is selected by default (Figure 15). Click OK again. We are returned to the main window with all of our flight path plotted as a series of dots. By right-clicking on the file name in the Figure 16: The Properties window lets you modify the appearance of the scatter points showing where data was collected. layers panel, you can access a variety of
36
SERVO 08.2017
Leeman - Multi-Rotor Hobbyist - Aug 17_Blank Rough SV.qxd 7/4/2017 7:09 PM Page 37
Figure 19: The default gray color table is a bit boring, but there are plenty to choose from! The YlOrRd color table gives the perception of increasing temperature in an intuitive way.
Figure 17: We need to export the data as a shape file so that the gridding tool can read and manipulate it.
To grid our data, head up to the Raster menu and locate the grid function (Raster -> Analysis -> Grid (Interpolate)...). In the pop-up, select the shape file we just saved as the input file. Check the “Z Field” box and select the data value you want to grid up. It could be anything, but I’ll use the object temperature in this example. Name the output file; I used the convention DATAXXX_FIELDNAME_GRIDDED. Click the “Algorithm” checkbox and select “Inverse distance to a power” (Figure 18). This is the method QGIS will use to perform the
functions changing the marker size, shape, color, etc. (Figure 16). You can get really sophisticated here, setting up rules or even plotting vectors. While we could use QGIS to examine our altitude, speed, etc., we are really interested in the temperatures and colors we collected. Unfortunately, seeing the values as these discrete points is not very intuitive. We need to interpolate them onto a regularly spaced grid.
Gridding and Plotting To grid our data, QGIS expects the data to be in a format that can be processed by a set of tools called OGR (www.gdal.org). A shape file will work, and QGIS can easily create one for us. Right-click the layer we created in the layers panel (named DATAXXX) and select “Save As...”. Using the browse button in the save dialog, select somewhere for the file to live, and give it a name. I used DATAXXX_SHP (Figure 17). Click “OK and you’ll see the new layer in the layers panel. Figure 18: The gridding and interpolation tool will try to interpolate our point data to a regular grid so that shaded images can be made. Again, there are a lot of settings in here to play with and help tune the algorithm to produce the best results for your data.
SERVO 08.2017
37
Leeman - Multi-Rotor Hobbyist - Aug 17_Blank Rough SV.qxd 7/4/2017 7:09 PM Page 38
Figure 20: The gridded image definitely shows some gridding artifacts. Some of these may be reduced with larger grid cells and changing the gridding settings, but a denser point pattern is the best solution.
interpolation. Other popular algorithms include natural neighbor and kriging. Click OK and dismiss the popups that follow. Soon you’ll see a black and white gridded temperature field appear! We can get the output to look a little nicer by right-clicking on the gridded layer in the layers panel and selecting “Properties.” In the popup, set the style render type to “Singleband pseudocolor” and pick a color pallet that suits you (Figure 19). I chose the YlOrRd; it naturally gives a sense of increasing temperature. Spend a while playing with these settings and dressing up your map (Figure 20). You can find shape files of roads, counties, states, etc., online and import them to make your map look even better. Since I was flying over a small park, it did not add a lot to my map. In the online materials and GitHub repository, you’ll find data from two small flights and a Python notebook with some more plotting analysis. The notebook can easily be run on your data to produce plots of altitude, course, speed, and even colored scatter plots of temperature (Figure 21). I also plotted the ambient temperature from the sensor to be sure that we were not seeing some other variable when looking for the sidewalk; it appears to be uncorrelated and relatively constant (Figure 22).
Closing Thoughts
Figure 21: The Python notebook included with the article can produce scatter plots with the points colored by any variable you like. Here, the sidewalk is easily visible in the warmer colors.
In my case, I found a sidewalk that admittedly we all knew was there. With a flight planner, I could easily see running this setup over a field to check for irrigation leaks or plugged areas; emergency responders could use similar technology to look for hot spots after fires; and scientists could measure lake or ocean surface temperatures during seasonal changes. Temperature is such a crucial variable to so many processes. Being able to measure it from the air could be of great utility to many industries! The color sensor didn’t do as well. It appears that the red, green, and blue bands have somewhat overlapping and non-linear responses. My results showed the grass and sidewalk as being varying shades of brown — not exactly right. My guess is with some careful calibrations, this could be corrected. There are a few other sensors like the TCS34725 that could be worth trying out as well. Now that you’ve got a sensor platform and a set of tools to look at the data, the only limit is what sensors you can imagine to fly with. Go out and collect some data! Analyzing data always turns up something interesting (though often what you are looking for and what you find may be very different). Be sure you post your data online (even as a pull-request to the GitHub repository for this article) so others can have a look as well. Until next month, fly safely! SV
Figure 22: The ambient temperature measurements didn’t vary much or in a way that was systematic with the traverses across the sidewalk. It would appear that the sensor really did pick up a significant temperature change at the surface.
38
SERVO 08.2017
Howell - PMOD sensor Part 1 of 3 - Aug 17_Blank Rough SV.qxd 7/4/2017 7:11 PM Page 39
Interfacing an FPGA PMOD Sensor ™
with the Digilent Arty Board This project began when a Silicon Labs’ PMOD sensor module found its way onto my desk. I had been thinking about integrating some new sensors into a robotics project, plus, I’m easily sidetracked by “free” stuff. The exercise of building the I2C sensor interface would yield a design that could be modified to work with other I2C sensors that I might find later. By Steven Howell
T
he PMOD sensor module combines an Si1145 proximity/ UV/ambient light sensor with an Si7020 humidity/ temperature sensor on a small board with an I2C interface1. Refer to Figure 1. As an FPGA (fieldprogrammable gate array) engineer, I have a variety of evaluation boards, and love the challenge of creating custom hardware. Interfacing the PMOD to my FPGA based control logic would give me the opportunity to write some interesting HDL code. This article is divided into three parts. Part 1 outlines what I wanted the interface module to look like, reviews the I2C protocol, and develops a flow chart to assist with the details of writing Verilog code. Part 2 shows the integration of the module into a top level design, clocking and pinout consideration, and implementation in the Xilinx Vivado® tools. In Part 3, the design is tested using an ARTY board (Xilinx XC7A35T-1LI low power FPGA). Part 1 delves into the I2C protocol, and the resulting Verilog code. If the reader is more interested in using the I2C interface, it may be efficient to skip to Parts 2 and 3 where I implement the design and show it working on the ARTY board.
Figure 1. Silicon Labs’ PMOD sensor (Si7020/Si1145).
Concept of the Design Unlike microcontrollers that have a standard set of I2C functions, implementing an I2C interface in the FPGA is entirely up to the designer. Some designers avoid the need to write HDL by replicating the microcontroller architecture in the FPGA fabric. This means using a building block approach with a “soft” (built-in FPGA fabric) processor core, a bus structure, memory blocks, an I2C interface block, and other components to build a complete system in the FPGA. Building the microcontroller system has the advantage of being simple in concept while reducing the amount of low level I2C knowledge required. The structural blocks are stitched together, and C code is written to run on the soft SERVO 08.2017
39
Howell - PMOD sensor Part 1 of 3 - Aug 17_Blank Rough SV.qxd 7/4/2017 7:11 PM Page 40
To post comments on this article and find any associated files and/or downloads, go to www.servomagazine.com/index.php/magazine/issue/2017/08.
n robotics, where concurrent processes Ineed to take place (servo movement, sensor interfaces, communication, navigation, etc.), an FPGA (field-programmable gate array) implementation can have advantages over a microprocessor approach. This is because the FPGA fabric lets the designer create multiple modules operating independently as shown in Figure A. Each of the individual logic modules shown in the figure can run at full clock speed, concurrently, and without affecting the speed of Figure A. FPGA robotics implementation. neighboring logic or the higher level state machine. A microprocessor handles each task sequentially, and can be interrupted by higher priority tasks making latency non-deterministic. In some cases, this can be handled when the peripheral set is fixed, or by using multi-processor cores. Generally, however, the processor operates sequentially as in Figure B where one process can stall execution of the next function. The goal in developing a design to interface to the Silicon Labs PMOD sensor was two-fold. In order to start building an FPGA based robot like Figure A, it’s necessary to develop the interfaces for sensors or peripherals controlled by the FPGA. One of the most common sensor interfaces is I2C, and so part of this project’s goal was to create a robust I2C interface module for use later. The Verilog code is written to be cleanly portable to any FPGA architecture with very little effort. The second goal was to be able to use the capabilities of the PMOD sensor itself. The
Figure C. Proximity sensor — baselining concept.
40
SERVO 08.2017
Figure B. Microprocessor robotics implementation.
temperature/humidity/ambient UV and light capabilities are self-explanatory for a mobile robot that wants to sense the environment. These values are read from a register after a measurement command, and some calculations yield a result in Centigrade, relative humidity, or lumens. The proximity sensing using the PMOD is more complex. The sensor does not report “there is a reflecting object 20 centimeters from the sensor.” Instead, it reports a set of raw lumen values that can change as a result of the target reflectance, ambient infrared conditions, and optical leakage. This is shown in Figure C1. However, in my case, there is no overlay; so, presumably no optical leakage. Not knowing what the raw values would “look like” for various targets, I used the developed interface design to make measurements on a representative target. In my case, I used a new soda can at distances between 5-40 centimeters from the sensor. While I could see reproducible differences in the results, I couldn’t derive a simple “threshold” value to declare the presence of an object. This was because the target reflectance as well as the ambient infrared added to each other could change the raw value radically. The Silicon Labs applications note (AN498) gives a method of “dynamic baselining” to establish the optical environment and correct for slow changes that are not a result of a target in the visual field. Thinking about this, either baselining or some simple filtering in FPGA logic could be used to do the last step of interpreting the sensor data and reaching the goal of sensing objects near the robot. The filtering logic is perfectly suited to the FPGA, but the scope of that logic was beyond what I wanted to show with the initial interface design. As a second project, I plan to add the logic that can filter the raw data looking for targets in the visual field. 1. Silicon Labs, AN498 Si114x Designer’s Guide, p. 27
Howell - PMOD sensor Part 1 of 3 - Aug 17_Blank Rough SV.qxd 7/4/2017 7:11 PM Page 41
microcontroller and interface to the I2C peripheral; in this case, the PMOD sensor. In my opinion, the drawback of this approach is that the lookup table (LUT), flip flop (FF), and block RAM (BRAM) resources of the FPGA are used inefficiently to achieve the “comfortable” microcontroller environment. A lot of the logic in this kind of soft processor design is dedicated to processor overhead rather than to the interface functionality. As an experiment, I built the soft microcontroller system described above in a Xilinx Microblaze processor, and discovered that approximately 1375 FFs, 1680 LUTs, and 2 BRAMs are required. To give an idea of scale, consider the Xilinx XC7A35T-1LI part on the ARTY board. This part has a total of 41,600 FFs, 20,800 LUTs, and 50 BRAMs2. The Microblaze system would be a fraction of this; the most constrained item is LUTs, and the processor system with the single I2C peripheral would use about 8%. So, what would utilization be if I took another approach? Writing an I2C interface from scratch requires I2C knowledge, but uses the FPGA in the most efficient way possible. I create only the functionality that I need, and the interface code (Verilog, in this case) would be available on later projects. Finding a better (smaller) way to produce the same functionality also has the effect of reducing power required and battery size. The result is a “virtuous cycle” of reducing the size, weight, and motor/actuator size required for things like robots or drones. Figure 2 shows a block diagram of the envisioned design. Since this system will be written in Verilog, there is no C code to write, and there is no code memory (BRAM) needed. To make a fair comparison to the microcontroller
Resources www.silabs.com/products/sensors/sensor-pmod https://www.xilinx.com/products/silicon-devices/fpga/artix7.html#productTable https://www.silabs.com/documents/public/datasheets/Si7020-A20.pdf https://reference.digilentinc.com/reference/programmablelogic/arty/reference-manual https://www.silabs.com/documents/public/applicationnotes/AN498.pdf www.silabs.com/products/sensors/optical/si114x
Figure 2. I2C customized HDL interface.
approach, I’ve shown the top level state machine that will control the I2C interface. The higher level structure and implementation details necessary to build the example on the ARTY board will be discussed in Part 2. The idea of the I2C interface is that the higher level logic will provide an I2C slave address, a register address, and a data in byte if required. The control signals will indicate whether retries should be attempted, whether the transaction requires data, and how many bytes should be read in the case of a read operation (up to three for my implementation.) When these signals are present, the top level logic starts the I2C interface with a WR_fast or RD_fast pulse. The interface module immediately responds to a WR_fast or RD_fast pulse with an acknowledgement pulse, and later indicates the end of the transaction with a complete pulse and a valid pulse if the I2C slave responded normally. I2C is a slow interface compared to the typical FPGA’s inner clock. The I2C interface for the Si7020 indicates that it can operate at SCL speeds up to 400 kHz3, and the FPGA clock can typically run at more than 150 MHz. To allow the top level state machine to operate at higher clock rates than the I2C interface module, some handshaking method must be provided. To do this, the address, data, and control signals coming from the top level will be latched into the slower interface logic when the WR_fast or RD_fast signals are active. (The “_fast” labels are my convention to indicate that these signals come from a faster clock domain and will need to be acknowledged.) The interface’s acknowledgement tells the top level logic that the inputs do not need to be valid any longer because the transaction has already started. In response, the top level logic will remove the WR_fast SERVO 08.2017
41
Howell - PMOD sensor Part 1 of 3 - Aug 17_Blank Rough SV.qxd 7/4/2017 7:11 PM Page 42
Figure 3. I2C interface timing diagram.
or RD_fast signal. A screenshot of the intended behavior (taken from the hardware debug of the working design) is shown in Figure 3. Notice that the “sda_in” and “scl_in” signals captured in the debugger match the scope shot shown later in Figure 7. The transaction is a general call (I2C global address = 0x00) software reset (I2C command = 0x06), and there is no data read back. Because I decided to write the interface design to support seven-bit I2C addressing, the slave_addr [7:0] input contains an “extra” bit at the least significant position (slave_addr[0]). This bit is in the position that would normally indicate a read or write (R/W) for the I2C transaction. Since every I2C transaction (whether read or write) uses the R/W bit set to 0 for at least part of the transaction (see I2C review below), I adopted the convention of always presenting to the interface module a slave address shifted
left one bit, with a ‘0’ at the least significant (rightmost) bit. The state machine inside the interface design is written to expect this, and will change the least significant bit when required by the RD or WR control signal. The result is that a slave address given as 0x60 in the device datasheet (for example) must be left-shifted to become 0xC0. Slave addresses with a ‘1’ in the slave_addr[0] bit should never be presented to the interface, or an illegal I2C transaction may be attempted.
Review of the I2C Protocol In between the acknowledge signal and the complete/valid responses, I would need to write a state machine to complete the required transactions. I used the timing diagrams in Figures 4 and 5 as my working description of I2C reads and writes. Figure 4 shows an I2C read, which consists of two parts. Figure 5 shows a write with a normal acknowledgement at the end. SDA is the data signal and SCL is the clock signal. SDA and SCL may be driven low by either the master device or the slave device, or released (tri-stated) and pulled up to a high level. This active low tri-state high topology allows the slave or master device to drive SDA/SCL low during acknowledgement, and prevents the master and slave
Figure 4. I2C read transaction with repeated start bit.
Figure 5. I2C write transaction with acknowledgement.
42
SERVO 08.2017
Howell - PMOD sensor Part 1 of 3 - Aug 17_Blank Rough SV.qxd 7/4/2017 7:11 PM Page 43
devices from contending with each other. Only the master device is capable of starting a read or write transaction. The first part of any I2C transaction begins with a START condition (SDA driven low by the master while SCL remains high), and then the seven bits (A7-A1) of the slave device address are clocked in by each rising edge of the SCL. The eighth SDA bit (R/W bit) indicates whether the transaction is a read or a write. If the R/W bit is low, the I2C slave device is being written. Otherwise, the transaction is a read. The ninth SDA bit (ACK) is an acknowledgement from the slave device to show that the device address is recognized and the slave can accept the transaction. There are two ways that the slave device can handle the ACK bit. Most commonly, the slave device will hold the SDA low and allow the tri-stated SCL to be pulled high, clocking in a 0 at the master device to indicate that the slave acknowledges the address and is ready. However, some devices can implement a mode called “clock stretch” or “clock hold” where the slave device will drive the SCL line low until it is ready to accept the transaction, and only then release the SCL line high (while still holding the SDA low). While the Si1145 doesn’t implement clock hold, the Si7020 sensor does4. Since I intended to use the same I2C interface module with both devices, I decided to implement the ability to recognize clock hold. In the case where the slave device does not use clock hold but cannot accept the transaction, it will “not acknowledge” (NAK) its address by letting the ACK bit go high (clocked into the master by the rising edge of SCL). This would be the case when the slave device was busy (sensor measurement in progress, for example). If that happened, the master device would read a 1 for the bit, and be expected to STOP. The master could then retry the transaction until a successful acknowledgement was received. (A STOP condition occurs when the master tri-states SCL and then SDA so that they are pulled high, as shown in the bottom right side of Figure 6.) Once a slave device has acknowledged its address, the next eight bits can be one of three possibilities: 1. In the case of a read by the I2C master, the next eight bits will be the register address (also called a register sub-address/SA) of the particular slave register that will be read. 2. In the case of a write by the I2C master of a data byte that does not require a register address, the next eight bits are the data byte. (This type of write is often the case for simple slave devices such as I2C muxes or when the
Figure 6. Si7020 two byte and three byte read transaction with Checksum (CRC)5.
write is a global reset.) 3. In the case of a write by the I2C master to a specific slave device register, the next eight bits will be the register address that is going to be written. The ninth bit in any of the above cases is another acknowledgement bit, but this bit will not be clock stretched. The slave device already acknowledged that it was ready for the transaction by acknowledging the slave address. In the case of a read, the transaction has the two parts shown back in Figure 4. The first part is actually a write transaction that writes the register sub-address to be used in the second part of the transaction. Following a RESTART condition, the slave address is presented a second time (this time with a read bit) and the data bits are read back from the slave device register that was written in the first part of the transaction. The eight data bits are driven low/pulled high onto the SDA line by the slave device and external pullup. During this time, the I2C master must allow the I2C target device to either drive low or tri-state (pull high) the SDA line while the master clocks in each bit. The acknowledgement bit that follows the data byte on a read transaction is driven low and clocked by the master I2C device to show that it has received the data. In the case of a write transaction, one or more data bytes can be transmitted (many devices can accept more than a single data byte), and then a STOP condition would be sent. The STOP condition is indicated by SCL being high while the SDA rises from low to high. The write transaction occurs without the repeated start condition, and is completed all at once as shown in Figure 5. Both the Si1145 and the Si7020 have short sections of their datasheets that explain the I2C interface, as well as show the types of expected writes/reads that may occur. It’s good to review these sections to see any peculiarities of the devices. For example, the Si7020 will reply to a read of a SERVO 08.2017
43
Howell - PMOD sensor Part 1 of 3 - Aug 17_Blank Rough SV.qxd 7/4/2017 7:11 PM Page 44
to see if the response from the Si7020 is valid.
Creation of Flowcharts and State Machine Code
Figure 7. Digilent ARTY evaluation board with SiLabs’ PMOD sensor attached (Broadcast I2C reset transaction on scope).
With an understanding of I2C and the Si1145 and Si7020 user guides, I set to work building a flowchart of the operations necessary to read/write the two devices. I didn’t concern myself with particular addresses or the specific read/write sequences because I knew that would be taken care of by the top level state machine. At this point, I just wanted to get an interface module that could be counted on to complete each individual transaction correctly. While developing the flowchart, I concurrently wrote Verilog code targeting the ARTY evaluation board. The board uses a small Xilinx Artix-7 (XC7A35TCSG324-1L), and has four PMOD connectors. Figure 7 shows the ARTY board with the PMOD sensor attached. HDL like Verilog describes a hardware implementation of a circuit rather than a series of sequential operations, and it can be difficult to draw a useful flowchart. I built the interface as a single state machine, and the only operation that continues in parallel during all states is the continuous capture of the SCL and SDA pins. This is shown in the flowchart as a loop happening after register initialization on every rising edge of the state machine clock (not the SCL clock).
measurement value with two data bytes if the master NAKs (does not acknowledge) on the second data byte, or with two data bytes and a CRC byte (referred to as a checksum below) if the master ACKs (acknowledges) the second data byte. Refer again to Figure 6. The Si7020 device (but not the Si1145) has the ability to send a third byte (a CRC value) in response to a measurement. This byte — inaccurately called a “checksum” byte — implements a CRC with polynomial x8 + x5 + x4 + 1. I decided that I wanted to use this feature, so some additional logic at the Figure 8. Flowchart bottom of the START, ADDR, and ACK states. i2c_interface module calculates this CRC value
44
SERVO 08.2017
Figure 9. Flowchart DATA out, DACK, STOP, SADDR, and SACK states.
Howell - PMOD sensor Part 1 of 3 - Aug 17_Blank Rough SV.qxd 7/4/2017 7:11 PM Page 45
Explaining each line of the Verilog code would be tedious, but the flowcharts in Figures 8-11 illustrate the operation of the interface. The flowcharts can be matched to the Verilog to see the details of how each state is coded. The resulting code for the interface is the Verilog module i2c_interface.v (available at the article link). In Part 2, I’ll show how this module can be implemented with clocking, and a top level module to do some hardware testing of the interface and the PMOD sensor. SV
References 1. Silicon Labs, Sensor — PMD (PMOD), p. 1 2. Xilinx, Cost-Optimized Portfolio Product Tables and Product Selection Guide, p. 4 3. Silicon Labs, Si7020-A010 I2C Humidity and Temperature Sensor, p. 5 4. Ibid., p. 20.
Figure 10. Flowchart NAK, RESTART, and RADDR states.
Figure 11. Flowchart RACK, READ, WACK, DATA in, and DACK states.
SERVO 08.2017
45
Koci - Animatronics - Aug 17_Steve Koci Animatronics #1 Parrot.qxd 7/4/2017 7:14 PM Page 46
DIY Animatronics Legacy Effects
By Steve Koci
This month, I would like to take you on a journey that will give you a rare look inside a prop builder’s fantasy land!
H
several of my latest builds. I have idden away in an attempted to develop a team with unmarked building in a various skills in order to complete a quiet industrial park fantastic character. Trying to pull outside of Los Angeles, together a team of builders with CA is a prop builder’s complimentary but different skills Nirvana. As a “do it yourself” can be a challenge, but the reward community, we meticulously study is well worth the effort. everything we can related to the In my quest to continually props designed and built by the expand my knowledge, this professionals. I was allowed a peek opportunity was a dream come true! into their world when I had the My host for the two tours of the opportunity to tour one of the most facility that I was fortunate enough respected and sought-after special to meet was David Covarrubias. He effects studios — not once but provided me with an experience that twice! I was granted access to I will not soon forget! Legacy Effects! I started following David’s Started in 2007 by partners creations after purchasing a Stan Lindsay Macgowan, Shane Mahan, Winston Studios video that John Rosengrant, and Alan Scott, showcased David’s skills as he they have been sought out by major walked us through the creation of a movie studios and advertising set of servo driven eyes. His easyagencies to work their magic. going personality carried through to Characters have been created his presentation of the material there for such movies as Jurassic which made it fun to watch. Park, RoboCop, Iron Man, and Figure 1. David brings the Aflac duck to life. I was also fortunate enough to Terminator. They were rewarded for meet and briefly visit with Richard their work on Real Steel and Iron Landon, another highly respected and master animatronic Man with Best Visual Effects Academy Award nominations. creator. I’m sure you are familiar with his work. He was Also, they have contributed work to hundreds of tasked with the construction of the hands for Edward commercials including the Aflac duck and the Kia hamsters. Scissorhands, has worked on numerous Terminator robots I was fortunate enough to see the Aflac duck in action. It and Predator warriors, as well as being involved with several was a special treat to see a character that I had seen on TV dinosaur teams for Jurassic Park. Like David, he has done come to life before my very eyes (Figure 1)! several tutorial videos for the Stan Winston School of Working for Hollywood presents its own set of Character Arts. I highly recommend that anyone interested challenges — impressing the critical eyes of not only the in constructing animatronic characters check out the many camera, but the director and audience as well. relevant selections they have available (see Resources). Although it is unlikely that any of us will have the I do not want to simply tantalize you by highlighting opportunity to work or build in a facility such as this, we how the pros do things, so I have included several can certainly learn from what they do. We can only hope to additional resources to help you learn some of the same assemble such a talented staff of fellow artists to assist us skills. with our creations. We are going to visit a few of the departments that are This model is the one I have been working towards on
46
SERVO 08.2017
Koci - Animatronics - Aug 17_Steve Koci Animatronics #1 Parrot.qxd 7/4/2017 7:14 PM Page 47
DIY Animatronics To post comments on this article and find any associated files and/or downloads, go to www.servomagazine.com/index.php/magazine/issue/2017/08.
included in the fabrication area that perform many of the same functions that we employ when we as hobbyists build a character. I also had the opportunity to see the computer graphic section (although we didn’t have time to view it in detail — maybe next time). Figure 2. The The pictures are carefully computer and brain chosen and framed so as not power in this room is impressive. to reveal any current projects but you will get an inside look at the complete facility. We certainly would not want to prematurely let the cat out of the bag on an upcoming project!
Tour Time! At long last, this much anticipated visit was to begin. The first stop was the domain of the computer geniuses.
Concept Design/Development Whether they are constructing a physical prop or creating one digitally, the magic starts here. This is the
Figure 3. Plenty of super heroes here.
realm of the new age of effect wizards: those that create characters while seated at their computers (Figure 2). Discussions are ongoing among character and environment creators as to the relevance of practical effects versus digital effects. The work they do here makes it apparent that the practical is still relevant. There certainly is a place and time in the industry for both. Computer-Generated Imagery (or CGI for short) is just another tool. It allows us to be transported to places not possible with practical effects, but it does come with a more expensive price tag. Upon leaving the computer section, we entered the production floor where we were greeted by a collection of figures that have entertained us over the years. These characters have been featured in movies that have shaped the special effects world for our enjoyment. They have allowed their creators to immerse us in situations and environments not possible in the real world (Figure 3, Figure 4, and Figure 5). It was now time to discover what each department had to reveal (Figure 6).
Figure 4. Who likes dinosaurs?
SERVO 08.2017
47
Koci - Animatronics - Aug 17_Steve Koci Animatronics #1 Parrot.qxd 7/4/2017 7:14 PM Page 48
DIY Animatronics Sculpting Figure 5. How many of these characters do you recognize?
The true artists that conceive the creatures that our audiences actually see and interact with reside in the sculpting department. The stunning realism that these experts are able to endow their characters with amazes me. The sculptors have the ability to transform a lump of clay into a character that looks truly alive (Figure 7). This is one area that I especially respect. I think with enough patience and practice I could maybe create something that vaguely resembles something recognizable. I am personally more comfortable working on the mechanical and electronic portions of a build. Maybe I should leave this phase of the operation to the true artisans!
Mold Making/ Replication
Figure 6. I wish I had a fabrication department like this!
3D Modeling and Scanning This new technology is revolutionizing the way we build things. The industry is increasing their reliance on 3D scanning and printing to produce components. It seems like new system upgrades are announced every week, providing exciting advancements in this field. This technology has now come down enough in price to make it a viable addition for the garage builder. After seeing all the uses they have found for their 3D printers, I have added it to my wish list. (Time to start researching available models and making my purchase plans.)
48
SERVO 08.2017
Once the sculpts are completed, they are turned over to the folks in the mold making department. In order to create the working copies, molds must be made so that the sculptures can be replicated. This is a multistep process that requires more precision than you might at first imagine (Figure 8). In order to excel at this position, you must have a firm understanding of the properties of the many available products, be able to make a functional mold, and then successfully cast the final articles. If you would like to see a variation of the complete process, check out Ed Gannon’s video from Distortions Unlimited. Ed takes us along as he demonstrates the entire process of creature creation from concept to completion. He demonstrates the entire process from sculpting and molding to creating a completed mask (see Resources).
Hair Further evidence of the intricate detail that they apply
Koci - Animatronics - Aug 17_Steve Koci Animatronics #1 Parrot.qxd 7/4/2017 7:14 PM Page 49
DIY Animatronics to their creations can be seen in the effort they go through when applying the hair. In order to achieve the necessary realism, each hair is individually punched. It is an extremely time-consuming process, but the results look fantastic! A special thank you to Connie Grayson Griswell for appearing on the cover of this month’s magazine. She is shown working on Minotaur for a commercial spot for God of War. You can check the video out at http://bit.ly/LegEf. To view the actual technique and see how you can learn this method, check out the video from Brick In The Yard. Mitch Rogers does a great introduction to the art and can help get you started on learning this technique (see Resources).
Foam Body Forms In order to house the mechanical framework of a prop, an exterior shell needs to be constructed. This is often accomplished by constructing a body form out of foam. The foam is cut, shaped, sculpted, and detailed by another group of skilled craftsman. Seeing the incredible detail that is able to be added has inspired me to continue my education in this area. I have only started working with foam in order to provide a structure to support a costume (see Resources). I would like to develop my skills in order to create something that possibly resembles the extraordinary figures these masters produce.
Paint This is the department that makes the designs pop! The transformation that takes place when an artistic paint job is applied is dramatic. The process requires the addition of multiple coats and layers of shading to get the desired look.
Clothing Many of the creations are not complete until a costume is added. This is the final component of the process that completes the look. The skilled seamstresses must provide the final layer that brings the project together.
Figure 7. Transforming clay into creatures.
Animatronics Creation If you have stuck around for this long, you now get a peek into what I consider the best phase of the entire operation! I have saved my favorite department for last. The masters of this realm have been my inspiration as I design and build my characters. Their knowledge, level of expertise, and willingness to think outside the box is truly amazing (Figure 9 and Figure 10).
Parts and Mechanism Construction
Designing the mechanisms that put your prop in motion is the first step in the process. Once a plan has been made, the parts to make it function often have to be fabricated from scratch. Unfortunately, the parts required cannot simply be purchased from the corner hardware store, and many must be individually manufactured. This not only requires the tools necessary to get the job done, but the knowledge and expertise to convert the raw materials into the desired configurations. Their shop is complete with Figure 8. Make sure to follow all the directions when molding. SERVO 08.2017
49
Koci - Animatronics - Aug 17_Steve Koci Animatronics #1 Parrot.qxd 7/4/2017 7:14 PM Page 50
DIY Animatronics
Figure 9. Is there room for one more servo?
Figure 10. Let’s take it one line at a time.
Figure 11. If there is a tool you need, they have it.
Figure 12. It takes skill as well as the right tools to get it built.
50
SERVO 08.2017
every tool a builder could want. This well equipped work area would make any home builder jealous (Figure 11 and Figure 12). Once the parts have been made, the fun really begins! It is time to assemble the mechanism that brings the character to life. This often requires plenty of patience in order to fit all the components within the confines of the project and then to get it all to
Figure 13. It all starts with a well laid out design.
Koci - Animatronics - Aug 17_Steve Koci Animatronics #1 Parrot.qxd 7/4/2017 7:14 PM Page 51
DIY Animatronics
Figure 15. No hammers were used to get everything installed.
Figure 14. Time to see if it all will fit.
Tips and Tricks I recently had the opportunity to visit Distortions Unlimited: an impressive prop building shop located outside of Denver, CO. Watch for the complete tour of the facility in an upcoming article. During my visit, I was able to meet with Mike Etling of Fiero Fluid Power, Inc. (see Resources). The products they distribute that I am especially interested in are the pneumatic components. During our discussion on how to make props move, Mike passed on a tip which was new to me. It was the fact that the sound mufflers (Figure A) can become clogged with impurities after long-term use. This can cause a restriction in the exhaust of the air from the solenoid resulting in reduced performance. Keep this in mind if you are troubleshooting an underperforming system that is suffering from an apparent lack of air. It is easy to check components that may resolve your issue!
work together as a cohesive unit (Figure 13, Figure 14, and Figure 15). If one method does not get the job done, then an alternate must be found. The ingenuity that these craftsmen possess motivates me to improve my skills. Hopefully by continuing to observe their work, some of their talent will wear off on me! Many different methods are used to accomplish their assigned tasks. They may be completing work on a T-Rex this week and then be asked to animate a tiny creature next week (Figure 16). These projects need to be approached in completely different ways, and the animator must be able to adapt his mechanical design to fit each need.
Electronics Providing the brains for each project receives attention from yet another talented group (Figure 17). Although much of the movement is controlled by puppeteers, there are still plenty of situations where individual controllers are required.
Figure A. Keep those mufflers clean!
Figure 16. You need a fine eye for the small stuff.
SERVO 08.2017
51
Koci - Animatronics - Aug 17_Steve Koci Animatronics #1 Parrot.qxd 7/4/2017 7:14 PM Page 52
DIY Animatronics Figure 18. It takes a team to make it all come together.
Figure 17. Programmers have their job to do as well.
For example, lighting incorporated into the costume can be managed using an Arduino or other microcontroller. You may be thinking that we have overlooked an important electronic consideration; namely the audio. It was an interesting revelation that these special effects wizards are not involved with providing the sound for their characters. That is usually added in post production. As a result, they have the added benefit of not needing to worry about the sound the servos or actuators make as the final track is overlaid later.
Animatronic Examples I hope you are inspired by the included photos, but nothing shows the true brilliance of the work done here like a video. We all are familiar with the major motion picture characters that came out of this shop, but you may want to check out some of the animal creations they have been involved in. These can be seen in the YouTube video at http://bit.ly/LegEf2. This video includes clips of the Black Sheep that David and two other puppeteers demonstrated for me on my first visit. The realism that they are able to impart was amazing!
Puppeteering
Figure 19. Sometimes the simple ways work the best.
52
SERVO 08.2017
I would like to offer my praise to these unsung performers: the live action puppeteers. The animators are often asked to puppeteer their creations once construction is completed. They must serve multiple roles: mechanical designer, creator, and performer. This often requires them to travel to the shooting location and perform the character according to a director’s instruction. It also requires that they be proficient in different control methods (Figure 18 and Figure 19). Much like the actual performing actors, the puppeteers must rehearse as a group in order to bring the finished character to life. These professionals are extremely talented and highly skilled. Their performance requires exceptional coordination among the team members. Although they are working from a script, they must also allow for on-the-spot changes made by the director. Once a performance is completed to
Koci - Animatronics - Aug 17_Steve Koci Animatronics #1 Parrot.qxd 7/4/2017 7:14 PM Page 53
DIY Animatronics Hollywood was a truly amazing experience! everyone’s satisfaction, the character’s performing days are usually over — at least until it’s time for a sequel! Of course, This series is now entering its third year and I would be the creatures from the commercial side may get called back very interested in hearing about topics you would like to see more frequently. covered. Visit our very own DIY Animatronics forum section This is a major difference in how characters are used at http://bit.ly/SrvoDIY. Your suggestions and and controlled for movies and commercials versus how most hobby characters are controlled. Since our characters participation on the forum are always welcome! are usually called on to perform over and over, we rely Until next month, MAY THE PASSION TO BUILD BE more on recorded movements programmed into a WITH YOU! SV microcontroller. Recently, I have started to build a few radio controlled characters that utilize RC controllers. They are fun to use when I have time, but often don’t have an extra hand to run them. You can check out ParkerBot in the PCB Layout Software & September 2015 issue of SERVO and PCB Schematic Software Jarvis in the September 2016 issue.
FREE
A Truly Inspirational Visit I hope you enjoyed this brief glimpse into the world of the professional creature creators. It was inspiring for me to have this opportunity to be allowed in and observe a few of their techniques. Granted, we do not have the staff or budget to compete with such a professionally-run operation as Legacy Effects, but we can learn from them. To have the opportunity to rub elbows with some of the most talented special effects wizards in
RESOURCES Stan Winston School of Character Arts — http://bit.ly/StanWin Distortions — http://bit.ly/Distsculpt Brick In The Yard — http://bit.ly/Brickhair Foam Body Form Video — http://bit.ly/Foambody Fiero Fluid Power, Inc. — http://bit.ly/FieroFl My YouTube channel — http://bit.ly/Halstaff My Website — http://bit.ly/Hauntechdiy DIY Animatronics Forum — http://bit.ly/SrvoDIY
3 PCBs
41
$
3 PCBs
+ shipping
61
$
3 PCBs
81
$
+ shipping
+ shipping
2-layer MiniBoard
2-layer MiniBoardPro
4-layer MiniBoardPro
(Shipped in 1 business day)
(Shipped in 2 business days)
(Shipped in 3 business days)
1
DOWNLOAD our free CAD software
2
DESIGN your 2 or 4-layer PCB
3
CHECK your design with xCHECK DRC
4
SEND us your design with just a click
5
RECEIVE top quality boards in just days MADE IN THE USA
Now Offering
SMT STENCILS – Nano Coating available–
| www.expresspcb.com
SERVO 08.2017
53
Woolleys - Twin Tweaks - Aug 17_TwinTweaks - Aug 15.qxd 7/4/2017 7:20 PM Page 54
Twin Tweaks
by Bryce Woolley and Evan Woolley To post comments on this article and find any associated files and/or downloads, go to www.servomagazine.com/index.php/magazine/issue/2017/08.
Crazy Drive Train
L
ast time, we finally had the chance to test our high pressure air cannon. It was thrilling, loud, and heavy, but something was still missing. We had mounted the cannon (well, strapped it down) to Protobot, but the prototyping base didn’t seem to be quite the right fit for the cannon. Even after weighing the base down with 100 lbs of gravel, it still jumped when we fired. Plus, Protobot’s two-wheel drive was never designed to haul around a 120 lb steel cannon. We wanted to give our steel cannon a proper base and drive train, and doing so would fulfill a lifelong dream of building a drive train on the heavyweight scale. There was something else we wanted to accomplish with this project. We love frequenting the online combat robotics groups because it’s a great way to see what cool things other people are working on. Some of the best posts are meticulous CAD models and renders showing a robot painstakingly designed down to every fastener, and soothing videos of mills and lathes creating mountains of metal chips as intricate parts emerge from billets of aluminum. Such posts are prominent enough that it might make a roboticist wonder if they could compete with those builders without fancy CAD packages and CNC machines. We’re a little old school at Robot Central, and the most sophisticated tools we have are an old drill press and bright
TIME
54
FOR AN UPGRADE, PROTOBOT!
SERVO 08.2017
orange hydraulic press. Other than that, we make do with electric drills, a chop saw (which is old enough to qualify as “ancient” were it a document under the Federal Rules of Evidence), and other garage staples. Could the same techniques we put into our 60 lb bot, Troublemaker work on a much larger scale? Could we build a drive train worthy of our cool steel cannon? Could we do it all with an old drill press and some hacksaws? To find out, we donned our safety glasses, cranked up the garage stereo, and got to it.
High Power Components Before we could put our rudimentary tool set to work, we needed to get all of our parts together. This was our first lesson: If you want to make a powerful heavyweight drive train, be prepared to make a bit of an investment. Our first big decision was on the motors. Ampflows are some of the go-to motors for heavyweight robots, so we thought we couldn’t go wrong with some of those. We perused Robot MarketPlace (www.robotmarketplace.com) for our options, and we were immediately intrigued by the Ampflows that came with speed-reducing gearboxes attached. We didn’t need our cannon whizzing along at 30 MPH, so speed reducers seemed like a good idea. The rectangular gearbox would also facilitate easy mounting, and the assembly came with a beefy keyed output shaft. There are a few options for Ampflows with speed reducers, including motors for 24V and 48V bots. We opted for the A28-400 24V Ampflow with fan cooling. These long Ampflows boast 4.3 peak horsepower and a peak torque of 1930 in-lbs. This was one of the highest end motors available, but we figured since we had committed to the investment we weren’t going to take any half measures. As they say, in for a penny, in for a pound. (Or in this case, 21 lbs, since that is what two of these motors weigh.) When you give a robot an intense motor, it’s going to want some intense batteries. We were so pleased with the 22.2V 10,000 mAh LiPo packs from Gens Ace Tattu that we run in Troublemaker, our first thought was to see what they carried in higher capacities. To our delight, Gens Ace Tattu boasted a collection of large capacity LiPo packs, including ones all the way up to 30,000 mAh. One of the packs in particular caught our eyes: a 22.2V 26,000 mAh pack that
Woolleys - Twin Tweaks - Aug 17_TwinTweaks - Aug 15.qxd 7/4/2017 7:20 PM Page 55
Twin brothers hack whatever’s put in front of them, then tell you about it.
THE 26,000 MAH LIPOS A28-400 AMPFLOWS WITH
FROM
GENS ACE TATTU.
SPEED REDUCERS.
had its price cut in half. Gens Ace Tattu specializes in batteries for RC airplanes and drones, so we had a suspicion this specific pack was being cleared out because it was too big for a drone that wasn’t meant to be flown into a warzone. The last major electronic components were the speed controllers. In both Troublemaker and Protobot, we ran Victor 884s and 885s, but those would not be nearly enough to handle our Ampflows. The stall current on the Ampflows was 390A, and we had no interest in burning out our speed controllers. We really liked the currentlimiting feature on the Ragebridge 2.0 that we run in Troublemaker, but we were concerned it wouldn’t be able to supply the continuous current we needed for our long Ampflows. Fortunately, there was another option that would give us both the continuous current and current limiting that we were looking for. The Pro Victor BB speed controllers from VEX are new versions designed specifically for combat. The BB can supply up to 300A continuous; can operate at input voltages up to 50V; and has current-limiting capabilities. These impressive features come encased in an aluminum body with a forest of fins for heat dissipation. Four beefy (but delightfully floppy) eight gauge wires extend from the body, and the controller connects to the receiver with a standard PWM cable. A simple feature that we really appreciate is the plastic covering from the PWM connection on the BB that forces the PWM cable to make a 90 degree turn when connecting to the BB, and ensures that the cable won’t pop out during the rough and tumble of a match. One of the simple things that seemed strangely missing from the BB documentation was an identification of the four wires (red, black, white, and green) coming out of the controller. We felt fairly comfortable that the controller
VICTOR BB
SPEED CONTROLLERS FROM VEX.
would not defy convention and that red would correspond to power, black to ground, and white and green to the motor leads. It was still strange that we saw nothing in the documentation actually saying so. Maybe we missed it and it really is in there somewhere, but it still made for some trepidation when we powered up the drive train for the first time. However, we had miles to go before we got there.
More than a Feeling, but Less than a CAD Render One of our goals with this project was to put together the drive train without the aid of a fancy CAD program to show that low-tech classic design techniques can still get the job done (especially since we don’t have any fancy CAD programs). Since our design was pretty open-ended to begin with (carry the cannon, make it cool), we needed to identify some design constraints to give us some focus. SERVO 08.2017
55
Woolleys - Twin Tweaks - Aug 17_TwinTweaks - Aug 15.qxd 7/4/2017 7:20 PM Page 56
TESTING
OUT SOME LAYOUT IDEAS.
The perfect constraint was round, rubbery, and came with a hub for a 3/4” shaft. The 10” Colson wheels from Robot MarketPlace that came with a hub would be the perfect fit for our bot, and much more cost-effective than a large scale version of the tracks that we put on our tiny tank. Their diameter provided a perfect design constraint: They would provide the maximum height for the robot because we wanted the whole thing to be invertible. The amount of recoil we saw during our high pressure test at 1,000 PSI — at one third of the maximum pressure — had us thinking that a full pressure shot had a real chance of flipping the whole robot over. So, with about 3/4” of clearance on the top and bottom, we had a major dimension of the robot. Our main challenge would be fitting everything under and around the cannon, and the first step in sorting out those placements would be to figure out our frame. Given the heaviness of the cannon (which clocks in at about 120 lbs), we wanted to go with a lightweight frame
SKETCHING
56
SERVO 08.2017
OUT SOME BEARING BLOCKS.
so as not to stray too far afield from the weight restrictions on heavyweight robots. The extruded aluminum frame of Protobot had served us so well that we decided to keep it, and we stripped off all the components that had made it an excellent prototyping platform for over a decade. The resulting skeleton was fearfully lightweight, so one of our early goals with the structural design of the base would be to add some much needed rigidity. One of our favorite ways to do that is with a floor panel, and the Protobot frame rails had a Ushape perfect for attaching one. We didn’t want to invest in a large panel of 7075 aluminum just yet, so for mockup purposes we used a sheet of particle board. It would still be in the same plane as the final aluminum panel, and would help us mock up some possible component placements. We planned on attaching the floor to the bottom lip of the frame rails, giving the frame kind of a sunken living room look. Our initial thought was to attach the bearing blocks to the top of the frame rails, using the same wheel wells as we did on Protobot. We cut up a 2x4 to make mock bearing blocks, using lightweight aluminum conduit for mock axles. To complete the mockup, we put some horizontal struts across the top of the inner bearing blocks (more wood) so that we could set the cannon on top. Our wood-aided design (WAD perhaps) made some things immediately apparent. The first is that we would not be able to mount the cannon on top of the bearing blocks; it would be too tall. We would need another way to mount the cannon while keeping enough room inside of the bot for all of our components and trigger mechanism. We didn’t like the idea of attaching the cannon mounts directly to the floor given the crazy amount of force they might experience when the cannon fires. We happened to have some nice 3” wide 1/4” thick planks of 2024 that would make some ideal horizontal struts extending between the tops of the frame rails. The beefy struts would be the perfect attachment point for the cannon mounts. Having the mockup in front of us helped us quickly determine an effective placement for the horizontal struts. Our first instinct was to place them between the bearing blocks, but we saw that such a placement would wreak havoc on the placement of other components by criss-crossing the prime componentplacing real estate on the floor. If we placed the horizontal struts under the bearing blocks, however, we would have plenty of room for our other components. The most critical items were the motors. They were certainly the biggest, and we were confident that the smaller parts could be arranged around them. However, our WAD mockup immediately revealed a major
Woolleys - Twin Tweaks - Aug 17_TwinTweaks - Aug 15.qxd 7/4/2017 7:20 PM Page 57
AWESOME
ONE
OF THE DRAWINGS SENT TO ANCHOR
PARTS FROM ANCHOR
LABS.
LABS.
problem. Given the width of the frame, we wanted to stagger the motors instead of placing them end-to-end (we just had to have the long Ampflows). Unfortunately, when we placed them that way, the motors and their gearboxes weren’t able to fit between the bearing blocks in the X direction, the cannon end caps in the Z direction, and the other motor in the Y direction. We were panicked. Did we pick the wrong motors? Would we be unable to fit the drive train into our frame?
Anchor Labs Aweigh After sitting and staring at our mockup while sitting in the driveway of Robot Central on a waning Saturday, inspiration struck like a thunderbolt. We were trying to fit everything into the footprint of Protobot’s original frame, but we weren’t being forced at gunpoint to keep that same footprint. If we widened the frame by three inches on each side, we would have plenty of room to put the motors endto-end so that they would avoid the end caps. So, that’s exactly what we did. We could fit the bearing blocks on top of the frame rails, and the cannon mounts could attach to the horizontal struts. We may not have had CAD, but we did have pen and paper, and before the sun went down we had sketches of our bearing blocks, cannon mounts, and motor mounts. We still needed a way to actually make them, though. On Troublemaker, some of our only custom machined
ASSEMBLING THE
BEARING BLOCKS.
parts were the motor mounts for the drive train. We like to be precise when it comes to the power transmission, since having everything aligned properly is essential for peak performance. Precision would be even more important here with our six-wheel drive design. If one wheel was out of alignment, it would compromise the performance of the entire system. With Troublemaker, a few custom machined bearing blocks were not a big deal because one of our team members (a.k.a., dad) had access to a machine shop and could do it himself. But alas, we no longer have easy access to our own machine shop, so we searched for a shop to farm out the job to. We requested quotes from a few local businesses, but we also tried out a brand new service: Anchor Labs. Anchor Labs calls itself the world’s first self-service CNC machining cloud, and allows users to upload drawings, get a quote, SERVO 08.2017
57
Woolleys - Twin Tweaks - Aug 17_TwinTweaks - Aug 15.qxd 7/4/2017 7:20 PM Page 58
FIRST TEST-FIT order the parts, and have them appear at your doorstep in a matter of days. Given the newness of the service, we had a lot of questions, and Anchor Labs has amazingly responsive EVAN FOR SCALE. customer service that answered every query (most often in a matter of minutes). They even took our hand drawn part sketchings, and on top of it all they even had better prices than the local brick and mortar shops we got quotes from. So, it was “Anchors” aweigh. At this point, you might be thinking that we’ve spent well over half our time cutting up wood, and sitting and staring at Protobot’s denuded frame. You would be right about that, but that’s because the hardest work is always done during the design process, and having the physical mockup (and some old school drafting skills) enabled us to get that hard work out of the way so that the frenetic fun
CHASSIS
58
SERVO 08.2017
COMING TOGETHER.
OF THE CANNON.
of the actual build would unfold without going off the rails. Our Anchor Labs’ parts arrived in a couple of weeks, and they were smooth, shiny, and ready to make our skeletal frame start to look like a robot. While waiting for our custom parts, we made numerous orders to McMaster-Carr for the rest of our drive train parts: 3/4” shafts, sprockets, keyways, bearings, aluminum tubing for spacers, chain, and so many fasteners. With all of our parts finally in hand, we cranked up the music and got to work.
Master of Sprockets Our first order of business was to get the cannon mounts mounted, since they would help determine placement of the motors. (Who needs CAD when you have a tape measure and dial calipers?) We scribed out the placement, center-punched the holes, and drilled them out with a center drill and then the regular bit — just like we would do with Troublemaker and our FIRST robots. To prep the bearing blocks, we heated the blocks with a torch to expand them, then dropped the bearing inside and pressed it in place with our hydraulic press. The struts with the cannon mounts went on, then the inner bearing blocks, and the frame became distinctly more robot like. It was then time to work on our wheel stacks. The 6” long shafts were stock parts from McMaster, and they happened to be the perfect size. Getting them ready involved lots of cutting with the hacksaw and deburring with various files, and we spent many hours making sure the fit was just right. It’s tedious work, but made better by a good playlist. Everything from Boston and Firefall, to Lacuna Coil and Metallica carried us through. Given the speed of the motor and the size of our wheels, the unreduced speed of the robot would have been around 30 MPH — way too fast! With a small sprocket on the motor shaft and larger ones on our driven wheels, we cut the speed in half to a much more manageable clip. To ensure the sprockets lined up, we cut spacers out of an aluminum tube. Measuring the right size for the collars was a little tricky, since we needed to line up the sprockets in situ. That’s where telescoping bore gauges came in handy.
Woolleys - Twin Tweaks - Aug 17_TwinTweaks - Aug 15.qxd 7/4/2017 7:20 PM Page 59
CHAINED
UP AND READY TO WIRE.
Telescoping bore gauges look like a little bulb on a handle with spring-loaded arms. You can use the handle to get the gauge into hard-to-reach places, release the arms, and lock them in place; then measure the span of the arms to get your tricky dimension. We cut the spaces accordingly, used collars to hold everything in place, and then we were ready for the chains. Sizing the chains can be a greasy mess, but with several sets of hands and a good chain breaker we made quick work of it. With the chains in place, we could finalize the placement of the motors. We mounted the motors to a front plate that attached to the inner frame rail, and the back of the motors were on mounts attached to the floor. To place the back motor mounts, we used transfer screws which are an awesome addition to any roboticist’s toolbox. Transfer screws are like screws on one side and a punch on the other. We put them into the back motor mounts, positioned them where we needed them, and gave them a good hit with the hammer. Perfectly placed holes, no CAD required. We removed the chains to gets the motors mounted and then put them back on. The drive train was ready for wiring. We used the same Castle connectors on the big battery as we did for the pack on Troublemaker, and used some high amp distribution posts to get everything powered and grounded. We used the same type of AR610 receiver we used in Troublemaker, and programmed the radio for two-stick tank drive. We fired up the drive train for the first time with it elevated on wood blocks on top of our bench, with Brad Delp wailing in the background about a higher power. Blinking lights on the receiver and Victor BBs gave us hope, and the motors roared to life with a press of the joystick. We brought the drive train out of the garage and put the cannon on top for a full test. The large bot was delightfully maneuverable and bracingly loud, and with the six-wheel drive had no problem hauling around the heavy metal cannon. Nothing beats the thrill of getting a robot working for
WIRED
IT
UP AND READY TO DRIVE!
DRIVES LIKE A REAL HEAVYWEIGHT!
the first time, and we have to say that a large scale project carries its own special sort of awesomeness. It must be something about the sheer loudness of it, the volume of work that goes into it, and the ever present risk that your creation could grievously injure you. The great part is we were able to do it all with hacksaws, transfer screws, and a drill press. Feel free to get inspired by all of the awesome renders and CNC videos you see on the forums, but don’t be discouraged if you’re like us and lack a SolidWorks license and a Tormach. Classic techniques are classic for a reason, and they even work to get a heavyweight driving. If you can’t get it working, nothing else matters. SV
Recommended Websites
www.therobotmarketplace.com www.mcmaster.com www.anchorlabs.io
SERVO 08.2017
59
Carroll - Then & Now - Aug 17_Then & Now - Sep15.qxd 7/4/2017 7:25 PM Page 60
a n d
g{xÇ Now
by Tom Carroll
[email protected]
So, You Want to Design a Marketable Robot Several times over the past years, I have written about designing robots. I have suggested that a perspective robot builder 'just go for it,' scrounging parts as the project progressed. In another article, I discussed how an amateur robot builder with a bit of mechanical and microcontroller knowledge might begin the design process. In this article, I'd like to explore how someone with a great dream and the drive to bring that dream to fruition can design and produce a successful robot product. This process is a bit more involved than a quick amateur build, and should encompass a thorough design strategy. am sure that some of you have given earnest thoughts of designing and producing a serious robot; a robot that will fill a need that has yet to be met. You have built several robots over the years to hone your experience. You feel that you’ve mastered most of the skills required, and know associates who can join you at the beginning of the process of forming a startup company. You’ve sat down and listed what you want your robot to do — long before you ever make your first sketches on a piece of paper (like the VEX robot sketch in Figure 1) or in a
I
CAD program. (VEX used this particular drawing to illustrate how to teach STEM [Science, Technology, Engineering, and Math] kids the engineering design process. I’ll discuss the STEM learning process that our local school happened to use in conjunction with VEX a bit later.) You’ve also explored that unique need that is presently being performed manually or by a cumbersome mechanical process. Maybe the exiting solutions do not adequately serve the demand. Or possibly, a special need has arisen due to changes in our environment or societal requirements. You’re now ready to make your dream a reality.
Some Robots are Priced Too High
Figure 1. Boy's Life VEX robot sketch.
60
SERVO 08.2017
Before putting your drawing to metal, you need to examine complexity and cost. Possibly you’ve observed a particular robotic solution that ‘misses the mark’ for the task for which it was designed. For instance, there are many of those “as seen on TV” ads that show home gadgets that impulse buyers just have to own; after a few uses, they wonder “Why did I ever buy this thing?”
Figure 2. Laundroid robot that folds clothes after washing.
With that in mind, I’d like to look at two robotic products that are expensive, but only perform a task that is simple for a human to do. At the January 2017 CES event, I saw some interesting robots for the home such as the Laundroid shown in Figure 2, made by Tokyo-based Seven Dreamers. Notice the figures on the LCD screen to the right of the robot that show the time used to just fold clothes during a person’s whole life: 9,000 hours. The size of a large refrigerator, the machine’s robot inside the cabinet takes at least 10 minutes to pick out one garment, identify the type of garment, and fold it. Certain types of apparel take much longer. Hearing rumors of a cost of several thousand dollars, I wonder just who would want such a machine that took all night folding a load of laundry in a dark corner of one’s home. The FoldiMate laundry folder
Carroll - Then & Now - Aug 17_Then & Now - Sep15.qxd 7/4/2017 7:25 PM Page 61
Advances in robots and robotics over the years. To post comments on this article and find any associated files and/or downloads, go to www.servomagazine.com/index.php/magazine/issue/2017/08.
Figure 4. Removing laundry from a dryer to the Foldimate laundry folder. Figure 3. The FoldiMate laundry-folding robot.
shown in Figure 3 is much smaller and possibly much less expensive than the Laundroid. FoldiMate is a San Francisco based start-up that has made a robot that will fold your clothes. It supposedly will fold shirts in 10 seconds or less. After the folding sequence, it also steams them and sprays your choice of fragrance with two available options. When it hits the market this year, it will cost about $700-$850. Figures 4 and 5 show someone removing laundry from a dryer and then clipping it to a rack on the front of the FoldiMate. That ‘clipping’ step might account for the FoldiMate being much faster than the Laundroid. Though certainly not applicable for all homes, the FoldiMate could be a better fit for the average household than the Laundroid. I’ve seen my wife fold a tee shirt in under 10 seconds and a whole bunch of laundry loads in less than 10 minutes (although sorting and pairing my almost look-alike socks that I got at Costco does take a bit longer). I’m sure that selecting a shirt, pulling it straight, and clipping it to a FoldiMate will take more time per shirt that a typical person folding a single piece of laundry. So, why would someone need a
robot the size of a large refrigerator to do the same chore for thousands of dollars? Even a large family with multiple children that are into many sports and activities would not really need a clothes-folding robot in my opinion.
Tasks that Could be Improved by Robots You might have perused the Internet and/or news outlets and found similar products to the laundryfolding robots that you feel aren’t necessary or could potentially have unpleasant consequences for an intended user. You’ve looked at several robot designs and have seen that the strategies and platforms that the creator has selected cannot be changed into a successful device. Perhaps this is where you could pick up from to create a marketable robot that serves a genuine purpose. Let’s say, for example, that you’ve looked at different markets for your product. You’ve checked out past industrial, commercial, and medical uses, and are zeroing in on the personal home category. You’ve also noted that home consumers can be just as demanding as any industrial, military, or other commercial buyers.
Figure 5. User clips dried laundry onto FoldiMate.
Millions of Low Cost Vacuum Cleaners Sold Doing a bit of study on the personal home market, you have noted that a best-selling robot cannot be too expensive. You also realize that lower profits from a less expensive product that is sold in the millions can be very profitable. A good example of this strategy is the company, iRobot. They first looked at industrial vacuum cleaners for stores, office buildings, and the like. Designs were complex and expensive to produce. They made the wise decision to change over to a home robot vacuum cleaner, and the result was the very successful Roomba series that has sold over 15 million units. The profits from their successful military robots sold in the thousands cannot match the multi-million dollar profits of the SERVO 08.2017
61
Carroll - Then & Now - Aug 17_Then & Now - Sep15.qxd 7/4/2017 7:25 PM Page 62
Figure 6. Boxes of VEX robot kits for Ridgefield Middle School's STEM classes.
cheaper home robot vacuum. (I’ll look a bit deeper into the formation and growth of iRobot later.)
Engineering Design Process I’d like to digress a bit and talk about the very important engineering design process that I mentioned earlier with Figure 1. VEX Robotics is one of the most popular companies that supplies STEM educational kits and materials to schools and private individuals. Though many of the VEX kits are designed for high school all the way down to elementary grades, many of these kits are used by professionals for prototyping of electro-mechanical and robotic designs. (Go to the VEX site at www.vexrobotics.com for more information about their product line.)
An Overview Over the years, I have enjoyed my time as a mentor to school-aged kids and recently at our local Ridgefield Middle School. The teachers and STEM educators had selected VEX kits before I arrived as seen in the pile of boxes in Figure 6. We began our first year with VEX robot kits, and I gave the students a bit of free range to develop their own ideas of robot
62
SERVO 08.2017
Figure 7. Three students at Ridgefield Middle School are working on a VEX competition robot.
Figure 8. Ridgefield Middle School student testing program on VEX ClawBot.
designs they wanted to build. The three students in Figure 7 are working on a competition robot in which the object of the match is to detect, approach, and shove their opponent out of a ring. I had previously built the VEX ‘Clawbot’ (on the left) for other demonstrations at several robot club meetings, and we used it to test programs for autonomous operations. Another student is shown in Figure 8 running a program that he developed. As we progressed, I introduced the use of the engineering design process. With a bit more thought into their designs, we later worked on developing a larger six-wheeled rockerbogie rover in the image of the Curiosity rover on Mars. We used the larger beams and brackets on this robot that were made by ServoCity and their Actobotics division. These structural members, bearings, shafting, and gear motors made possible the construction of the larger 30” rover. The students next went to LEGO MINDSTORMS competitions that are also very popular around the world. One of the most important things that I wanted to instill in the students is the use of a good engineering design process to plan out the development process — whether with structured designs of LEGO, or a bit of trial and
error in the VEX and Actobotics designs. Unfortunately, the work on the large rover bogged down as there were so many facets that the students needed to understand before reaching the next step. It is still growing towards completion, albeit very slowly.
The VEX Engineering Design Process VEX has a very good design process that I’ve copied and compressed for this article, and have changed some of the wording. It was written for educators and students, but is every bit as apropos for adult robot designers as it is for STEM programs. ‘Identifying the need, doing the research, brainstorming the results of the research, and designing, testing, and evaluating the best solution’ are the key concepts in this process. When developing a design, it’s wise to follow an engineering design process. Essentially, that process consists of the following steps: Identify the Need Most VEX robots are built for education or competitions where a clear objective of solving a problem or scoring points is presented to the designer. As a developer of a future
Carroll - Then & Now - Aug 17_Then & Now - Sep15.qxd 7/4/2017 7:25 PM Page 63
robotic product, there may not be a clear path to a future customer’s problem. You must find and identify this path. With any project, you need to thoroughly understand the scope and implications of the project that must be addressed. Cost, complexity, and technology demands can quickly mire down any well-intentioned project. Many times, designers and engineers do not dream up an idea on their own, but are bombarded by the problems of a customer, society, or the environment that need to be solved to achieve a basic necessity. Without a clear definition of this need, the engineering design process cannot begin. This is an important step in the design and production of a marketable robot. Define the Problem Typically, a “problem” is the main issue preventing a specific need from being fulfilled. As the developer of a robotic product, you can look at robots on the market that have failed to meet a particular need. A problem must be accurately and realistically defined in order to go about the process of solving it. If not, time and money will be wasted, and the original problem may continue to exist with no solution. This is quite important to think about when developing a future product. Here’s an example approach: 1. Get a clear picture of the parameters of the problem. 2. Make a list of the objectives and rank them in order of importance. 3. Many times, a robot cannot do everything that a problem presents. 4. It is important to prioritize and design a robot that can do the most things and do a few things very well. 5. Have your robot perform useful tasks or functions that make your design stand out from all the rest. Conduct Research Research can be an independent lonely endeavor or
a dynamic group activity. Research must be focused and incorporate new ideas and a thorough exploration of old similar ideas. Sometimes the old ideas are the best. Ever hear, “Don’t reinvent the wheel?” Old ideas that failed are sometimes great research gold mines; an idea might have failed simply due to the lack of new technology that may exist now. For example, early industrial robots were hard to sell because they used hydraulic actuators that leaked oil and were hard to maintain. Hydraulic cylinder actuators can exert tremendous linear force, but require hydraulic pumps and oil. That’s great for earth-moving equipment, bad for robots. Almost all newer robot designs use electric motor actuation. Here are some additional ideas to consider: 1. Explore other solutions to the same and similar problems. 2. Look carefully at the environment in which the robot has to operate. 3. Analyze the constraints of your project and/or competition carefully. Brainstorm No ideas are bad ideas. It is important to consider all approaches to a problem. One that did not seem feasible or make sense in the beginning might be the way to go in the end. Not too many projects go through development on the first try or on the best idea at the time. The final project usually consists of a collection of ideas; some that were considered too risky, costly, or just plain crazy. Listen carefully to your teammates and their ideas. Every idea brought
Figure 9. Ford Edsel, the Car of the Future. Not!
forth in a group conversation has some validity. Solutions must be separated according to their pros and cons. This activity is better accomplished in a group setting. Brainstorming encourages a maximum amount of input from different levels of experience and different approaches to the problem. Alternative solutions can be analyzed and cataloged according to merit and possible use. After these ideas have been distilled to a manageable number, those numbers must be crunched to evaluate the probability and cost of a successful outcome, using the individual solutions. Larger factors come into play here, such as common sense and instinct. If it doesn’t feel right, don’t do it! This is one of the hardest things for a designer who loves his/her design to do: Stop and start all over again with a new idea and direction. The Ford Edsel (shown in Figure 9 that was going to be the “car of the future”) and “New Coke” are good examples of trying to sell something that was bad from the start. “If it ain’t broke, don’t fix it.” When brainstorming: 1. Come up with at least three design solutions and evaluate each of them. 2. Look at the number of parts that are being committed to the design of a robot. Are there enough? Do they work together? Can the design be simplified? Design, Test, and Evaluate the Best Solution The design phase of a product is perhaps the most challenging of the entire process. Once the idea has been discussed and directions have been changed, it is time to sit down and figure out how to make it happen. Good designers are willing to be flexible when making tough decisions, and willing to make trade-offs and omissions to make the design practical and possible. SERVO 08.2017
63
Carroll - Then & Now - Aug 17_Then & Now - Sep15.qxd 7/4/2017 7:25 PM Page 64
The first step is to start talented scientists who end sketching to get the ideas up being at odds with on paper like the drawing engineers who approach a back in Figure 1. Sketching product’s development in a and drawing by hand different way. enables you to tap your Notice the two charts creative side. It is important in Figure 10. Both processes basically begin in to have accurate and the same manner by complete sketches in order defining the task or to translate the idea into question and performing CAD drawings and models. basic research. They begin This phase also allows to differ in how they handle for virtual prototyping or the gathered information, testing of the product in either through a test or the computer. You can find series of tests or potential and sometimes Figure 10. The scientific method versus the engineering method. brainstorming towards the costly flaws in a design to settle for a slightly inferior design best path in which to begin. before the real world mock-up is than spend the money to redevelop a Scientists might determine if the constructed. Making a model with a nearly finished product. Unfortunately test worked whereas engineers might 3D printer is a great way to further with robots, this has happened too develop a prototype in which to envision your future product. many times in the initial design versus determine if they are on the right Mock-ups are representations of final product. path. The feedback from these tests is the product to test and evaluate. This then fed back in a different manner process is still valuable even though Build for the engineer, and hopefully the computers can accomplish the same The build process is a lengthy result leads to a successful product. results with CAD renderings. The only complex progression. It must take into thing computers cannot do is provide consideration materials, procedures, a real product to evaluate. After the construction limitations, and cost. mock-up is evaluated, the project can With the design and production go to the prototyping stage. of a robot, there are many different I mentioned at the beginning that considerations that a team must I was going to discuss the Roomba Build Prototypes of Your Design investigate and select. Companies vacuum cleaner robot, starting with Solutions make substantial investments in thoughts of the early developers in The best way to know if a design factories and the infrastructure to 1989 to the hit product that it is will work in real world conditions is to build their designs, so the more today. build an actual working prototype. efficiently a design has been handled, Joe Jones, a researcher at the MIT The prototype needs to be an the better off the build will be. accurate working model of the final Artificial Intelligence lab, looked at his Once the build process has design. The prototype will be less than tidy apartment and decided begun, the company can hopefully evaluated for cost, aesthetics, that a robot vacuum cleaner ‘was the begin to make a return on its durability, manufacturing simplicity, ticket.’ His first attempt was the Rug investments by marketing and selling and meeting the final design criteria. Warrior shown in Figure 11. “It sort the product. Refine or Redesign If an initial robot design and prototype does not fully solve the problem or specifications, meet the design parameters, or stay within an acceptable cost, a designer will need Before delving into the to go back to the proverbial drawing engineering design method of a board (or computer). The engineering robot company that certainly had a design process has a loop to go back shaky beginning, I’d like to mention to the design and refine or redesign. some differences how a basic The biggest hurdle in this research scientist might tackle a refinement/redesign is money. project as compared to an Figure 11. Joe Jones' Rug Warrior developed at the Sometimes it is easier and less costly engineer. Many companies hire MIT AI Lab in 1989. (Photo courtesy of Joe Jones.)
iRobot: a Tough Road at the Start
The Engineering Method vs. the Scientific Method
64
SERVO 08.2017
Carroll - Then & Now - Aug 17_Then & Now - Sep15.qxd 7/4/2017 7:25 PM Page 65
of worked,” he said. Before the days of simple microcontrollers, his micro with a few bumper switches allowed his creation to clean the carpets a bit. He tucked the robot away for a few years and later got laid off. He found a job at Denning Mobile Robotics who made large security robots. He met another engineer at Denning and the two built a Figure 13. An early iRobot product, the My Real Baby. large commercial-size robot that could autonomously move about using Bissell carpet sweeper parts. It with its sensors — but not a platform worked fine, but the two soon got that could perform all three functions. laid off. After a while, SC Johnson decided not Denning later began a slow to invest in the robot project, so decline to a corporate death. I had iRobot began looking at smaller seen several of the Denning security robots. robots at the Robotics International The Scamp shown in Figure 12 conferences and they looked (also called the Dust Puppy) was a impressive. project that Jones and a fellow Jones then found another job at engineer designed and built in 1999 IS Robotics in 1991 which later in conjunction with SC Johnson who changed its name to iRobot. IS had decided that small home-sized Robotics / iRobot was founded by vacuum cleaning robots were right. It three other MIT people — Rodney was built in two weeks on a $10,000 Brooks, Colin Angle, and Helen budget and was the first ‘Roomba’ for Greiner — who all worked together as iRobot. professor and students in the AI and Robotics Labs at MIT. Jones mentioned his home vacuum cleaner robot to the founders of iRobot. They loved the idea, but Jumping ahead into the new had very little money. So, they millennium, iRobot has made billions approached Bissell as a partner. in selling many different types of At the time, Bissell sold simple carpet cleaners for around $30 and robots. Professor Brooks left to form could not envision a robot carpet his own company (ReThink Robotics) cleaner, so they said no. and Greiner left to form CyPhyWorks. iRobot had investigated designing The company has a legacy of large commercial vacuum cleaners, products ranging from an and in 1996, worked with SC Johnson autonomous doll called My Real Baby to develop a commercial floor-cleaning (shown in Figure 13), several military robot to work in department stores robots such as the PackBot, a gutter after hours. cleaning robot, a swimming pool They came up with a nice cleaning robot, and a hardwood floor cleaning platform, a platform that cleaning robot. could navigate by itself, and another Very few companies have
Finally, a Profitable Company
Actuonix Motion Devices ........................26 All Electronics Corp. ..........................15, 29 ExpressPCB ................................................53 Front Panel Express ...................................19
Hitec .............................................................2 IR Robot Co ................................................45 PanaVise .....................................................13 Pololu ..........................................Back Cover
Figure 12. Joe Jones' iRobot Scamp. (Photo courtesy of Joe Jones.)
designed, produced, and sold such a wide variety of robotic products. In the first quarter of this year, iRobot shipped over 704,000 Roombas to add to their total sold that is approaching 16 million. iRobot’s tough path to profitability did not come easily. The world’s first industrial robot company, Unimation also had similar struggles. Both companies applied sensible engineering design practices, and stuck to their dreams and ideas of producing viable robotic products.
Final Thoughts The engineering design process is the procedure of developing any product — robots or otherwise — and is key to the success of a project. I cannot stress enough that prospective robot product developers should adhere as closely as they can to at least a semblance of engineering standards. I have approached this method from several directions in my different articles to assist prospective robot builders in the somewhat difficult process of turning a good idea into a great robot. Whether that idea turns out to be a competition robot, a fun robot to amaze your friends and family, or to sell as a product, I wish all of you great success. SV Super Bright LEDs .....................................59 Tormach .....................................................13
Advertiser Index SERVO 08.2017
65
SV Webstore - Aug 17 working_SV Webstore May 16 working.qxd 7/4/2017 7:28 PM Page 66
The SERVO Webstore CD-ROM SPECIALS
08.2017 FEATURED
ROBOTICS Arduino Robot Bonanza by Gordon McComb Create high-tech walking, talking, and thinking robots. "McComb hasn’t missed a beat. It’s an absolute winner!" Breathe life into the robots of your dreams — without advanced electronics or programming skills. Arduino Robot Bonanza shows you how to build autonomous robots using ordinary tools and common parts. Learn how to wire things up, program your robot's brain, and add your own unique flair. $29.95
Robot Builder's Sourcebook Fascinated by the world of robotics but don’t know how to tap into the incredible amount of information available on the subject? Want the names, addresses, phone numbers, and web sites of companies that can supply the exact part, plan, kit, building material, programming language, operating system & computer system? Robot Buider’s Sourcebook is just what you’ve been looking for! $36.00
66
SERVO 08.2017
Making Things Move: DIY Mechanisms for Inventors, Hobbyists, and Artists by Dustyn Roberts
In Making Things Move: DIY Mechanisms for Inventors, Hobbyists, and Artists, you'll learn how to successfully build moving mechanisms through non-technical explanations, examples, and do-it-yourself projects — from kinetic art installations to creative toys to energy-harvesting devices. Photographs, illustrations, screenshots, and images of 3D models are included for each project. $29.95
Build Your Own Humanoid Robots by Karl Williams GREAT 'DROIDS, INDEED! This unique guide to sophisticated robotics projects brings humanoid robot construction home to the hobbyist. Written by a well-known figure in the robotics community, Build Your Own Humanoid Robots provides step-by-step directions for six exciting projects, each costing less than $300. Together, they form the essential ingredients for making your own humanoid robot. $24.95
Robots and Robotics: Principles, Systems, and Industrial Applications by Rex Miller and Mark Miller Written by a pair of technology experts and accomplished educators, this comprehensive resource provides a solid foundation in applied industrial robotics and robot technology. You will get straightforward explanations of the latest components, techniques, and capabilities along with practical examples and detailed illustrations. $90.00
Robotics Demystified by Edwin Wise YOU DON'T NEED ARTIFICIAL INTELLIGENCE TO LEARN ROBOTICS! Now anyone with an interest in robotics can gain a deeper understanding — without formal training, unlimited time, or a genius IQ. In Robotics Demystified, expert robot builder and author Edwin Wise provides an effective and totally painless way to learn about the technologies used to build robots! $19.95
To Order Call 800 783-4624 or visit our webstore
SV Webstore - Aug 17 working_SV Webstore May 16 working.qxd 7/4/2017 7:28 PM Page 67
Order online www.servomagazine.com SPECIAL OFFERS
Build Your Own Quadcopter by Donald Norris Build and customize radio-controlled quadcopters that take off, land, hover, and soar. Build Your Own Quadcopter features step-by-step assembly plans and experiments that will have you launching fully functioning quadcopters in no time. This fun, do-it-yourself guide fuels your creativity with ideas for radical enhancements, including return-to-home functionality, formation flying, and even artificial intelligence! Reg $50.00 Sale Price $39.95
The SERVO Buddy Kit
PROJECTS 3D LED Cube Kit
PS2 Servomotor Controller Kit
From the article “Build the 3D LED Matrix Cube” as seen in the August 2011 issue of Nuts & Volts Magazine. An inexpensive circuit you can build to control a servo without a microcontroller.
For more information, please check out the May 2008 issue or go to the SERVO webstore.
Includes an article reprint.
$39.55
This kit shows you how to build a really cool 3D cube with a 4 x 4 x 4 monochromatic LED matrix which has a total of 64 LEDs. The preprogrammed microcontroller that includes 29 patterns that will automatically play with a runtime of approximately 6-1/2 minutes. Colors available: Green, Red, Yellow & Blue. Jig and plastic cases also available.
This kit accompanied with your own PlayStation controller will allow you to control up to six servomotors. Includes all components and instruction manual. For more information, please see the February 2011 edition of SERVO Magazine. Assembled units available! $79.95
$57.95
SERVO 08.2017
67
THIS SIDE UP
Introducing the Balboa 32U4 balancing robot kit from Pololu.
Find out more at www.pololu.com/balboa
5/1/2017 10:38:06 PM
Full Page.indd 68