X:471 Y:486 Z:476
X:468 Y:478 Z:467
X:454 Y:460 Z:450
X:436 Y:435 Z:422
X:392 Y:379 Z:364
X:327 Y:305 Z:296
X:270 Y:248 Z:250
X:248 Y:236 Z:246
X:260 Y:258 Z:269
X:292 Y:297 Z:307
X:321 Y:331 Z:341
X:375 Y:398 Z:406
X:439 Y:465 Z:465
X:478 Y:502 Z:494
X:489 Y:503 Z:491
X:478 Y:487 Z:475
X:462 Y:465 Z:451
X:413 Y:401 Z:385
X:343 Y:321 Z:313
X:272 Y:247 Z:249
X:253 Y:239 Z:248
X:260 Y:256 Z:268
X:288 Y:293 Z:304
X:320 Y:330 Z:340
X:374 Y:394 Z:400
X:436 Y:464 Z:463
Here is my sample of data (Not moving at all) I don't know what can i do with all these data.
I wrote a blog post about this device on an Arduino that should answer your questions.
http://chrisheydrick.com/2015/02/05/adxl335-accelerometer-on-an-arduino/
In short, the values you're seeing depend on the power delivered to the ADXl335.
The sensitivity (mV/g) is stated to be ratiometric in the data sheet, and the example given is that when you deliver 3V to the power supply, the sensitivity is 300 mV/g. In a later section called “Use with operating voltages other than 3V” it gives the example of 360 mV/g with a 3.6V power supply, and 195 mV/g with a 2V power supply. You can pretty much gather that the sensitivity in mV/g is the power supply voltage divided by 10. More or less.
Another ratiometric value is the “0g bias”. The accelerometer chip can detect negative acceleration, but it doesn’t output a negative voltage signal. What you do is consider the middle point of the power supply voltage range the 0 point. My power supply voltage is 3.3V, so I have to treat 1.6V as the zero point. You’ll add have to subtract that zero point from any voltage reading to get the actual mV/g value.
Related
I would like to measure different outputs of two absolute pressure sensors, one differential pressure sensor and a massflow sensor using an Arduino Mega2560 REV3.
The massflow sensor output is from 1-5V. As the output of the absolute pressure sensors is a current, I can adjust the range using a resistor. But the differential pressure sensor's output is between 0mV and 35mV.
In order to have a precise measurement I would need a reference voltage of 1V for the differential pressure sensor but for the massflow sensor I would need a reference voltage of 5V.
I know that the reference voltage can be changed using analogReference() but is there a way of using two different reference voltages for two different analog inputs?
Thank you!
This might sound like a very silly question, so I apologize if this is something very simple but I just cannot get my head around it. I am trying to understand what the data provides in terms of real time information, for example, the MPU-6050:
Gyroscope - is a 16 bit data register with a range from (0 <-> 65535)
There is a selection of ranges (±250, ±500, ±1000, and ±2000°/sec)
If the range is set to ±250°/sec, is the reading 360/65535 = 0.0054 resolution?
What does °/sec mean, if the sensor does not move and reads zero and then turned quickly does it mean it will be reading the angle at the set range? For example, if the range was set to ±2000°/sec and it was moved 200° would the read move from 0 to (2/65535 *200) and keep sending this value once the sensor stopped moving?
Accelerometer - is a 16 bit data register with a range from (0 <-> 65535)
There is a selection of ranges (±2g, ±4g, ±8g and ±16g)
If the sensor is not moving, completely flat the reading will be 0?
If the sensor is shocked at 2g will the max reading be 65535 (if set of 2g, with a resolution of 2/65535)
If the sensor is shocked at 16g will the max reading be 65535 (if set of 16g, with a resolution of 16/65535))
There are two main documents regarding the MPU6050, and those are the datasheet and the register map.
The gyro measurements are stored in the GYRO_XOUT, GYRO_YOUT, GYRO_ZOUT parameters, as you can see in the register map document, page 31. Each parameter is stored as a 2-complement signed 16 bit value split into two 8-bit registers: the GYRO_xOUT_L and _H.
In the same page, you can see the sensitivity for each full-scale range. For example, if your FSR is +/- 250º/sec, and you want to measure 1º/sec, the GYRO_xOUT parameter should read 131 counts.
The accelerometer-related registers can be seen in the same document, page 29. The idea is the same, two 8-bit registers to form a 2-complement signed 16-bit value, and the sensitivity values for each FSR.
Regarding your question in comments, if you rotate the device 125º in a second, at constant rotation speed, you should read 16375 in the rotation registers during the movement. This value comes from 131 counts/(º/sec) * 125º/sec = 16375 counts.
I would like to generate a frequency with the resolution of 0.1Hz from the range of 0.0 up til 1000.0 Hz ( Example such as 23.1 Hz, 100.5 Hz and 999.7 Hz) I have found that using AD9833 we can generate the signal as what I was required, but the notes are a bit confusing to me.
The specification can be obtained HERE .
Need your kind assist to if we can make the Arduino code.. lets say, to generate a signal of 123.4 Hz via Serial monitor from Arduino and it displayed as it is in the oscilloscope?
Thank you.
Looking at the notes, it appears that programming this chip will be non-trivial. If you don't require frequencies all the way down to 0 Hz, this job can be done much more easily with a standard Windows sound card. (Sound cards are AC-coupled, so won't go below a few Hz.) For one example, my Daqarta software can generate frequencies (with any waveform you want) at a resolution better than 0.001 Hz. The maximum frequency will be a bit less than half the sound card's sample rate... typically 20 kHz at the default 48000 Hz sample rate.
You don't have to buy Daqarta to get this capability; the Generator function will continue to work after the trial period... free, forever.
UPDATE: You don't mention what sort of waveforms you need, but note that if you can use square waves you may be able to do the whole job with the Arduino alone. The idea is to set up a timer to produce interrupts at some desired sample rate. On each interrupt you add a step value to an accumulator, and send the MSB of the accumulator to an output pin. You control the output frequency by changing the step value. This is essentially a 1-bit version of the phase accumulator approach used by the AD9833 (and by the Daqarta Generator). The frequency resolution is controlled by the sample rate and the size of the accumulator. You can easily get much better than 0.1 Hz resolution.
Best regards,
I'm controlling a motor bridge via a serial port by using the voltage from the pins on the serial plug directly.
This would normally only give me the RTS and DTR pins to use (controllable through PySerial) as motor controls; however, if I send a string through the data out pin, I can generate enough voltage to control the motor bridge.
My question is--
Why do I get a higher voltage for characters with more binary zeroes in them?
A string of "~" (01111110)gets me only 1.3 volts, 'Z' (01011010) gets about 2 volts, and "#" (01000000)clears the 3 volt threshold I need operate the motor bridge.
It's not really a problem, but I feel I'm missing something conceptually important here as I assumed it would be the opposite (more binary ones = higher voltage).
Thanks in advance.
Hans Passant had the right answer: inverted outputs on RS-232. I'm just putting it so this questions doesn't stay open.
I am making a robot that moves in a circle with two wheels, each wheel move using a DC motor with 12 volts. I want a relation between the circle and the voltage that is produced by Pulse Width Modulation.
Basically there's no generic formula for relating PWM to wheel movement. There are too many variations taking place depending on which motors you choose, which wheels, what gear ratio, the voltage of the battery and how many amps the batteries can supply, etc.
Instead, you can make an estimate by measuring the performance of your specific chassis (e.g. combination of all of the above) and either using a single constant (e.g. PWM Power * 0.432 == Wheel movement in linear cm at full charge) or better yet using a series of constants that estimate based on PWM power (e.g. 0.123 # 50/255 PWM duty cycle, 0.389 # 200/255 PWM duty cycle) and also vary based on current battery charge levels (e.g. 0.123 # 50 PWM # 12.1v charge, 0.089 # 50 PWM # 10.7v charge). As you can see, even 'simple' estimation gets complex quickly.
This is why you see people use encoders -- encoders basically measure 'real world' wheel movement irregardless of all the variables. You can use your encoders to measure how fast your wheels are turning based on the current PWM duty cycle and then just vary up or down the PWM output based on the speed/distance you want.