Project Astromech, a 2 Geeks Web Design Presentation
Welcome
Build Journal
The Dome
The Electronics
The Body
The Legs
Parts Rundown Dome Hardware Dome Electronics Body Hardware Body Electronics Leg Hardware Leg Electronics Other Electronics
Dome Hardware
Dome Electronics
Body Hardware
Body Electronics
Leg Hardware
Leg Electronics
Other Electronics
One of the most endearing things about Artoo that we all have come to love is what I call his “personality”. The beeps, buzzes and whistles he makes through out the saga along with the many movements and lights positioned in and around his dome.
In building our droid, I plan on enabling control of each of Artoo’s 10 dome panels so they open and close. I also hope to add control to his three HoloProjectors, including LED lighting for each. Most importantly, I want to allow him to talk and communicate with us.
There are several lights situated around his dome and they include:
3 HoloProjectors mentioned above. (5)
Rear Logic Display (11)
2 Front Logic Displays (3)
Rear PSI (9)
Front PSI (4)
Magic Panel (8)
To tie all this functionality together we have decided to leverage the Marcduino Control System designed and developed by an insanely talented and uber smart gentleman, CuriousMarc. Marc is a prolific contributor to the forums on Astromech.net and explains his system, provides build instructions, and offers custom firmware for his boards at his website, www.curiousmarc.com .
What makes Marc’s system exceptional, is he has not only designed these custom boards, but also developed an amazing iOS app, R2 Touch , to allow us to control most of Artoo’s dome functions from the touch of our iPhone or iPad.
This app will allow us to:
Open and Close All Dome Panels
Trigger Dozens of Sound Bites and Music
Animate and Control All Three Holoprojectors
Initiate Custom Sequences Involving Sound, Lighting and Movement
Control Magic Panel Display…eventually
Control Front and Rear Logic Displays including sending custom messages…eventually
So now that we know what we hope to do…lets build our boards.
Marcduino boards are based on the same chip as an Arduino, but Marc custom designed the system for the needs of an Astromech Builder.
He kindly offered his custom PCB through Oshpark for a very reasonable fee. Since the system requires both a master and slave board to fully automate all items, we went ahead and ordered two boards.
We also ordered the following components to complete our construction:
Part
Quantity
DigiKey Part Number
Online Source
16 MHz Crystal
887-1019-ND
DigiKey Link
ATMega328P
ATMEGA328P-PU-ND
0.1 uF Cap
445-5303-ND
20 pf Cap
SR151A200JAR
100 uF Cap 16V
399-6601-ND
1 kOhm Resistor 1/4W
CF14JT1K00CT-ND
3mm LED Red
754-1606-ND
3mm LED Green
754-1603-ND
0.1″ pin 50 strip
SAM1031-50-ND
0.1″ pin 2 row 10 strip
5-146257-5-ND
While each of the boards (master and slave) have slightly different functions, they require the same hardware so both boards were built identically. The different functions are handled by separate firmware versions. I am not going to bore you with the details of soldering each of these various components but they were assembled as illustrated here.
If you would like addition information regarding assembly, please visit Marc’s Assembly Page .
Once completed, I ended up with the following two boards: Our Completed Marcduino Boards
Before you say it, I am completely aware my soldering skills at this point of the project leave much to be desired. Soldering is one of those skills that you can only really figure out by doing it over and over again. Trust me, when I begin to construct our Teeces Lighting System later in the build, I will get way more practice than I ever wanted.
One lesson I did learn about soldering that at first seams to go against logic is that adding more solder can make it easier to melt an existing joint. This is handy when you may need to remove a component. Often a set joint is difficult to reheat, but by applying additional solder, the joint quickly melts free allowing the components to be removed.
Each panel requires it’s own firmware before it can function properly.
The master board manages the general functions of the system and controls all ten servos required to automate Artoo’s dome panels. It is also responsible for triggering Artoo’s collection of sounds. It does this by sending serial data to an MP3 Trigger board we will discuss here in a minute.
The slave board handles the control of the Haloprojector movement and lights. Additionally, this board can connect to a Magic Panel Kit and either a Teeces Logic and PSI Display System or Jedi Droid Control System. We plan to incorporate one of mcwhlr’s Magic Panel Kits as well as the Teeces System. However, at this point we will be focusing on getting our system operating for just the basic set of functions.
Both firmware versions are available from Marc’s Site . We selected the two versions required for our hardware choices (PanelController_MP3Trigger_v1.6.hex for master, HPController_v1.5.hex for slave), downloaded the .hex files to our Mac (remembering their saved location) and set off to flash each of our boards.
To flash each board we must use an ISP Programmer such as the one we used her from Sparkfun .
While it seemed that getting all the correct drivers and applications to complete this project on a Windows machine can be a bit tricky, I was pleasantly surprised at just how easy it was to accomplish on my Macbook.
We first needed to download the command line tool AVRdude, it is part of the larger Crosspack AVR for the Mac application bundle. I simply downloaded and installed the application. Once complete, I connected the first Marcduino board to the Pocket AVR Programmer via the included cable and then connected the programmer to my Mac via a mini USB cable.
I opened the terminal and entered the first of 2 commands required to correctly flash the master board.
Step 1: Write Fuses: <PATH TO DIRECTORY>/CrossPack-AVR-20130212/bin/avrdude -C <PATH TO DIRECTORY>/CrossPack-AVR-20130212/etc/avrdude.conf -p m328p -P usb -c usbtiny -u -U efuse:w:0x07:m -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m
Note: This initially resulted in an error, it could not locate my device. Now, trying to trouble shoot this problem took a great deal of my time but taught me a valuable lesson. Never overlook the small things! After reinstalling software, reading forums for advice, ordering a new programmer and all sorts of other things, you know what my problem was…the USB cable was bad, that’s it. A $4 part. Live and learn. Again, that is really the point of this project.
Step 2: Flash Code: <PATH TO DIRECTORY>/CrossPack-AVR-20130212/bin/avrdude -C <PATH TO DIRECTORY>/CrossPack-AVR-20130212/etc/avrdude.conf -p m328p -P usb -c usbtiny -U flash:w:<PATH TO FILE>/PanelController_MP3Trigger_v1.6.hex:a
Boom, that is it for the first board. Once complete, I rebooted the board and correctly received a solid green LED and after a short moment a blinking red one as well. So far so good.
I moved on to the slave board and repeated the two steps with the following commands: Step 1: Write Fuses: <PATH TO DIRECTORY>/CrossPack-AVR-20130212/bin/avrdude -C <PATH TO DIRECTORY>/CrossPack-AVR-20130212/etc/avrdude.conf -p m328p -P usb -c usbtiny -u -U efuse:w:0x07:m -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m
Step 2: Flash Code: <PATH TO DIRECTORY>/CrossPack-AVR-20130212/bin/avrdude -C <PATH TO DIRECTORY>/CrossPack-AVR-20130212/etc/avrdude.conf -p m328p -P usb -c usbtiny -U flash:w:<PATH TO FILE>/HPController_v1.5.hex:a
As with the first, the board was quickly flashed and I was greeted with both a solid green and blinking red LED.
Now, lets see if they really work.
In order for us to achieve the basic functions of the Marcduino system, we first needed to collect and purchase the following items:
Both the Master and Slave Marduino Boards
MP3 Trigger from Sparkfun
16 Tower Pro MG90S 9ox Metal Gear Servos
3 CuriousMarc Holo Light Boards we assembled earlier
WiFly RN-XV Radio Module from Sparkfun
XBee/WiFly Explorer from Sparkfun
2 X 15 watt 4 ohm Class-D Audio Amplifier Board
A Pair of Pyle 3.5″ 120 Watt Two-Way Speakers
8GB Micro SD Card to store sound files.
1/8″ Mini Jack to RCA Adaptor
12ga Speaker Wire
Assorted Colored 18ga female/female jumper cables
Before we hooked all these components, we first needed to set up our WiFly RN-XV Radio Module so that it would create the single connection Wi-Fi access point with which our iOS devise can connect.
To update the module, we used a XBee Dongle from Sparkfun to connect to a USB port. The steps required to do this are quite dry and really no fun to read.
If you wish to learn, they can be found on CuriousMarc’s Web Site
Basically, we just set the various network settings used to make the connection between the iOS device and the master Marduino board, such as IP Address, Netmask, Gateway, etc. We also set our SSID to “R2D2WiFly” so we can easily identify the network connection needed to establish communication with Artoo.
This device allows only one connection so we don’t need to worry about another device connecting to our droid and attempting control.
Once completed, we began connecting our system together. Here is a high resolution mock up of how we wired all of our components together.
Below is a shot of our testing board set up along with many other aspects of Artoo’s Dome Electronics including the Holo Light Boards , Teeces 3.2 Logic Display and PSI system , and rotopod’s Dome Bump Controller we will be explaining in latter posts. We are also using one of Chris’ 12V to 5V power distribution boards. This board is highly efficient allowing us to regulate the 12v feed into the dome down to 5v at around 6amps. Enough to power the 10 panel servos and 6 projector servos.
Dome Electronics Pt. 1: Building CuriousMarc’s Marcduino Dome Control System
Lighting Up the Dome, Part 1: Building the Teeces 3.2 Logic Display and PSI system.
Artoo’s First Steps: Testing His Differential Drive System via RC
Testing My Syren 10 and Pololu 18v25 Motor Controllers with Drive Motors…I went 2-3 with a Huge Strike Out!!
Configuring, Connecting (Binding) and Testing Artoo’s RC Transmitter and Receiver.
Tested.com interview (Senna's R2 Adventures)
Star Wars Day at the Corona Public Library 2015 (Victor's R2 Blog)
UPCOMING APPEARANCE: Oct 10, East Anaheim Branch Library (Senna's R2 Adventures)
Body work on BB (Thomas's R2 Blog)
R2LA XII (Victor's R2 Blog)
12th annual R2-LA (Senna's R2 Adventures)