Directional Compass

I want to make a device like this, but as small and cheap as is practically viable.

http://a.tgcdn.net/images/products/fron … t_anim.gif

http://www.thinkgeek.com/product/f358/

It’s a wearable directional compass that uses an array of 8 vibration motors to indicate magnetic north (only one motor will be buzzing at a time). I have a good knowledge of programming, but I’ve only done electronics a few times before so please could you help me with buying the right parts? I intend to glue these into a pack.

LSM303DLMTR Breakout Board x1 - Tilt Compensated Compass - $30

https://www.sparkfun.com/products/10888

Arduino Pro Mini 328 - 3.3V/8MHz x1 - $10

https://www.sparkfun.com/products/11114

FTDI Basic Breakout - 3.3V x1 - $15

https://www.sparkfun.com/products/9873

Vibration Motor x8 - 40$

https://www.sparkfun.com/products/8449

Hook-up Wire - Black x1 - $3

https://www.sparkfun.com/products/8022

Ideally I want a battery that’s rechargeable and will last as long as possible. If it’s suitable and last long enough, even rechargeable AA-batteries would be okay.

Thank you for your help!

Looks doable.

Start with learning how to code the Arduino and getting the pieces working from an AC-DC power supply.

In the mean time learn about batteries, changers etc. I recommend a single LiPo battery and a Buck-Boost DC-DC converter to 3.3V. Also recommend getting all the parts working from 3.3V instead of 5V.

I don’t know what I should be doing about the power supply for this 5v device

Which device? The FTDI?

If so then this should only be needed to load code into the Arduino and should not be part of the final project.

The compass breakout board requires 5v according to one of the comments on the product although the chip itself is 2.16v to 3.6v. I don’t have any experience directly dealing with chips, what would I need to make this work as 3.3v?

Would you kindly point to these battery products on the site? I’m not sure what I’m looking for. (I’m used to simple USB powered stuff)

Look at the schematic on the product page for the LSM303. The board contains a 3.3V and a 1.8V regulator. To power this board from 3.3V remove the 3.3V regulator and solder a jumper from in to out on the regulator’s pads.

Read the comments on the product page. It is mentioned there about by-passing the 3.3V regulator.

Batteries are a complex subject. I really do not think you are ready for the battery power part of this project.

First get the rest of the parts and code working from wall power/USB while you study what battery/charger/DC-DC regulator you need.

Wait a minute…

Directional Compass???

As opposed to a Non-Directional Compass???

Thank you! So…remove chip, join here:

http://i40.tinypic.com/357lra1.jpg

I’ve swapped the 5v arduino and FTDI for their 3.3v equivalents. I guess I’ll deal with batteries later like you suggested. One more thing before I buying though, need to get this motor circuit figured out. I modified the Lilypad Vibe schematic to include 8 motors. Only one motor should be running at any time. Still don’t know what to do about the voltage spike protection. Is it even needed? - it says the [arduino has regulated 3.3v - If it is needed, what specific diode and resistor should I buy from sparkfun? (I don’t know what I’m looking for)

[diagram updated in later post]](https://www.sparkfun.com/products/11114)

Look at how you’ve tied all the LP outputs together. How are you going to control only 1 motor on at a time ? You also need a diode for each motor, since they won’t be in parallel ? Lastly how did you arrive at 33 ohms for R1 ? Are you aware that the max current into/out-of a pin should be < 40 mA ?

Is this any better? Each motor gets a diode now.

I just assumed that “33” from the lilypad schematic meant 3.3v. Although I’ve read the electricity guides on sparkfun, obviously there’s a difference from concept to implementation (or I’m a bit stupid). Where do you get amp requirements like 40mA from? The only thing stated on the schematics are “Max 150mA output”.

http://i41.tinypic.com/2mzb0no.jpg

So the diodes are to stop the voltage spikes.

And the resistor is…actually, I think the resistor was only in the vibe schematic incase the builder wants to use it with a lilypad 5v setup. Can I safely get rid of the resistor from this circuit?

The diode is called an “Anti-Flyback Diode” (http://en.wikipedia.org/wiki/Flyback_diode), and is there to limit return current spikes when the motor is reduced (think of it, a motor turns into a generator when it free-wheels).

Also, you may want to check out this http://learningaboutelectronics.com/Art … ircuit.php link to see how to connect this to an Arduino, simply running this from the pin will burn out the pins, the motors have an 85mA spike and 75mA running current at 3.3V, which means that you are WAY over your 40mA budget per pin on the Arduino. The referenced circuit uses a transistor (a very common one) to act kind of like a digital switch to isolate the Arduino pins from the current of the motor.

The schematic at the link is almost correct for this case.

http://learningaboutelectronics.com/Art … ircuit.php

I would change 2 things.

  • eliminate the 33 ohm resistor.

  • tie each motor + lead directly to the battery voltage (~3.7v), not the Arduino 5v supply (which won’t exist in this usage).

Two other things to say …

If you’re going to use a single LiPo to power the stuff, you’ll want to replace that compass voltage regulator with a 1N4001 diode (not a short/jumper wire) so as to drop an additional 0.6v off the LiPo voltage, which can be as high as 4.2v when fully charged up.

The compass will take : Analog supply voltage: 2.16 V to 3.6 V (from the datasheet)

All those tiny motors have magnets which may affect the compass if they’re too close to each other. Doubly so when any motor runs. Plan on having some min separation when the motor is off and ignoring any compass reading when any motor is on.

I’ll see what I can do to prevent the motors from interfering, either distance them with wire or some kind of shielding perhaps.

Putting the transistor into the circuit and connecting directly to the battery, is this correct? (Quite complicated to draw so imagine they’re in series!)

Come to think of it, does it even need the diode anymore in that case?

[diagram updated further ahead]

That may not work since its a NPN on the ‘high side’ (+V).

Either use a PNP transistor on the +V side or connect to motor to V+ and the NPN between the motor and GND (-V_.

Also, you really need a series resistor between the output pin and the transistor base.

I see you did not follow the schematic in the link Mee_n_Mac posted. Go back to study that again.

Actually it was RB’s link, the schematic to be modified is;

http://learningaboutelectronics.com/ima … ematic.png

Yeah I read the schematic, didn’t know how to modify it to work with “directly to the battery voltage (~3.7v)” so I made a guess based on what it said about the buzzers connected directly to batteries. Changed the diagram to match the circuit; however am still stuck on the connecting a battery. I found some tutorial related to direct battery motors but it only worked for one motor so dunno.

http://i43.tinypic.com/2ch12s5.jpg

BTW It’s not my intention to turn this into a “design my project for me” thread, I should be able to get on by myself when these motor schematics are finally figured out. This thing reminds me a lot of programming, only if you forget system dependencies here, everything bursts into flames. :lol:

You are almost there…

http://i39.tinypic.com/scw68n.jpg

Right now you have both sides of the motor going to ground. You just have to move one side of the motor to the positive side of the power supply.

No flames above (OP’s revised schematic) but no power either. Try this.

@OP: And maybe read a bit of DC theory.

http://www.electronics-tutorials.ws/dcc … dcp_1.html

RonBeyer:
You are almost there…

http://i39.tinypic.com/scw68n.jpg

Right now you have both sides of the motor going to ground. You just have to move one side of the motor to the positive side of the power supply.

Watch that diode !

Good catch, diode is backwards!

And the diode D9 in backwards and will always conduct when the transistor is on causing the motor to not run.

Check your schematic against the other one posted.

Ah! How did I miss that? lol. Okay thank you everyone for your help, I’ll go about ordering stuff. Will update again when I’ve got something to show for this.