- ATMEGA 16 microcontroller
- ST LIS3L02 3-axis accelerometer
- CYWM 6935 Wireless module
- MAX 233 for serial communication
- TC 1262 3.3 volt regulator
We are really thankful to ST,Microchip,& Cypress for their free sample programs initiatives & help ...
This blog describes our work towards human machine interface device as a result of engineering project. Authors: 1.Mahavir Jain 2.Hrishikesh Sabale 3.Mayur Karandikar
Nintendo Wii Remote uses simple 3-D mouse principle. A main feature of the Wii Remote is its motion sensing capability, which allows the user to interact with and manipulate items on screen via movement and pointing through the use of accelerometer and optical sensor technology. Apple I-PHONE gained lot of attention with its interactive keyless accelerometer based navigation.
Market has lot of play station remotes including inertial sensors for playing 3-D games. Gyration has just released their Gyromouse with simple 3-axis gyroscope as inertial sensor based on magnetic properties to sense amount of degree of rotation along any of 3-axes.Simple orientation application also gives help in GPS based navigation system.
Our idea came out there to find an alternative to mouse pad & clumsy movement based optical mouse. Accelerometer based mouse would help in many ways for screen navigation, tilt based games etc. With its small size QFN package it can even be easily inserted in mobile to interface with Bluetooth or can occupy user’s fingertip to navigate.
Human Interfacing Device is key area in modern electronics era. Gesture recognition can be well introduced in modern day computers to play 3-D games. Virtual Reality is not far away from our doorsteps. Simple inertial navigation sensor like accelerometer can be utilized in getting Dynamic or Static acceleration profile of movement to move cursor of mouse or Gyroscope to even rotate 3-D object.
We propose a technique on same principle to convert acceleration profile of accelerometer into distance with double integration. Accuracy might be issue as errors keeps on adding in double integration but with robust signal processing it would not create problems. Only limitation will be in movements that cause little acceleration which puts upper limit on sensitivity of sensor. (In mill volts per g, g= 9.8m/s2)
Measure challenge in this technique is to somehow separate out Dynamic & Static response of accelerometer to differentiate between Rotational & Static movements.
On similar basis tilt based movement can be mapped onto cursor movement of mouse. This introduces entirely different technology in navigation compared to earlier Ball mouse with optocoupler or latest optical image processing based mouse. For smooth navigation we added CYWM 6935 wireless module with 50m range.
Simple low cost, low power inertial sensor based mouse with wireless capability will provide ease of use. It can also be converted to be useful in 3-D gaming application. It can be well used in Gesture Recognition with additional gyroscope with complete 6–Degrees of freedom.
So, next time onwards while explaining PPT on projector our professors will just rotate their wrists far away from computers….?
Real time data from accelerometer consists of some stationary noise it needs to be filtered out using second order Butterworth filter. But instead we applied simple RC-filter in hardware & taken moving average of past 16 samples in Matlab. Accuracy depends on initial calibration value which sensor gives at 0G (Generally for 10 bit ADC it is 512 i.e.Vcc/2). We implemented Discrimination window of +/- 5 relative acceleration values to minimise drift errors.
3-D Mouse:
We started with aim to determine 3-dimesional orientation of sensor in free space. We worked on signal processing in MATLAB to make real time data noise free by low pass filtering on windowed signal. We got good results (as shown in Fig. ) but only for slow movements. With fast movements the averaging of data was affecting magnitude of acceleration so no real movements were observed. We tried different integrations to minimise cumulative errors. This was our first attempt towards possibility of inertial sensor towards gesture recognition which got fair enough results. We tested sensor for its accuracy under different condition & found that it is more accurate for rotational motion than static as its principle of operation much favours earlier thing. That’s why it is well used in tilt based keyless PDA (Personal Digital Assistant).
Position Based Mouse:
After signal processing for noise removal, we started giving some specific motion to observe instantaneous changes in input data along x-y plane. We found that static jerky movements are less than 300ms period. Figure shows results for square movement with clearly indicating direction & magnitude of movement (around peak value =50). This was primary focus as double integration would give absolute values as signal is well within error limits.
It was clear that we can differentiate between tilt & motion based acceleration. Tilt can be assumed to be either only slowly varying or if changing more quickly to change steadily to a new value without oscillation. Thus all oscillations occurring on short timescales (less than about 300ms) can be assumed to be caused by movements, i.e., accelerations followed by retardations. This separation is achieved by a least-square fit procedure with a window of 64 sample points. It is worth noting change in X- axis value when Y-axis is direction of motion.
Algorithm shows calculation of distance from acceleration profile. Calibration routine is essential as dynamic properties of sensor are not steady & keeps on changing which introduces drift errors in calculation. We calculated distance without any floating point calculation only with shift operations. Sampling time was considered to be constant say 10 ms with 100 samples per second.
Figure shows results of simple Go & Comeback to Original Position movement with velocity & distance results (Axis values are scaled) along x-y plane. The expected results & observed differs because of initial calibration value which is subtracted from 10 bit result of ADC to get relative magnitude of acceleration. This error keeps on increasing if accelerometer is not kept steady to settle down for some period after movement. Thus accuracy was main constraint in actual position based mouse with integration.
Parameters:
For more accuracy we finally decided to implement VB based tilt mouse. Tilt based properties of accelerometer are really accurate, slow varying & proportional to static, large in magnitudes.
Figure shows variation in data in 1-complete rotation along x-y plane. Relative peak magnitude is +/- 200 counts. Mapping this data onto computer screen for movement of cursor was quite simple in VB. It gave enough accuracy. Different gesture recognitions were also possible with template matching. But we restricted ourselves to make it wireless on CYWM 6935(2.4 GHz- 2.4803 GHz) USB Module with range of 50 meters using Direct Sequence Spread Spectrum technique.
This tilt information was then mapped on to computer screen in Visual Basic to move cursor in X or Y direction. Averaging 4 samples in microcontroller gives stable results with around 100 samples per second scanning rate.