Project Help

So for my Arduino Project i have decided to add a Force sensor a PIR sensor, a adxl335 Accelerometer, that will measure my 9v DC motor also connected to my Arduino.

My Question is, the ADXL335 should be ran on 3.3V, and stated above my DC motor must be ran on a external 9V source, while the PIR & Force Sensor remain at the regular 5V. Is their a way to wire it to make sure that the 9v external source will not hurt my Arduino and for the 3.3V ADXL335 do i connect the ground to the same rail as the 5V's (on the same Ground as the PIR/Force Sensors)

This is my first real Ardruino Project so all help is welcome:)

You can power the Arduino from 9v into either the Vin pin or (preferably) the barrel jack. You can use the Arduino 3.3v output to power the accelerometer. The accelerometer outputs can be connected directly to three Arduino analog input pins. Use a transistor or mosfet to switch the 9v motor from the Arduino.

When you've got it working, you will get better resolution and less drift if you also use the 3.3v output as the analog reference, by connecting the Aref pin to it - but then you must be sure to call analogReference before your first call to analogRead.

Ok, Thank you i'm going to set it up and write up a schematic for you to look at if that's alright to make sure nothing goes wrong.