Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: roboninja93 on November 24, 2012, 11:08:22 PM

Title: accelerometer controlled wireless bot
Post by: roboninja93 on November 24, 2012, 11:08:22 PM
I am building a wireless car which moves solely due to hand movements. i.e. when hand is bent downward car moves ahead when hand is bent upward car moves backwards etc.
An accelerometer is required for this purpose.
I have found some ways to accomplish this task

1.Use a accelerometer module with two microcontroller boards linked via rf module;
2.Using a mobiles accelerometer and linking it to the microcontroller board in the bot via a bluetooth module

But is it possible to use the accelerometer of the mobile and connect its output to one microcontroller which sends the data to the microcontroller in the bot?
I have smart phone which has a miro-usb port. So how do I link my phone to the microcontroller board which will then send data to the microcontroller in the bot?
I am using atmega32.
If there are other ways to achieve this task please do tell me.

Thanks
Title: Re: accelerometer controlled wireless bot
Post by: Soeren on November 25, 2012, 05:43:21 PM
If there are other ways to achieve this task please do tell me.
Wii controller.
Title: Re: accelerometer controlled wireless bot
Post by: roboninja93 on November 27, 2012, 10:41:59 PM
Is it possible to connect the mobile's accelerometer output to the transmitting microcontroller?
Title: Re: accelerometer controlled wireless bot
Post by: newInRobotics on November 28, 2012, 04:23:13 AM
Most likely it is possible, but You'll have to figure out how to do it Yourself as Google search did not come back with any useful results. In order to access any hardware on mobile phone (I assume that's what You mean by mobile) You have to have good understanding of OS managing that hardware, then You can tap into it. Most modern smartphones have good SDKs to enable relatively easy app development, all You have to do is learn how to use those SDKs. To point You to the right SDK You have to tell us what mobile phone You are talking about. Also, in my opinion, using accelerometer with microcontroller is much easier than developing app for smartphone and separate software for remote microcontroller.
Title: Re: accelerometer controlled wireless bot
Post by: roboninja93 on November 28, 2012, 10:57:18 AM
Also, in my opinion, using accelerometer with microcontroller is much easier than developing app for smartphone and separate software for remote microcontroller.
Yeah thats true. But i have to implement it using the mobile phone's accelerometer which has the android platform.
I have a fair idea about android programming so developing an app for it is not a major hurdle.
I am more concerned about interfacing the phone with the microcontroller via its micro USB port.
I havn't done usb interfacing earlier.
Thanks
Title: Re: accelerometer controlled wireless bot
Post by: Soeren on November 28, 2012, 07:11:50 PM
Hi,

[...] But i have to implement it using the mobile phone's accelerometer which has the android platform.
If you have to, you have to... But why do you have to?


I have a fair idea about android programming so developing an app for it is not a major hurdle.
Just reading the sensors and transmitting the results via Blue tooth should be easy then. If you're good at Android, you should do the filtering on the phone, rather than on the controller.


I am more concerned about interfacing the phone with the microcontroller via its micro USB port.
I havn't done usb interfacing earlier.
You want it to be wired??

A Blue Tooth unit (https://www.sparkfun.com/products/10269) on the 'controller isn't hard to talk to and I'm assuming that you want to "wave" your phone to control a 'bot - not very elegant with a USB cable attached :)
Title: Re: accelerometer controlled wireless bot
Post by: roboninja93 on November 28, 2012, 10:38:55 PM
Hi,

You want it to be wired??


Oh no. I meant that the accelerometer data from the phone is to be given to the microcontroller via the USB whcih will then transmit it to another microcontroller in the bot via rf.



Just reading the sensors and transmitting the results via Blue tooth should be easy then. If you're good at Android, you should do the filtering on the phone, rather than on the controller.


Yes that is an easy method using the bt module.

But I dont want to use a  bt module or an accelerometer module
The hardware to use is:
Two microcontrollers with rf transmitter-receiver(434 Mhz) and a android smart phone.