I still have a lot of drone videos to edit from this summer, but here is one that came out ok (if only I smiled!). Taken with a vanilla DJI Phantom 2 + GoPro.
Getting up early to catch the Eastbound ferry rewards you with a great view of the sunrise over the mountains. I always try to remember to capture a Hyperlapse while riding public transportation in beautiful places. This one would have been easier with gloves, but it was worth it!
7/17/2014 Update from Sam K:
LIFA has been replaced with LINX which includes support for the Leonardo (and lots of other new features too!). Check it LINX here: https://www.labviewhacker.com/doku.php?id=libraries:linx:linx
Let us know if you have any questions about LINX by posting in the LabVIEW Hacker forums here: https://www.labviewhacker.com/forums/linx Thanks! Sam K LIFA & LINX Developer http://www.labviewhacker.com
Original 2013 Post
I've seen a lot of neat projects using the LabVIEW interface for Arduino (LIFA). It's a quick way to communicate with an Arduino, build a nice GUI for prototyping or testing sensors, and integrate it into a larger system (the Waterloo Labs Science Fair Mashup is a great example). It's also pretty cheap to try ($50 for LV SE + Arduino Uno). Recently I ran into a bit of a hiccup in trying to use LIFA with a newer Arduino Leonardo to graph some sensor data. Reading the forums, I found others who ran into the same two problems:
- The AFMotor library used by LIFA does not yet support Leonardo
- The Leonardo USB-Serial interface may not be recognized in VISA
For others who run into these issues, here are a few quick workarounds: For #1, simply contribute a patch to the AFMotor library to add Leonardo support. Alternatively, you can remove the AFMotor and Servo libraries from the Arduino project (assuming you don't need motor control). This is done by clicking the down arrow on the right of the tab bar in the Arduino IDE, and deleting these files from the project. The last step here is to comment out "#DEFINE STEPPER_SUPPORT 1" in LabVIEWInterface.h. This will prevent compilation errors due to missing servo libraries (thanks for including that Sam!).
As for the VISA issues, I had no success debugging the issue with VISA 4.6. The USB-serial resource was detected, but listed as 'incomplete'. Fortunately, updating to NI-VISA 5.1.2 solved this problem. With those two changes, I was able to compile and upload the LIFA firmware, and communicate with the Leonardo from a LabVIEW VI. The only caveat (besides losing motor support) - some of the IO definitions listed in LIFA VI comments do not apply to Leonardo. For example - Leonardo I2C (aka 'Wire') IO are on pins 2/3, not on A4/A5 as on the Uno. Here's a photo of using the Leonardo I2C interface from LabVIEW via Sam's BlinkM Example:
I've been eager to join TechShop since they launched many years ago in the Bay Area. This fall we Austin makers finally got our chance! It's a great space and is connected to a Lowes hardware store, so materials are close at hand:
You can see TechShop equipment details here: TechShop Facilities In order to use many of these tools, one first must take a 'Safety & Basic Use' (SBU) class. As the name suggests, the class is focused on teaching the basics of using the tool in a safe manner.
Many of the early members are blasting their way through the SBU classes as fast as possible - as evidenced by the full Austin class calendar. I've taken my share, but was most excited for the Waterjet SBU. A waterjet uses high pressure water mixed with an abrasive media (60k psi with garnet in our case) to precisely cut (via erosion) very thick material. Getting access to a precise and powerful piece of equipment like this (supposedly costing > $200k) was one of the main reasons I joined TechShop.
The Waterjet SBU is 4 hours long, taught by local expert Lee Lanford, owner of Heart of Texas Metalworks. Lee was a lot of fun and great teacher. We spent 2/3 of the class learning the Waterjet CAD/CAM software - Flowcut and FlowPath - primarily through drawing our own designs. The last 1/3 of the class was at the Waterjet, where we walked through the operation and each student cut their own playing card (below).
After the class was over, I wanted to take another pass at using the Waterjet to reinforce what we learned. I used Flowpath to whip up a quick design using the 1st comic book emblem that came to mind:
And here is a preview of the cutting path, in the FlowCut software. The green lines show the traverse path between cuts, the red dots indicate a lead in cut (entry point). You can control all of this as well as the cutting speed as part of your design files.
I then found some 1/8" steel in the scrap bin, setup the Waterjet and let it run. The cut took about 5.5 minutes. Here is a 4x speedup video.
And the result, a nice ornament for our Xmas tree (probably not).
The class was a lot of fun. I now feel very comfortable with an awesome piece of equipment. Next step - building something useful!
As I mentioned in the LED Ring construction post, I wanted to make sure 4 AA batteries would power my 25 RGB LEDs through a good 3+ hours of trick-or-treating. The Adafruit doc provides a good battery life estimate, but I figured I might as well measure it. Fortunately, I had a myDAQ handy, and hooked it up to measure battery current and voltage as shown in the schematic.
Note: the power consumed by the 1N4001 diode is not measured with this setup.
I then wrote a quick LabVIEW VI to measure & log the battery voltage and current every second. This way I could see the voltage and current drop as the batteries discharged.
With some fresh AA's, I powered up the LEDs and ran the 'RainbowCycle' pattern from the Adafruit WS2801 library, shown below (all 25 LEDs are on driving different colors, this should be a good worst-case current draw mode).
The myDAQ logged data to a CSV file for about 8 hours, you can see the resulting current, voltage and power vs time (click for a larger version).
The graph shows about 5 hours of LED power before the current drops off, plenty for my application. In total the LEDs consumed about 1900 mAh during the test, which is in line with the original estimate.
As promised, here is a rundown of how the synchronized LED rings from our Halloween costumes came together. When we initially designed these Roomba costumes, we knew they would look great in daylight but needed some flair to make them more visible after dark. LEDs to the rescue!
As all three costumes had a similar cylindrical shape, we decided to build an 'LED ring' that we could then mount to the top of each cylinder. An LED ring would allow for many interesting animations and could light our way in the dark. Here is the original sketchup design:
Of course, one of the first questions with any portable electronics project is battery life vs. weight. With RGB LEDs, current consumption varies widely based on the color displayed. Adafruit has a nice document with some good general rules for estimating LED power consumption. This gave me confidence that 4 x AA could last through ~3 hrs of trick-or-treating, but to be safe I setup a quick battery life test (which confirmed the estimate). I'll detail this test in another post.
Finally - blinking LEDs is really cool, but we wanted a little more flair. Why not synchronize the animations on the 3 rings wirelessly? We will update the rings every 50 ms, so we would want < 10 ms synchronization, ideally < 2 ms. Many people may not notice, but it's a fun challenge. With about 3.5 weeks before Halloween, we started hacking.
There are a lot of cheap RF modules and ICs from TI and others that allow for wireless communication. Here is a fun project that uses a TI radio: Wireless Friend Finder . However, with 3 weeks to work we had to keep it simple - so I thought it would be fun to try to communicate & synchronize via Infrared (IR) .
IR LEDs and receivers are cheap, easy to use, and surprisingly effective for communicating at little data over 10-25' (like your TV remote, or the famous TV-B-Gone), and we could hook them right up to the Arduino UART (handy for synchronization). Of course, like your remote, the IR transmission can easily be blocked by objects between the transmitter and receiver. Given our low data bandwidth requirements, we felt we could adjust our protocol to tolerate lossy communication.
We whipped up a simple IR TX/RX PCB, sent it off to OSHPark, and crossed our fingers. The general idea was to allow the 3 rings to share time and LED animation status via IR communication. The PCB design is shown below, I'll detail this in a future post.
The next step was gathering the materials to build the ring, here is what we used:
- Ring structure = $5 Metal wreath frame, 24" diameter (from Joann)
- 1000 4" zip ties
- 12mm RGB LED Pixel Strand of 25 (from Adafruit)
- 4-pin JST receptacle cable (from Adafruit)
- 2-pin JST In line power wire, male & female (from Adafruit)
- 4x AA Battery Holder (from Adafruit)
- 1N4001 Diode (from Adafruit)
- 6-wire Ribbon Cable (from Sparkfun)
- Pro Micro 5V Arduino compatible ATmega32U4 (from Sparkfun)
- 4 Custom IR TX/RX PCBs (detailed below)
- Various batteries, hot glue, solder, header pins, etc.
- Velcro-attached fabric sheath
Amazingly, the 25 LED strand was the exact length to fit the wreath frame circumference, LEDs even lined up with the cross members of the frame! Pure luck, but it made assembly go quickly - I zip tied the 25 LEDs around the ring, making sure to wrap in the same direction for all three rings, and leaving a space for the Pro Micro at the back.
Once the LEDs were attached, I soldered connector cables to the battery and Pro Micro SPI pins. Pro tip: When soldering headers onto a small PCB, use a foam backing to keep the headers straight without burning your fingers:
If we didn't care about synchronization, we could attach the Pro Micro and battery pack to the ring and be done. Unfortunately, we had only just begun.
IR PCB Assembly
The IR PCBs arrived from OSHPark on 10/22. With a box full of components from Mouser, we soldered them up in a few hours (4 PCBs/ring = 12 boards to solder), and quickly tested the frequency, IR TX and RX functionality.
Now it was back to the rings - after soldering wires to each IR PCB, I used even more zip ties to attach 4 IR PCBs to each ring (~90 degrees apart). Then can the fun part of soldering these 4 wire-clusters to the Pro Micro headers. It's not pretty, but it did the job:
I added in a 9V to power the Pro Micro - wired right in to the 'RAW' pin (just in case LED current caused the 4AA output to droop) - and the assembly was good to go. Then it was a healthy amount of hot glue and more zip ties to secure everything to the frame.
My wife insisted on sewing black covers for each ring, with holes for the LEDs and IR, and a velcro seam at the back. In the end it looks pretty nice:
A quick post on our 2012 Halloween costumes - after many late nights, we had an awesome time walking around the neighborhood tonight.
Background - my son loves our Roomba vacuum cleaner. He loves to watch it work, loves to take it apart and clean it, even loves to watch 10 min teardown videos on Youtube. As such, we knew we had to make him a Roomba costume for Halloween. But what about my wife and I? The virtual walls!
A few weeks back, my wife and MIL got to work crafting an awesome costume. Here they are in action:
And here is the end result (below). You can see that Halloween started out a bit rough, the key player in theme was non cooperative.
However, all was not lost. Our backup plan involved mounting his costume to his stroller (along with him).
After dark, we turned on the flair - my friend Matt and I built up 3 LED rings to mount on the top of the costumes. The LEDs are the 25-pixel strings from Adafruit controlled by an Arduino Pro Micro from Sparkfun, powered by 4 AA batteries and a 9V.
Update: I detailed the LED Ring Design and Construction here.
The best part - we were able to synchronize the 3 LED rings via an IR transceiver board we built. The rings used IR to share timer values and calibrate to a common understanding of time - allowing them to blink in sync! Here is a mockup of the ring (with purple PCBs from OSHPark) and a photo of our PCBs (9 of 12).
The costumes lit up the night, we heard a ton of oohs & aahs, pictures taken, lots of questions, it was a blast! I'll post more on how we did it when I catch up on my sleep.
And here we are trick or treating.
About a year ago I decided I should broaden my software horizons and learn something completely different from my normal fare of FPGAs and hardware. As such, I started learning Ruby on Rails. Long story short - it's been an awesome year, I have learned a lot about Rails development, but even more about efficient (and inefficient) ways to learn. This post is an attempt to catalog the latter to help others traveling this path.
Five tips for learning Ruby on Rails (or anything really)
1 - Work towards a specific project or goal
This advice applies to learning any new skill - learning Rails just for the sake of learning Rails is great, and possible, but not nearly as fun or satisfying. Fun/satisfying things take less motivation to work on and as one of my mentors put it "Developer motivation is a scarce resource, use it wisely".
Decide on a specific web app that you would like to build with your acquired Rails skills. This could be your personal blog, a web community for your hobby, or your startup idea. This project continuity not only provides focus and motivation, but also serves a source of real development challenges and results. In my case, I built a fishing app for iPhone, FishingScout.com
2 - Get involved in the community
Austin is fortunate to have a vibrant Rails developer community, anchored by Austin on Rails (thanks Damon!). I started my Rails journey by attending a few meetings to get a feel for the people and projects.
This was invaluable both for meeting other Rails developers (of all experience levels) and keeping up with new tools, gems, etc. Many times a 10 min conversation at an AoR meeting has saved me hours of development trial-and-error. Best of all, its a lot of fun!
3 - Consider paying for a class or tutoring
You'll hear this advice from many successful people - if you are serious about a worthy goal, and you can afford it, then you can significantly accelerate your trip up the learning curve by hiring help. For example, if you read Noah Kagan's writing, he is serious about physical fitness and he often references advice from his health coach.
Through an AoR conversation, I heard about an upcoming 'Rails for Beginners' course lead by Mattt Thompson (then of Gowalla, now of Heroku). The class consisted of 2 full weekends in the classroom plus projects & homework. It wasn't cheap, but there were only 10 students, so we had a lot of time for questions and exploration. Mattt was a great teacher and I finished the course feeling like I had taken a massive leap forward in my capability.
4 - Find a mentor or three
Similar to hiring a tutor, a mentor can make a massive difference in the speed of your progress. A good mentor helps you focus on what is important, avoid common pitfalls, and holds you accountable for making progress.
Following the Rails course, Mattt Thompson was (and still is) very responsive in answering questions and providing advice. Further, the Rails community seems universally committed to helping eachother out. Case in point, there are apps that exist purely to provide assistance to new Rails developers:
- RailsMentors.com - mentor matchmaking service
- Rails Hotline - a call-in service staffed by Rails Experts
I have taken advantage of both of these services - Rails Mentor Tim Tyrrell has helped me become more proficient with testing, tools, and ActiveRecord. Similarly, I've called the hotline 10+ times, always coming away with a solution or at least a direction. Hotline founder Chap Ambrose, as well as all of the developers taking the calls, go out of there way to help you out (sharing code, emailing ideas days later, following up to make sure you're not stuck). Take advantage of these resources.
5 - Use online resources deliberately
I left this tip for last because it is the default approach. Thanks to _why and others like him, there are great online resources for learning Ruby and Rails. The key point here is to be deliberate, pick one or two tutorials and complete them in a regular, disciplined manner. A scattered/haphazard approach here will kill your efficiency & retention.
Here are a few online Ruby & Rails resources I have used:
- TryRuby.org and RubyMonk.com - interactive Ruby tutorials
- Michael Hartl's RoR Tutorial book/site - I found this to be a great supplement to other coursework
- Schneems.com - Austinite Richard Schneeman shares his UT Rails coursework here
- JumpstartLab Tutorials - I haven't gone through these, but have heard they are well done
- Rails for Zombies - The free course is fast with fun exercises
In the end, it's pretty straightforward:
- Work towards a specific project or goal
- Get involved in the community
- Consider paying for a class or tutoring
- Find a mentor or three
- Use online resources deliberately
I hope these 5 tips can help you on your path to learning Rails (or any challenge you find worthy). No matter the project, the effort and learning required to build something new is very rewarding in itself.
H/T to SHL's post for reminding me that I needed to publish this!
RFI is a serious concern (especially for radio telescopes), but so is a tasty snack. Here is one way they balance these needs at the GBT. This microwave is in the main control room, which itself is in a faraday cage. Side note: I need a microwave with a 'Danger' mark.
Yesterday at my son's urging we flipped the 'robot' backpack around and got some front facing video with the Snorricam. It's pretty great, amazingly he ignores the camera and goes about his business! Here is a photo of the rig in action.
Build details are here: Toddler Snorricam – First Video