Posts with «sparkfun» label

Visualized: Arduino Uno shows up in NASA's Swamp Works facility

There are certain things you'd expect to encounter on a visit to NASA's Swamp Works research facility. Walking into the former Apollo testing facility, you'll almost certainly catch glimpses of martian rovers, soil samples and an assortment of scientific testing devices. But in spite of Arduino's near ubiquity these days, we'll admit that we were a bit taken aback when the familiar blue microcontroller made an appearance on a lab desk during our conversation with NASA "lighting guy," Dr. Eirik Holbert. It seems that NASA, like pretty much everyone else, is experimenting with the hacker-friendly component.

The board was hooked up to a lighting fixture Holbert is working on as part of NASA's upcoming deep space habitat concept generator. It's an attempt to bring some sunlit consistency to space exploration, simulating Earth-like lighting patterns to help keep the crew alert and get them ready for sleep in the evenings. So, where does NASA turn when it's looking to conserve weight and save some taxpayer money in the process? Toward the Arduino Uno, naturally. Holbert assembled a number of off-the-shelf products, including the aforementioned microcontroller and shields from Sparkfun to make a fixture for under $500.

Asked whether we might be seeing an Arduino setup like this on an upcoming mission, Dr. Holbert told us, "I'm all about interchangeability. If they can make something space compatible, I'd be all for it."

Filed under: Science

Comments

Engadget 21 Feb 07:33

BeetBox drops a beat with a side of Raspberry Pi, and other plant puns (video)

Sometimes the plays on words are unavoidable -- in fact, they form the very heart of Scott Garner's recent musical creation. His BeetBox turns six of its namesake root vegetables into drum pads through SparkFun capacitive touch sensors, all of which are controlled by (what else?) a Raspberry Pi. Cleverness goes beyond the core technology and food jokes, as well. All of the circuitry and audio equipment is hidden within the wood box, making it look more like a horticultural project than machinery. We don't mind the lack of production plans when there's source code available; we're mostly curious as to what in our garden would make for a good rhythm section.

[Image credit: Scott Garner, Flickr]

Continue reading BeetBox drops a beat with a side of Raspberry Pi, and other plant puns (video)

Filed under: Misc, Alt

Comments

Via: Gizmag

Source: Scott Made This

Engadget 20 Dec 05:58

Self-balancing unicycle using Arduino and Sparkfun IMU

Here’s proof that you can build cool stuff with simple tools. This self-balancing unicycle uses an Arduino and a five degree of freedom IMU from Sparkfun to keep the rider upright. Well, it’ll keep you upright as long as you have good side-to-side balance. But that’s true of any unicycle, right?

The Raptor was built by [Nick Thatcker] who is no stranger to self-balancing transportation. A few years back he built a Segway clone and the same type of geared motor used in that project also went into this one. I connects to the wheel with a chain, allowing him to keep the motor hidden in the saddle. He gets between 90 and 120 minutes of used on one charge with a top speed of 10 MPH. The motor could move you along faster but he has limited this in firmware to ensure it has enough power to ‘catch up’ if you lean too far forward.

Don’t miss the demo after the break. If you like this unicycle there are several others worth looking at.


Filed under: transportation hacks

12 DOF hexapod kit now sold by SparkFun

The 12 DOF hexapod kit from DAGU is one of the simplest hexapod kits ever!

Quick and easy to assemble, the body only consist of 12 leg segments, 12 foam rubber feet, 12 servos and a base plate with a hole pattern that allows controllers and sensors to be easily mounted.

read more

Let's Make Robots 26 Oct 18:09
12  advertising  arduino  dagu  dof  fun  hexapod  servo  spark  sparkfun  

Spider controller now sold by SparkFun

The DAGU Red back Spider controller is an Arduino Mega (1280) compatible controller that is especially designed for driving a large number of servos. All 70 I/O pins are terminated in servo compatible 3pin male headers as well as the standard female header and the power supply is a switchmode power supply delivering 5V @ 3A from an input voltage of 7V - 32V.

read more

Let's Make Robots 26 Oct 17:41
1280  48  advertising  arduino  atmega  controller  dagu  fun  robot  servos  spark  sparkfun  spider  

SparkFun launches ProtoSnap MiniBot for the budding roboticist

SparkFun struck a chord with many when it released the ProtoSnap series last year. The perforated perfboard housed not only a tiny Arduino compatible chip, but a small host of sensors and components that made assembling simple projects a snap (pun not only intended, but relished). Tomorrow, the company will begin selling the next member of its ProtSnap family -- the MiniBot. Just like its predecessors, the ProtoSnap MiniBot is based around an Arduino compatible microcontroller (specifically ATmega328) and features a number of components that can easily be detached when you're ready to move from prototype to a more permanent arrangement. The onboard selection components is fairly limited. The base is a relatively bare perfboard with a 9v battery holder on one side and two wheels connected to a motor on the other. Up front is two IR sensors that can be used for basic controls.

Of course, it's simple enough to expand on the basic platform with any host of sensors and components, like servos or RF receivers. Ultimately it's up to your imagination and skill level, which is why SparkFun is primarily targeting the kits at the educational market. The company's new educational outreach program is making a big push to put the ProtoSnap MiniBot in classrooms across the country, starting with high schools and trade schools, as a bridge from more simplistic robotics kits to the more advanced projects tackled at the university level. The completely open source robotics platform will be available tomorrow for $74.95. As soon as we can get our mitts on one our own we'll return with a thorough hands on... one that reveals just how much smarter the average high school kid is than us.

SparkFun launches ProtoSnap MiniBot for the budding roboticist originally appeared on Engadget on Thu, 31 May 2012 16:46:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Sphero goes modular, spins out for a drive (video)


Sphero's hooked up with a new whip, albeit a retro-fitted one. Skylar, a Junior Developer at Orbotix, modded an old RC car with an Arduino board, H-bridge and a few trackball parts, enabling the remote control ball to serve as its brain. Just in time too -- there's only so much fun you can have getting the little orb stuck behind the filing cabinets. Still, it's certainly a leap beyond purposing it to pull an iPhone-toting chariot.

Sean Buckley contributed to this post.

Sphero goes modular, spins out for a drive (video) originally appeared on Engadget on Mon, 19 Mar 2012 02:36:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Magnetometer and accelerometer read simultaneously

In Learning to Use I2C and Magnetometer not fried, I talked about interfacing the MAG3110 magnetometer and MQA8452Q accelerometer to an Arduino.  For both, I’m using breakout boards from Sparkfun Electronics.

I  checked today that there are no problems when I connect both devices to the same I2C bus.

The first test was very simple: I put both the breakout boards into a breadboard and wired them together, then tried running each of the programs I’d written for the chips separately. Result: no problems—worked first time.

I then tried merging the programs (cleaning up any naming conflicts) so that both could be run from the same code.  After a few typo fixes, this also worked fine

I think I’m now ready to hand over the software to the students to use for their robot.

I still need to put the i2c.h, i2c.cpp, and accel_magnet code in some public place for others to use (perhaps on github? maybe on my web pages at work?) [UPDATE 2012-jan-31: I have put the libraries and the sample code for the accelerometer and magnetometer at http://users.soe.ucsc.edu/~karplus/Arduino/]

One thing that is still missing is doing tilt correction for the compass heading.  Since the ROV is not expected to remain level (the accelerometer is intended to be used in a feedback loop to adjust the pitch, with anything from -90° to +90° being reasonable), getting a good compass heading requires rotating the magnetometer readings into the horizontal plane.  Only one of the students in the robotics club has had trigonometry or matrix math, so I’ll have to work with him to get him to figure out how to do the tilt correction. It may be simplest conceptually  to compute pitch and roll angles first, then rotate twice, rather than trying to do the whole tilt correction in one step (especially since the Arduino does not have matrix libraries).

Related articles

Tagged: accelerometer, Arduino, I²C, magnetometer, robotics, SparkFun, SparkFun Electronics

Magnetometer was not fried

MAG3110 breakout board by Sparkfun

In Learning to Use I2C, I talked about the difficulty I’d been having getting the MAG3110 breakout board from Sparkfun to work, and my fears that I had burned it out by running it overnight at 5v (instead of the rated 3v).  I suspected that my problem was really a software problem, but debugging the software when I was afraid that the hardware was fried seemed like an exercise in futility.

I bought another of the breakout boards from Sparkfun (they’re only $15), and soldered on a header yesterday.  The code failed in almost exactly the same way with the new (presumed good) part as with the old (presumed fried) part, so I was convinced that the problem was indeed in the software.

I spent half of yesterday and most of this morning carefully rewriting the library of I2C interface code.  I was starting with example code from Sparkfun for the MMA8452Q accelerometer, which I had generalized to handle other I2C devices.

The library worked fine with the accelerometer, so I thought it was ok, but it did not work with the magnetometer. I added a lot of error checking (making sure that the microprocessor was in the expected state after each I2C operation), and found that things were not working as expected. The extra error checking made it much easier to diagnose the problems. I had to re-read the I2C documentation in the ATMega328 datasheet several times, to make sure that I had all the details right (I didn’t, of course). The documentation in that data sheet is better than several of the tutorials I’ve seen on line, and is both thorough and comprehensible in describing the interface.

I did not implement all features of the I2C  interface—in fact, I have a rather minimal implementation that uses polling rather than interrupts and assumes that the Arduino will always be the bus master.  Those assumptions are fine for most Arduino projects, which just use the I2C bus for talking to a handful of peripherals, but sometime in the future I may need to make a more complete set of code that can handle multiple masters, the Arduino as a slave device, and interrupts rather than polling and waiting for operations to finish.

Because I was more interested in simplicity and robustness than speed, I rewrote the code so that transactions were finished (and appropriate status checked) before functions returned.  With these changes I found that the STOP condition was not happening, despite being requested.  All other operations on the bus are checked with the TWINT bit  of the TWCR register and the upper bits of the TWSR register, but determining that STOP has completed requires checking the TSWTO bit of the TWCR register. The code I had started from just checked the TWINT bit for the other operations, and had a fixed timeout that was too short—it did no checking at all on the STOP state, just adding a fixed delay.

Once I got the STOP timing cleaned up (and earlier, making sure to send NAK when reading the last byte), everything worked fine.  The accelerometer code  had probably worked ok because there were enough delays after stops that the stops completed, even though I had not checked to make sure.  With the fixed code, even the magnetometer that I thought I had fried seems to work ok.

The interface for the students in the Robotics Club is fairly simple (much simpler than the standard “Wire” library):

// Read one register
uint8_t i2cReadRegister(uint8_t i2c_7bit_address, uint8_t address);
// Read num_to_read registers starting at address
void i2cReadRegisters(uint8_t i2c_7bit_address, uint8_t address, uint8_t num_to_read, uint8_t * dest);

// Write one register
void i2cWriteRegister(uint8_t i2c_7bit_address, uint8_t address, uint8_t data);
// Write num_to_write registers, starting at address
void i2cWriteRegisters(uint8_t i2c_7bit_address, uint8_t address, uint8_t num_to_write, const uint8_t *data);

I suppose I should check that there are no problems when I connect both devices to the same I2C bus, before handing this over to the students to use for their robot.

I should also put the i2c.h and i2c.cpp in some public place for others to use (perhaps on github? maybe on my web pages at work?). It is really a shame that WordPress.com does not permit code-like files as pages.

Related articles

Tagged: accelerometer, Arduino, i2c, magnetometer, robotics, SparkFun, SparkFun Electronics

Learning to use I2C

For the Santa Cruz Robotics Club, I’ve bought three sensors for their underwater ROV: a magnetometer, an accelerometer, and a pressure sensor.

Originally, we were going to an ADXL335 accelerometer (with a breakout board by Adafruit Industries) and an MPXHZ6250A pressure sensor (no magnetometer), for which I designed a small PC board, but once the specs for this year’s mission came out, we saw that they wanted us to determine compass headings for a “sunken ship”, so it seemed a natural thing to add a magnetometer to the hardware.  After looking at what was available, I chose the MAG3110 breakout board from Sparkfun, because it provided a triple-axis magnetometer for only $15.

The MAG3110 is an I2C interface, which means we need only 2 wires to hook it up (and the wires can be shared with other I2C devices).  If we are going to all the trouble of figuring out an I2C interface, I figured we might as well use it for the accelerometer as well, so I got a MMA8452Q breakout board from Sparkfun also.

I decided to do a simple test program for the I2C parts before handing them over to the robotics club, so that they could be sure they had working parts.  It was a good thing I did, because I spent more than an entire day trying to get the parts to work.  I finally gave up on the “Wire” library from the Arduino website, and tried using the i2c.h file from Sparkfun (example code linked to from the accelerometer web page).  I got that working and rewrote the library as a proper .h and .cpp file, so that it could be installed as a normal Arduino library, adding some of the utility calls that had been buried in the MMA8452 demo code.

The MMA8452Q code was working fine, so I tried using the same i2c library for the MAG3110 magnetometer.

I had gotten MAG3110 working with the Wire library, but running at 5v (I’d not noticed that it was a 3.3v part—rather, I thought I’d checked that it was a 5v part, but I was wrong).  I’d left it powered at 5v all night, and I think I burned it out, as it was quite warm in the morning.  Today, I can read and write the registers of the MAG3110, but the xyz values are not coming out reasonable at all—I frequently get the same values (like 0xF9F9)and 0x1DF9), independent of the orientation. If I read all the registers, a lot of them come out as 0xF9 or 0x1D.  Even the WHO_AM_I register (which should be 0xC4) often comes out 0x1D.  I seem to get intermittent correct values for registers, but mostly bogus values.

I’ll feel stupid if I order another part and it turns out to be a software bug, but I’m pretty sure the chip is fried.  But I guess it is time to do another Sparkfun order. (I owe them some business, after calling them for the replacement photointerrupter.)

Incidentally, I tried finding a usable pressure sensor with an I2C interface, but it doesn’t look like anyone is making them except for barometric pressure ranges for dry gases.  I suppose Freescale will eventually come out with a full range of I2C pressure sensors, but my guess is that will be a long time coming, as the automotive and industrial applications have a pretty long product design cycle (unlike consumer electronics, which is driving the barometric pressure sensors).


Tagged: accelerometer, Adafruit Industries, Arduino, magnetometer, robotics, SparkFun, SparkFun Electronics