Page 1 of 2
OTG Mouse for stable flight. [ now SPI not OTG ]
Posted: Wed Jul 17, 2013 4:27 pm
by BillyBag2
I was considering using the innards of a USB mouse and a web camera lens to create a system to prevent drift. Any ideas and thoughts would be useful. I'm not 100% sure what usb data lines are used for at the moment but I see them on the schematic. Anyone tried using the CPU as a USB “host” or in a OTG mode? Is it even possible?
Re: OTG Mouse for stable flight.
Posted: Fri Jul 19, 2013 7:42 am
by marcus
Hi,
Unfortunately the MCU doesn't support USB HOST or OTG, it's only supports device. But even if it did the image grabbed from the webcam would probably be way to big to use for processing. I would recommend getting a simple camera with low resotution, maybe something like
this.
Re: OTG Mouse for stable flight.
Posted: Mon Jul 22, 2013 10:24 am
by fizzlor
hey,
i think the easiest way would be to get an optocal flow sensor and hook it up to the i2c port.
Check out this:
https://code.google.com/p/arducopter/wiki/AC2_OptFlow+
and this:
https://github.com/diydrones/ardupilot/ ... pticalFlow
you can get the sensor here:
http://store.jdrones.com/Optical_flowse ... opt01a.htm
have fun;)
Re: OTG Mouse for stable flight.
Posted: Tue Jul 30, 2013 7:36 pm
by BillyBag2
Could not resist and I have ordered one. If I get it going I will try and remember to post some info.
Re: OTG Mouse for stable flight. (Ok, maybe SPI)
Posted: Sat Aug 10, 2013 7:29 pm
by BillyBag2
BillyBag2 wrote:
Could not resist and I have ordered one. If I get it going I will try and remember to post some info.
OK? Its arrived. (Please do not laugh) "Its a bit bigger than it looked on ebay."
I do not have any good scales to wiegh it. I'm guessing from the kitchen scales it is between 8-15 gms. The lens is quite heivy and quite substantial.
I need to get some blue tack or something the same wieght and an see if it can be carried by the flie.
I will also need to add an under carage to protect the lense, without adding even more wieght. May be a top off a plastic bottle fitted like a sun hood on the lens will mean that the top hits the ground and the lens id saved. The flie may even stand up on the top for takeoff.
I think I will try and get it running using software on a raspberry pi first. There is a lot of example software about. I think I will try and get it running as a 30x30 camera to start. Just to covince myself it is running. There is a common alternative to the raspberry pi with an arduino and a com port to the host PC. I could posibly do this as a test using the flie and replacing the RS232 comms link with the radio. This may be harder and I'm not sure I need the camera feature on the flie, just of testing, focus experiments etc.
http://code.google.com/p/bt-optical-flow-sensor/
https://github.com/x75/adsn3080-emd
Re: Mouse for stable flight. (adns3080)
Posted: Sun Aug 11, 2013 12:59 pm
by BillyBag2
I connected the adns-3080 to the rapberry pi and used the test code
https://github.com/x75/adsn3080-emd , chopping out the bits that did not compile.
This code is very simple and does not do any setup. It appears to work fine. Did not try getting the image.
The code used the power on settings without any configuratio or srom update.
I will look into writing a driver for this for the flie.
Re: OTG Mouse for stable flight.
Posted: Sun Aug 11, 2013 2:18 pm
by SuperRoach
Re the camera Billybag2, It looks similar to the one I use:
http://forum.bitcraze.se/viewtopic.php?f=6&t=427
If so, the camera on that is listed as 1gram (excluding the cabling).
Re: OTG Mouse for stable flight.
Posted: Mon Aug 12, 2013 8:26 pm
by BillyBag2
Ok? Power? The flie has 2.8v when disconnected from power and the vcom (I assume the battery power) is available. The device is 3.1 to 3.6 typical and has a 3.7 absolute Max rating. There is a "5v" regulator on the module board for working with a 5v supply. But I do not know the spec. I am guessing the 3.8v from the battery is too close to the 3.3v output of the regulator. So I think I am a bit snookered. I think it will survive with 2.8v but I am not sure it will operate.
Re: OTG Mouse for stable flight.
Posted: Mon Aug 12, 2013 8:55 pm
by BillyBag2
BillyBag2 wrote:So I think I am a bit snookered.
It looks like the voltage reg on the module has a ultra low droput voltage of 120 -200 mv. So VCOM from the battery is probably enough to drive the regulator.

The ident is PHUI
Re: OTG Mouse for stable flight.
Posted: Tue Aug 13, 2013 9:55 am
by SuperRoach
120-200mv should be fine. We've had people use a 200mv tx+75mv camera alright. The battery did take a hit though.