ArduPilot successful flight simulation, by Michal B.

February 20th, 2009

A photo of successful flight as seen in Google Earth and X-plane:
 
Here is another ArduPilot simulation inspired by Jordi’s simulation.

My simulation requires minimum additional hardware, all you need is ArduPilot connected by FTDI cable to PC.
Actual simulation runs in X-plane simulator. ArduPilot get simulated GPS data over serial, and it returns back proposed servo positions back over serial as part of telemetry info (servos can also move physically). ArduPilot also reports bunch of variables - lat/lot/alt, next waypoint, distance to it, etc.

What you need to repeat the simulation:
- Modified ArduPilot code from this blog post
X-plane 9 demo (buy full version if you wish, but demo works just perfect, it only ignores joystick input after 10 minutes, but we control it other way so it really doesn’t limit us)
Google Earth
- ArduSimulator ArduSim_20090211.zip (developed by me), which is simple application that does following:
1) Connects to ArduPilot over serial for sending/receiving data
2) Connects to X-plane on localhost (same PC)
3) Reads data from X-plane (lat/lon/alt/course), sending these to ArduPilot as GPS sentences
4) Simulating FMA copilot stabilization on ailerons/elevator
5) Reads and displays telemetry and servo positions from ArduPilot
6) Sends servo positions to X-plane to control throttle and rudder
7) Records fly path and sends it to Google Earth to display

Here’s how to repeat the simulation:
- Start X-plane, go to Menu->Settings->Net Connections, select tab Inet 3 and enable “IP of data receiver”, change IP address to 127.0.0.1 and port to 49001. It looks like this:

- Select Aircraft from folder Aircraft\Radio Control\GP_PT_60 (yes, we want to fly RC plane which has ail/elv/rud/thr controll)
- Select airport Innsbruck
- You can open this KML path: Innsbruck.kmz in Google Earth, which was my testing fly plan configured in ArduPilot; this will show you the waypoints
- upload compiled ArduPilot code to the board and leave it running; LOCK LED should keep flashing
- start ArduSim.exe (simulator tool); it will connect to serial port and X-plane; if it can’t connect to serial, specify correct port and baudrate and press Start button
- click [Google Earth] button in ArduSim to make connection with GE
- hit B in X-plane to release brakes, and try keys A/W/C to choose various views
Now simulation should be running if everything is connected successfully, and you should see plane in X-plane to fly and visualization path & icon in Google Earth to move. Don’t control plane in X-plane! ArduPilot will take-off and fly on its own.

Here’s video how it all looks in action:
 
And complete flight path visualization for Google Earth: Flight.kmz
You can see original waypoints in white, and real fly path in yellow. And also final circulation over start point when all waypoints were visited…

Now about problems and future tasks:
- I have strong impression that controlling altitude by throttle with use of copilot stabilization doesn’t work properly, this simulation showed me that plane didn’t want to drop altitude from high point to lower one… see results in above flight path in GE. I’m not sure how real plane behaves (didn’t went out to real world with this yet), we’ll see.
- For this reason I plan to start playing with complete stabilization in ArduPilot, and controlling both elevator+throttle to get desired altitude.
- You can play with dozen of various parameters to control behavior, most obvious are PID settings for throttle/rudder in ArduPilot, but also PID values in stabilization (which is here provided by simulator tool, in real world it is FMA Copilot which you can control by its sensitivity setting). Then you can change maximal servo rotation for ArduPilot to work with. All these values make the plane fly smoother, make more precise turns, etc etc. And the settings seem to depend on actual aircraft and its physical behavior. So there won’t be single settings working for everyone.
- It’s somehow cumbersome to specify different altitude for various waypoints; while I converted waypoints from KML file out of Google Earth, I had to specify individual altitudes manually in waypoints.h file in ArduPilot code.

After all, I’m pretty happy to see the plane flying in simulator and doing the task! Note that it’s ArduPilot doing the navigation work. And in a real airplane, this simulation allows to reuse the ArduSim application as a base station, getting telemetry from plane over Xbee modem and displaying what it does as well as showing path in Google Earth.

Is GPS good enough for altitude hold? by Chris Anderson

February 19th, 2009

In our quest to create the simplest and cheapest autopilot available, we’re debating whether we need a barometric pressure sensor or can do reasonable altitude control with GPS alone. The old answer to this was the GPS alone wouldn’t work–not only were errors of as much as 10s of meters, but glitching could leave you without any altitude data at all for many seconds at a time. But the newer SiRF III chipsets are much better at altitude calculation, and the even newer yet uBlox5 GPS module is almost as good as a pressure sensor at altitude (it’s too expensive for our purposes, but a glimpse of the way things are going). So let’s look at that question agan: do we need a pressure sensor?

The way to tell is to test a pressure sensor head-to-head against GPS under varying condition. Here’s a paper that did just that, using the older (and worse) SiRF II chipset. A sample of the data is the graph above, which as you can see shows errors of as much as 60m in some cases. Needless to say, that would be unusable. (It turns out that many of those errors were due to GPS lag, and shifting the GPS line forward by 13 seconds improves the fit considerably. But if you’re trying to fly on that data, you’re stuck in real time, so those sort of corrections don’t help.)

Jack Crossfire has been testing more modern GPSs, including both the SiRF III-based EM406 that we use and the uBlox5, and his data is more encouraging. A sample post on EM406 data is here, and a chart from that post follows:


Unfortunately this isn’t calibrated so there are no units on the scale, and we can’t calculate the absolute error. (Jack, any chance you still have that data and can oblige?). But given that the data was taken in a heli and he’s probably flying at around 30m, my sense is that we’re looking at errors of less than 6m and no crazy glitches.

If so, that’s within the usable range for us. We’re typically looking at holding altitude around 50-100m, so single-digit variation is acceptable. It’s not perfect, but doing without a pressure sensor would save us about $25 on the autopilot (keeping it below the magic $100 figure), and simplify calibration and instrument-compartment design (no need to pressure-isolate it).

I’ve got a pressure sensor coming and will do a proper head-to-head with the EM406 and the surface-mount EM312 (which will be built in to the autopilot on the production version) under various conditions before making the final decision, but for now we’re betting on GPS being good enough (and getting better) to do the trick. Anybody disagree?

ArduPilot by Chris Anderson

February 19th, 2009

 

ArduPilot is an inexpensive navigation-only autopilot based on the open-source Arduino platform. It is available for $24.95 atSparkfun. (You will also need a GPS module and FMA Co-Pilot if you don’t already have them.) The software and hardware are all open source.

[UPDATE 2/5/09: There were two problems with ArduPilot boards shipped prior to this date. Those prior to 1/26 had the wrong firmware in the Attiny (MUX) chip and the CKDIV8 fuse in that chip was not cleared at the factory as it should have been. Those between 1/26 and 2/5 had the right firmware but the fuse was still not set. If you have an affected board, here are the solutions:

1) The fastest way, if you have an AVR programmer, is just to fix it yourself. If you just need to clear that fuse, follow the relevant part of the instruction here. If you also need to update the firmware (board shipped before 1/26) reflash the chip with the updated code (hex file is here), using the same instructions as above. If you don't have an AVR programmer, but have always wanted one, this is your chance! The AVRISP2 is excellent, comes with the terrific AVR Studio software, and is cheap ($34)

2) If you don't have an AVR programmer, the solution is to return the boards to Sparkfun and they will reflash or replace them at no charge, testing to ensure that you have a working board. Just send an email to techsupport@sparkfun.com, who have been alerted and will help you with the process.

All board shipped from today on will have the correct firmware and fuse settings, so this should be the end of the problem. Again, our apologies for the inconvenience and confusion. Our aim is to ensure that everyone has a working board as soon as possible, and Sparkfun has been great about responding quickly and making sure this doesn't happen again. Thanks for your support and understanding.]

ArduPilot features include:

  • Can be used for an autonomous aircraft, car or boat. Stabilization unit only required for a plane.
  • Built-in hardware failsafe that uses a separate circuit (multiplexer chip and ATTiny processor) to transfer control from the RC system to the autopilot and back again. Includes ability to reboot the main processor in mid-flight.
  • Multiple 3D waypoints (limited only by memory)
  • Altitude controlled with the throttle.
  • Comes with a 6-pin GPS connector for the 1hz EM406 GPS module. Faster 5hz GPS modules, such as the Locosys 200031, are supported via an optional 3.3v daughterboard.
  • Has six spare analog inputs (with ADC on each) and six spare digital input/outputs to add additional sensors
  • Supports addition of wireless downlink module for telemetry [code not currently provided]
  • Based on a 16MhZ Atmega168 processor. Total onboard processing power aprox 24 MIPS.
  • Very small: 30mm x 47mm
  • Can be powered by either the RC receiver or a separate battery
  • High-speed ASCII NMEA parser for compatibility with standard GPS modules at any baud rate.
  • Hardware-driven servo control (using the Arduino Servo Timer library), which means less processor overhead, tighter response and no jitters.
  • Four RC-in channels (plus the autopilot on/off channel) can be processed by the autopilot. This allows the autopilot to read the initial throttle and rudder position when you switch to autonomous mode, so it can maintain speed and heading. The other two channels can be used for whatever you want, such as triggering a camera sequence or dropping an object. (Remember that the aileron and elevator channels are separately controlled by the FMA Co-Pilot)
  • Status LEDs for power, failsafe (on/off) and GPS (satellite lock).

Instructions:

Open source essentials:

  • Latest autopilot code (for the board’s main processor, an Atmega168) is here.
  • Latest multiplexer code (for the board’s second processor, an Attiny, which runs the failsafe system) ishere. (If all you want is to load our code, rather than modify it, just use AVR Studio to burn this hex file). For people not familiar with AVR Studio, instructions for loading this code are here.
  • If you want to build your own board from scratch, the necessary files and component lists are here.

ArduPilot just controls the rudder (for navigation to GPS waypoints) and the throttle (for altitude hold). It requires a third-party stabilization unit (we recommend the FMA CPD4 CoPilot) to control the ailerons and elevator of the aircraft. If you want a more sophisticated autopilot that has the stabilization function built-in, you’ll need to wait for ArduPilot Pro, which is not as far along on the development path.

Recommended UAV setup:

 

  • Airframe: Hobbico SuperStar (49″ wingspan, $95, shown). This is an inexpensive, good flying high-wing trainer with ailerons. It can be hand launched in a park or take off from a runway, and replacement parts are readily available in case of a crash. If you want much better performance with this aircraft, you can upgrade it to a brushless motorspeed controller and a LiPo battery. [If you don't already have one, you'll also need a balancing charger and power supply.] Note: any stable aircraft with both ailerons (for stabilization) and rudder (for navigation) can work, so feel free to experiment with what you’ve got.
  • FMA Co-Pilot for wing-leveling and stabilization
  • EM406 GPS module
  • A six or seven channel RC transmitter and receiver, with at least one proportional aux control, such as the Futaba 7C (digital, more expensive) or Tower 6XM (FM, cheaper). Both work fine. You’ll also needthree servos.

Cool optional extras for your UAV:

The entire electronics setup for a typical electric aircraft with an ArduPilot and FMA CoPilot looks like this:


The following is a chronological list of posts describing the development of the project, mostly for historical purposes. If you’re interested in autopilot development and want to know more about ArduPilot features, they will give you some insight into the evolution of this project. But please be aware that these posts contain outdated code and PCB files, so do not use them.

The arduino based helicopter autopilot it’s real?

February 17th, 2009

As a challenge, I decided to program an arduino to fly a helicopter. It seemed like a good way to learn the language, and it’s caused me to learn processing. 

By Ed!

The prototype Helishield and an Arduino - with sockets for sensors yet to be fitted

The prototype Helishield and an Arduino - with sockets for sensors yet to be fitted

I recently purchased an Arduino from LadyAda, and started to learn the language. Having worked though the tutorials on her site I started looking at more and more complex code.

I coded an alarm clock, which successfully woke me up for a couple of mornings, 3 minutes before my normal alarm clock.

I then started thinking about what could be triggered after a specified delay, which lead me to the Nikon remote control/intervalometer. I’ve taken several long sequences of photos which I intend to turn into timelapse video.

I found sample code for reading the Wii nunchuck sensors, and tried it out to much success. This is about where Processingbecame involved. I wrote a basic readout for the accelerometer displaying a 3d cube, rotating with the reading from the accelerometers in the nunchuck.

I discovered a project someone was working on using the Wii nunchuck and arduino to stabilise a radio control helicopter.

I decided to try for myself, but using other sensors. I bought a Sparkfun development Gyro and a 3axis accelerometer, and set to coding the rest.

The project that inspired me to try was implementing stabilisation of the head of the helicopter, whilst using the existing control system too. I was aiming a little higher, with the arduino taking on the role of speed controller for the motors and controlling the servos, while reading the sensors and RC control signals.

Using the SPI bus, I quickly got the Accelerometer up and running with the demo code from sparkfun.

I borrowed code for reading the RC signals from the Ardupilot project.

The accelerometers don’t provide any useful information for rotation of the helicopter (about the Z axis) but can provide a noisy approximation of pitch and roll.

The gyro provides only rotational information about the Z axis, so bridges the gap to give a fairly good approximation of the movement of the important axes of motion.

I found out about Kalman filters, and some example code, which I adapted for my purposes.

This code provides a stabilised value for both pitch and roll, and takes info from the accels to futher improve the quality of the readings from the gyro.

By filtering the accel and gyro together, the bias from the gyro can be lost in the filters, tilt proves less of an issue for the gyro and clean accurate signals can be achieved with little work.

I wrote a sketch in processing to decode the serial output from the arduino, which was sending all the output data from the sensors. I quickly constructed a basic display, plotting the XY angles computed, and the resulting output servo signals on an invisible Cartesian plot, this illustrates the point quite nicely…

As the tilt increases, the output to the servos reacts in the opposite direction. Hopefully this will result in the helicopter stabilising.

The radio control input affects the output too, but only by a relatively small amount, ie. auto correction mixed 60-40 with incoming human control. This theoretically means human control of the helicopter will be very smooth requiring minimum skill to operate.

Mixing all the signals to create the desired outputs is handled by averaging the various outputs into one signal per output function.

The test airframe is a Piccolo Eco 2, which was purchased on ebay for £7! After replacing all the broken bits I had a helicopter with no electronics. Exactly what I was after…

Having got a stabilised and filtered reading for Yaw, X and Y angles I felt it was time to try making it fly.

The initial obstacle to flying was lack of 2x motor controllers, however a couple of burly transistors (TIP41C - just because I had some spare,) two resistors and two diodes was sufficient to get both motors running, speed control being handled using PWM from the arduino.

Unfortunately, at this point I discovered a significant drawback to having a large breadboard for developing, and a very small heli.

Time for a helicopter-diet. At this point I decided to develop the Helishield - a small pcb which mounts straight on top of the arduino, carrying the headers for all the connections, the sensors and the motor controllers.

Using the GEDA suite of programs, I created a layout for the Helishield, headers for the Accelerometer, gyro, servo connections, RC receiver, power and motors, two small motor controllers, and so on. It all fits on a board about 50mm2.

I have checked alignment with all the sockets, now all I’m waiting for is the PCB which is on order, and some spare time to etch and drill the pcb.

I have some ideas about making a whole system, on one board, using SMT throughout, then the whole thing could be sub 3 grams! (at a rough guess!)

I am working on getting a serial control API too, I think it would be very interesting (in this case possibly interesting == dangerous) to be able to fly the heli from a processing sketch.

The RC control reading code needs work… I wish to make the system as robust as possible, and at present all hell breaks loose if I turn off the transmitter, and occasionally it generates a random value, this is probably a timer overflow, or variable overflow. But to all intents and purposes, a functioning RC stabiliser.

I’d like to look at the possibility of capturing the whole RC signal using just one pin. The data sent over RC has to be sent serially, therefore, at some point in the receiver, all the values will be sent together on one line. I read something about doing that somewhere once upon a time. It would probably reduce the workload of the chip, as all 4/5/6 channels could be collected at once, on one pin. Freeing input/output pins and reducing code are both priorities for me at this stage.

Once I have the PCB made the heli will fly (to a lesser or greater extent) almost immediately. I am confident that it will get off the ground without my 500 gram development board attached! Once it takes off, it /should/ be a matter of adjusting ratios of control output relative to sensor input.

When all of the above is complete and I have stable-ish flight, I will turn my attention to the gyro, because at present I am using the analog output from the gyro, while it is able to provide an SPI interface, meaning the code to read the accelerometer could also read the gyro, freeing up more code space. This bit will probably require quite some work.

The serial API will have the ability to adjust the flight controls, and will take a similar approach to the RC control. I plan to continue to improve the processing sensor readout, and begin adding some form of human interaction with the heli.

Some time in the new year I hope to invest in a Collective Pitch helicopter, this will open up doors for HeliShield v2.

I think the Piccolo has taught me a lot about helicopters, and it’s never got further than skidding about on my desk so far.

I think that with the Piccolo, there will be little point in having any sensor input controlling the main rotor speed, as the torque available would probably not be immediate enough to be useful, whereas with a collective pitch heli, Z axis acceleration could slightly influence the main rotor pitch to achieve really smooth hovering, even in turbulence. I will test this feature with both types of helicopter though, it would be nice if it worked with the Piccolo too, but I have a feeling that the tail rotor would be working quite hard to keep everything straight.

Maybe I should investigate recording flight data, and plotting it somehow, then compare the results from different helicopters.

——-

Today I set about printing the masks for the PCB and etching a few test boards (having finally found a box of film suitable for the big laser printer).

The first masks I printed were good, but faint. A trial exposure for 6 minutes (under the UV) resulted in most of the resist being developed.

I set the printer to the best settings I could, and the next mask was much better. The first board I made (with a 5 minute exposure) was a great match to the mask, but the fine tracks were broken in places, and the pads were too small. Some of the pads lifted from the board during the drilling and I decided at that point that a slight redesign was needed. I have now increased the size of the pads, moved the gyro and accelerometer slightly towards the center of the board. I also removed the need for the two vias by re-routing a couple of tracks through newly found gaps. PCB layout software has a strange ability to make tiny spaces seem huge!

——-

I have made printed the new masks and made some test PCBs. The process timings are now known and repeatable, so there will be boards available to order from now on.

I will look into having the whole fabrication process done elsewhere, to allow for silk screen and other niceties, like solder masking - a must for boards with copper fill combined with hand soldering.

I have five boards for sale at £10 each, with more available if needed. Populated boards will be available soon.

If anyone is interested in the first few boards available, please contact me via the link at the bottom of this page.

The board carries two motor controllers, power and radio connections, 4x servo outputs (2 share pins with the motor controllers - either use the motor controllers, or the 2 extra servos, not both), a serial header, and sockets to fit a gyro and accelerometer.

I chose to fit sensors onto headers so the sensors are available for other uses. I am looking into building a complete system on one board with the Atmel micro, Accel, Gyro etc all fitted. It would probably be entirely SMT too, for the weight savings. Let me know if you have any ideas you’d like to see incorporated into the design.

———

I have partially populated the Helishield prototype with the parts for the motor controllers, pins to connect onto the arduino, servo headers etc.

Minor alterations have been made to the design to aid assembly,and to improve the position of the sensors. Both sensors are now roughly central.

A couple of tracks which were just too close for comfort have been tweaked too.

I’m awaiting delivery of the sockets for the gyro and accel, there seems to be a shortage. For the photo, I just plugged the header on the sensors into the holes on the PCB.

——–

I have been working on the serial control code for some time now and I have just succeeded in getting reliable control of the values in the flight algorithms from my processing sketch.

I have been offered a broken xBox 360, the dvd drive has failed, I looked up the use of the controllers using Linux, and have compiled and install the kernel module. I will have to see whether it works once I actually have it to work on. I also intend to replace the dvd drive and reflash the chip on the drive in order to boot live cds on the console. I will then try to set up the 360 as a flight control station - it seems to be plenty capable of the task.

I have also set up the library for Processing needed to read values from the controller (or other joysticks), although I can’t test this until I have the controller.

I will have a system together very soon that should be light enough to fly, I will be testing all aspects of the control, and tuning the flight algorithms to stabilise the flight as much as possible.

————–

Over the Christmas break, this project was on the front page of Sparkfun Electronics, causing a massive boost to traffic.

I’ve now answered questions from Bangladesh, Spain, Brazil, Russia and more…

Filling in the time between eating and sleeping, I was coding. I have written a test sketch for the Arduino with the intent of capturing all the incoming RC data in one pass, on one pin. The idea being to free up space for more (both in code and physical input/output)

Radio Control systems use PPM to code together a chain of pulses with the duration of each cycle being the value of a control, followed by a framing pause to enable the system keeping in sync.

I will test this as soon as I can get to my RC rx with the oscilloscope and find the PCM signal.

I intend to use this advance in code to further reduce the need for hardware other than the Helishield, I plan to design a complete on board solution soon.

————–

The serial API is now fully functional too, I can smoothly control the XY movement of the rotor, and control Throttle and yaw, all from a processing sketch (and potentially anything else that can output serial - yes, even your mobile phone…)

———-

I have successfully coded a system for reading the PCM data of the radio control signal (and hence all the channels available, entirely on one input pin.

The code times the the length of the cycles of incoming pulses, when the framing pulse is found a loop starts which records the start and finish times of each cycle, then the difference between these times is the RC control values.

No matter how many channels of radio you have, thee is only one period of waiting involved with reading the signal, so overall efficiency of the code is better than waiting for a signal on each pin of the RX.

—————

The collective pitch version is coming on fast, the code is nearly complete, and the helicopter is in transit to me. I will soon have all the equipment needed to flight test both the collective pitch and the Piccolo style helicopters.

Alongside the new PCB for the Arduino Duemillanove to control a CP heli, I will be releasing a system entirely on one PCB for weight and space saving reasons, and also because I’d like to keep the helicopter built up permanently.

There are currently 5 PCBs available for £10 each.

All the testing code will be available soon, as will the Helishieldv1.5, in both kit form, and pre built (with or without an Arduino - TBA).

See the artificial horizon page for more info.

To view or download the code please click here.

Please click here to ask a question, send your praises/insults to me!

Associated Photos:

The newest version of the Artificial horizon without video running A recent version of artificial horizon with video Special Kalman Magic The CCPM Helicopter The tail assembly on the CCPM heli The readout displayed by the Processing sketch A complete(ish) looking HeliShieldSix completed prototype boards Six completed prototype boards The early stages of drilling Four prototype boards nearly etched The first drilled test PCB with the Accel and Gyro plugged into the PCB Here is the testing helicopter, sitting on breadboard where the accelerometer and gyro are wired to the arduino Testing the alignment of the sensor headers - this one fits!The prototype motor controller v2 The complete system minus speed controller (and helicopter!) Accelerometer - 3 axis, 2g+-, SPI communication Gyro - 150 degrees/sec, analog and SPI communication (Currently only making use of the analog output) An arduino!

GPS Shield

November 20th, 2008
DIY location & data-logging

Would you like to use your Arduino to create geo-locative art? Or make a custom GPS device that can log sensor data along with the precise time and location? Perhaps you’re looking to make a tracker, or want to make your own geocaching hardware. You are in luck! Here is my design for a Arduino shield that is perfect for any sort of project or artpiece that requires GPS precision time or location data.

This shield supports any of four popular GPS modules and stores data on a standard DOS-formatted SD flash memory card. Simply plug it into your computer when you’ve finished your data capture and the plain text files are ready for importing into Google Earth, GPSvisualizer, or a spreadsheet.

More ideas…

You can build a waterproof GPS logger by putting the shield, Arduino and small power supply in an Otter Box!

Archive for the ‘Hardware’ Category

November 20th, 2008

The Internet of Arduino

Thursday, November 6th, 2008

After a couple of years of prototypes, tests and announcements, finally we have produced an ethernet shield for Arduino. This module gives Arduino the ability to open connections to other Internet hosts or behave like a server, for example a simple web server.

Arduino shield

We like this design because it uses the w5100 chip from WizNet that implements the whole IP stack in itself providing up to 4 sockets simultaneously.

I believe this will provide Arduino enthusiasts around the world with a platfrom that is initially simple to use but with room for growth as the knowledge of the user increases.

From the Internet of Things to the Internet of Arduinos, happy tinkering.

Documentation http://arduino.cc/en/Main/ArduinoEthernetShield
Guide http://arduino.cc/en/Guide/ArduinoEthernetShield

Arduino Duemilanove

Sunday, October 19th, 2008

Continuing our tradition of difficult to pronounce Italian name, we’re happy to announce the Arduino Duemilanove (”2009″). This is the latest revision of the basic Arduino USB board, replacing the Diecimila. The Duemilanove automatically selects the appropriate power source (USB or external adaptor), eliminating the need for a power selection jumper. It also includes an easy to cut trace for disabling the board’s auto-reset (and a solder jumper for re-enabling it). It’s the easiest-to-use Arduino yet, even if the name is a mouthful (non-Italians should feel free to call it “2009″).

The release of the Arduino Duemilanove coincides with the launch of Massimo Banzi’s book, Getting Started with Arduino, from O’Reilly. We’re very happy that there’s now a printed introduction for people who are just starting out with Arduino. It’s a great complement to the more advanced Making Things Talk, by Tom Igoe (also from O’Reilly).

The Duemilanove will be replacing the Diecimila at our distributors over the coming weeks.

Geta - the Japanese wooden Sandal

Thursday, October 16th, 2008

The other day we got this article recommended in the developers email list, it is about a way of making a minimal Arduino-based board using an oscillator in the shape of a traditional Japanese Sandal. I may be making up the story, but the google translation of the article is not making things better.

picture (c) 2008 by the author

Arduino Pro and Pro Mini

Saturday, August 23rd, 2008

Arduino Pro and Arduino Pro Mini

We’re very pleased to announce the launch of the Arduino Pro and Arduino Pro Mini, designed and manufactured by SparkFun Electronics (see their announcement). They are low-cost, low-profile boards intended for advanced users and for convenient embedding in long-term projects. Both work with an off-board USB convertor (either the FTDI TTL-232R-3V3 USB or the SparkFun FTDI Basic Breakout. The boards come without headers, allowing users to select and attach the ones appropriate for their use. If you solder on female headers, you can use standard shields with the Pro. Unlike other Arduino boards, these work at 3.3V, so be careful when attaching external components.

Both boards are available for purchase from SparkFun, the Pro for $20 and the Pro Mini for $19. It’s been great to continue working with SparkFun, who also design and produce the LilyPad Arduino with Leah Buechley. The LilyPad has been a great success, and we hope the Pro and Pro Mini will be too.

BTW, if you’ve got an idea for a new Arduino product, please see this document and email us at team@arduino.cc. We’re always looking for new collaborations.

Arduino Nano: all-in-one design for breadboard use

Thursday, May 15th, 2008

Arduino Nano on a breadboard.

The new Arduino Nano is the smallest and most versatile Arduino board yet. Designed and manufactured by US-based Gravitech, it has all the functionality of an Arduino Diecimila in a compact, breadboard-ready design. The Nano includes an ATmega168 microcontroller (w/ bootloader), integrated USB (FTDI chip) w/ Mini-B jack, a full complement of i/o pins (including two more analog inputs than the Diecimila), an ICSP programming header, and on-board regulator. Measuring 0.73″ x 1.70″, it’s smaller and cheaper than the combination of Arduino Mini and Mini-USB adapter, and you can get started without any wires. We’re excited to be offering this new, breadboard-ready form factor with the integrated convenience of the Arduino Diecimila.

The Arduino Nano is available for pre-order. Order now and get 10% off; boards will ship on the 16th of June.

BlinkM Smart LEDs and other cool new hardware.

Sunday, January 27th, 2008

BlinkM connected to an Arduino

BlinkM is a new smart LED from ubiquitous computing consultancy ThingM. It can smoothly fade to an RGB- or HSV-specified color, randomly fade between nearby colors (for mood lighting), or play back a number of canned, and a single saved, sequence. The compact package contains a bright RGB LED and an AVR microcontroller, and can be connected directly to an Arduino USB board with no additional components. BlinkM is controlled via I2C and up to 127 can be connected to a single Arduino board (or other microcontroller). See the datasheet for details. There’s also sample Arduino code available for talking to them using the Wire library, and a cross-platform application for graphically creating a color sequence. This is a great way to easily and quickly create cool lighting with an Arduino, and without the use of many pins or much code. You can get a BlinKM for $12.95 from Sparkfun.

I’m guessing that this is only one of many cool products we’ll be seeing from ThingM - these guys have quite a record. In particular, Arduino users may have seen the notes from Tod’s Arduino classes (Spooky Arduino, and Bionic Arduino) and might have heard of Sketching in Hardware, a conference Mike started to bring together creators and users of physical computing platforms and related tools. I’m looking forward to seeing what they come up with next.

ThingM’s not the only company that’s been creating cool new stuff to use with Arduino boards. Libelium, the designers of the Arduino XBee Shield, have recently launched two new products. The GPS module slips onto the pins unused by the XBee shield - great for determining your location and wirelessly transmitting back to a computer (and many other things). The GPRS/GPS shield additionally puts your Arduino on the cellular network, letting you send and receive data wherever you are. The RepRap project (to create a self-replicating fabrication machine) has been working on porting their electronics to Arduino and creating some nice products in the process. Check out their kit which has all the PCBs you need for an Arduino-based RepRap machine. Or if you’re just looking to control some motors, check out the stepper motor driver PCB or the PWM driver PCB.

Those of you looking for something with (significantly) more processing power than an Arduino should check out Bug Labs, which just launched their online store. They’re going to be shipping their BUGbase handheld Linux computer and accompanying modules in March.

If you prefer the smellier side of physical computing (e.g. chemicals and solder), check out these new single-sided serial boards: one from Adilson Akashi and the other from WestFW. Both can be etched and assembled by hand, then bootladed and programmed with the Arduino software. For the absolute lowest-cost, minimum component Arduino-compatible, check out the uDuino instructions. Bitty’s been working on a ZIFduino with a zero-insertion force socket for easy ATmega programming. Limor Fried (a.k.a. ladyada) has some tantalizing new designs posted on Flickr. We’ve haven’t been slacking off either, and hope to have some more to share with you soon. In the meantime, say hello to the newest member of the Arduino team.

BlinkM photo by Tod Kurt

Arduino Diecimila and BT reference designs now available.

Monday, October 22nd, 2007

The reference designs (Eagle files) for the Arduino Diecimila and Arduino BT are now available under a Creative Commons Attribution Share-Alike license. This is effectively the “source-code” for the boards: both the schematics and PCB layouts in fully editable format. Together with the Eagle Layout Editor (available in a freeware version), it’s all you need to get started making your own custom Arduino hardware.

Download: arduino-diecimila-reference-design.zip, arduino-bt-reference-design.zip

We’ve also posted a document called So you want to make an Arduino? – a guide / policy for making your own hardware. While we hope to see many people creating their own versions of Arduino (and many already are), we’ve tried to set down a few guidelines to help ensure the success of these efforts and the continued growth of the project as whole. Please take a look. We don’t claim, however, to have figured this all out, so consider this policy as a first draft, and post your suggestions and criticisms in the comments.

We hope you have fun with the reference design and we’re looking forward seeing what you all come up with!

LilyPad Arduino and Arduino 0010

Wednesday, October 17th, 2007

LilyPad Arduino

We’re very happy to welcome the newest member of the Arduino platform: the LilyPad Arduino. The board was lovingly crafted by Leah Buechley and SparkFun electronics for use in wearable / e-textile projects. There’s also a whole range of accessories: power supply, sensors, LED and sound output, etc. It’s all available from the LilyPad section of SparkFun.

The boards can be sewn together with conductive thread or attached to conductive fabrics to create light-weight and flexible electronics clothing or other textiles – and all in a beautiful purple. The guide to the LilyPad has instructions for getting started with the board and Leah has some directions for using it in a project.

The LilyPad has actually been out for a couple of weeks, but today we released version 0010 of the Arduino software, which properly supports the board.

Downloads.
Windows: arduino-0010-win.zip
Mac OS X: arduino-0010-mac.zip
Linux version coming soon.

The most significant improvements (besides LilyPad support) are the stability and clean-up changes:

  • Universal distribution for Mac OS X
  • Support for Windows Vista
  • Improved error messages
  • Better auto-format
  • Support for ports COM10 and higher on Windows
  • Fixed automatic refresh of the Serial Port menu under Windows
  • New and improved keyboard shortcuts

Other new features include:

  • Printing
  • Support for more programmers (USBtinyISP, AVR ISP, AVRISP mkII, parallel programmers) for use in bootloader burning.
  • “Copy for Discourse” menu item that copies a sketch formatted for posting on the Arduino forums

As with the Arduino XBee Shield, we’re very pleased to be working with others to expand the available range of Arduino hardware. We’re thrilled at the results so far, and hope to continue these collaborations in the future. If you have any ideas, please email us – we’d love to work with you.

So be sure to check out the LilyPad and Arduino 0010 and congratulations to Leah and SparkFun for their wonderful work.

Update: Arduino 0010 for Linux is now available: arduino-0010-linux.tgz

Enabling auto-reset on the Arduino NG and serial boards.

Friday, September 7th, 2007

Arduino NG Auto-Reset Modification

One of the new features we added in the Arduino Diecimila is the ability to upload sketches to your board without having to physically press the reset button. The Arduino software automatically resets the board before starting the upload. If you’ve got an Arduino NG or serial board, you can give it this same ability with a little bit of soldering. Tom’s written up the instructions for the NG, and nkcelectronics posted instructions for serial boards.

One cautionary note: because the automatic reset works by using the serial DTR hardware control line, boards will auto-reset whenever you open a serial connection (i.e. via the USB cable) to them. This should be fine in most cases, but you might want a second or two delay before sending data to the board.

Arduino Diecimila: new improvements to commemorate 10,000 boards.

Saturday, August 11th, 2007

Arduino Diecimila

We’ve just released a new revision of the Arduino USB board - named “Diecimila” to celebrate the fact that there are now over 10,000 Arduino board in existence. The Arduino Diecimila includes a number of improvements over the previous revision of the USB board, the NG, including:

  • the Diecimila can be automatically reset from software, meaning that you no longer need to physically press the reset button on the board before you upload a sketch,
  • there’s a new low-dropout power regulator, so the board can run with a minimum input voltage of 6V instead of 7V, meaning that you can power it with 4 AA’s (don’t give it more than 12V, though, unless, as Gianluca says, you want to cook eggs on it),
  • we’ve added a couple of pin headers: one providing a regulated 3.3 volts, and the other making the boards reset line available (e.g. to make it easier to add a reset button to a shield),
  • a fuse provides overcurrent protection for your computer’s USB ports (while most computers have built-in protection, this provides an extra layer of safety),
  • the board should start up without problems when powered from an external power supply (the NG required a bit of fiddling to get this working)

To get the automatic reset working, we needed to make a bunch of modifications to the Arduino software. You’ll want to grab Arduino 0009 from the download page. To get started with the Diecimila, see the instructions for your operating system: Windows, Mac OS X, Linux.

The Diecimila should be available from most Arduino distributors; see the buy page to find the one closest to you.

Update: corrected description of the low-dropout regulator (thanks Limor!).

Alla scoperta di ARDUINO-10000

November 20th, 2008

Ciao a tutti,

Vorrei Pubblicare questo articolo per dare una breve introduzione sulla scheda a microcontrollore “Arduino-10000

Arduino Diecimila

Overview

The Arduino Diecimila is a microcontroller board based on the ATmega168 (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.

“Diecimila” means 10,000 in Italian and was named thusly to mark the fact that over 10,000 Arduino boards have been made. The Diecimila is the latest in a series of USB Arduino boards; for a comparison with previous versions, see the index of Arduino boards.

Schematic & Reference Design

EAGLE files: arduino-diecimila-reference-design.zip

Schematic: Arduino-Diecimila-schematic.pdf

Note that R2 is not mounted and that R3 has been replaced by a 100 nano-farad capacitor.

Summary

Microcontroller ATmega168
Operating Voltage 5V
Input Voltage (recommended) 7-12 V
Input Voltage (limits) 6-20 V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 16 KB (of which 2 KB used by bootloader)
SRAM 1 KB
EEPROM 512 bytes
Clock Speed 16 MHz

Power

The Arduino Diecimila can be powered via the USB connection or with an external power supply. The power source is selected by the PWR_SEL jumper: to power the board from the USB connection, place it on the two pins closest to the USB connector, for an external power supply, the two pins closest to the external power jack.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board’s power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector. A low dropout regulator provides improved energy efficiency.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

The power pins are as follows:

  • VIN. The input voltage to the Arduino board when it’s using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
  • 5V. The regulated power supply used to power the microcontroller and other components on the board. This can come either from VIN via an on-board regulator, or be supplied by USB or another regulated 5V supply.
  • 3V3. A 3.3 volt supply generated by the on-board FTDI chip. Maximum current draw is 50 mA.
  • GND. Ground pins.

Memory

The ATmega168 has 16 KB of flash memory for storing code (of which 2 KB is used for the bootloader). It has 1 KB of SRAM and 512 bytes of EEPROM (which can be read and written with the EEPROM library).

Input and Output

Each of the 14 digital pins on the Diecimila can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:

  • Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the FTDI USB-to-TTL Serial chip.
  • External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details.
  • PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
  • SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication, which, although provided by the underlying hardware, is not currently included in the Arduino language.
  • LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it’s off.

The Diecimila has 6 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and some low-level code. Additionally, some pins have specialized functionality:

  • I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library (documentation on the Wiring website).

There are a couple of other pins on the board:

  • AREF. Reference voltage for the analog inputs. Used with analogReference().
  • Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.

See also the mapping between Arduino pins and ATmega168 ports.

Communication

The Arduino Diecimila has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega168 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An FTDI FT232RL on the board channels this serial communication over USB and the FTDI drivers (included with the Arduino software) provide a virtual com port to software on the computer. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the FTDI chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

A SoftwareSerial library allows for serial communication on any of the Diecimila’s digital pins.

The ATmega168 also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus; see the documentation on the Wiring website for details. To use the SPI communication, please see the ATmega168 datasheet.

Programming

The Arduino Diecimila can be programmed with the Arduino software (download). For details, see the reference and tutorials.

The ATmega168 on the Arduino Diecimila comes preburned with a bootloader that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol (reference, C header files).

You can also bypass the bootloader and program the ATmega168 through the ICSP (In-Circuit Serial Programming) header; see these instructions for details.

Automatic (Software) Reset

Rather then requiring a physical press of the reset button before an upload, the Arduino Diecimila is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the FT232RL is connected to the reset line of the ATmega168 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. Version 0009 of the Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment. This means that the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload.

This setup has other implications. When the Diecimila is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the Diecimila. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data.

USB Overcurrent Protection

The Arduino Diecimila has a resettable polyfuse that protects your computer’s USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed.

Physical Characteristics

The maximum length and width of the Diecimila PCB are 2.7 and 2.1 inches respectively, with the USB connector and power jack extending beyond the former dimension. Three screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16″), not an even multiple of the 100 mil spacing of the other pins.