Pages: [1]   Go Down
Author Topic: Accelerometer  (Read 1073 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

first of all I want to say I'm totally new in Arduino.
I'm studying product design and I am desiging a product.
Now for my prototype, I bought a Arduino nano v3, a 4 directional tilt sensor (28036 - Parallax) and some LEDs
I searched on the internet for a while, but due to the fact I'am a beginner, it is hard to know if I need resistors, and if so, which ones.

The project:
_First I want the product to start up when they shake it (it is for children). I was thinking it would be possible with the tilt sensor by saying it, it has to turn on if it changes direction 4 times in less than 5 seconds.
_Each time you flip het product, an extra LED has to light up. So the product becomes brighter when you 'roll' (it's not sphere shaped) it. (1 LED to 6 LEDs)
_To turn the product off, you have to shake it again (see the first step)

Since I'm new to Arduino, and electronics in general, I am very curious if it is possible to make such thing, and if so, how i have to start programming and which resistors I need (or how to identify which ones).

Sorry for al my questions, but it is realy important for me it works. Too bad Arduino is not such a thing teached at University ;(

thanks in advance

links:
Tilt sensor: http://www.parallax.com/portals/0/downloads/docs/prod/sens/28036-4DirectionalTiltSensor-v1.0.pdf
« Last Edit: May 02, 2012, 04:59:29 am by Samory » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33296
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
To bad Arduino is not such a thing teached at University
If they did it would be taught.

Yes this sounds like a perfectly doable project.

You need resistors on your LEDs to limit the current, typically you should use 220R (220 ohms).
How is your sensor interfaced? Many are I2C, if so you need two resistors connected on the signal lines to +5. So that is a 4K7 from clock to +5 and the dame from data to +5.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't understand what the I2C is, and where to find? :/  http://img821.imageshack.us/img821/7520/uitleg.jpg
I placed 1 resistor, but I don't understand where to put the other one.

As I found some information over the web and the things you said, I've made a circuit as I think it should be, but it is partly made with some imagination (a)
I don't know if it is good, or bad. (The red square is the accelerometer)

The picture of the circuit is in the link:
http://img692.imageshack.us/img692/1576/schemas.jpg

Thanks for your quick feedback!

Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 287
Posts: 25681
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't understand what the I2C is, and where to find?
It is a very common interface standard, as a simple Google search will verify.

Where did you place the resistor?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't find if my sensor is I2C or not, even google can't help me! ;(

I placed a resister before every LED, and between the accelerometer and the 5V Pin on the arduino.
Grumpy_Mike talked about 2 resistors, but I don't understand where I have to put the other one.
I don't know if you can see the circuit I have drawn?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 287
Posts: 25681
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
a 4 directional tilt sensor (28036 - Parallax)
Quote
I can't find if my sensor is I2C or not, even google can't help me!

I googled "28036  Parallax tilt sensor" and found that not only is your device not I2C, it isn't even an accelerometer, except in the crudest sense.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not an accelerometer?
So this means this sensor is worthless for this project? Or is there still hope I can use it!
You're talking about 'not being I²C', so I guess I don't have to use the resistors Grumpy_Mike suggested.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 287
Posts: 25681
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Not an accelerometer?
No, as you said in your original post, it is a tilt sensor.
Now, an accelerometer can be used as a tilt sensor, but not necessarily vice versa.

Whether or not it is suitable for you application, only you can determine.

You need LED current-limiting resistors, but not I2C pullups.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oke, thanks!

Before I bought it, I read it was the same, so I bought that one! Too bad!
Imagine I have a qube with the 'tilt sensor' inside, is it possible to flip it on another side and make another, extra, LED light up? Or am I wrong and can it only be used for
the 'shake -aspect' of my product? To turn it 'on' and 'off'?

As you say I don't need I²C pullups, I only need the 220 Ohm resisters for every LED. As I found on http://ledcalc.com/ http://img831.imageshack.us/img831/6558/resistors.jpg

The Tilt sensor can be connected to the without resistor as I've drawn on: http://img849.imageshack.us/img849/4262/schema2.jpg?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33296
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The circuit looks OK, you should be OK with a tilt sensor for this project.
Logged

Pages: [1]   Go Up
Jump to: