Page 2 of 2
Re: OTG Mouse for stable flight.
Posted: Thu Aug 15, 2013 5:24 pm
by BillyBag2
SuperRoach wrote:120-200mv should be fine. We've had people use a 200mv tx+75mv camera alright. The battery did take a hit though.
Um? I think you are talking mA. (milli amps) The issue I had was that the voltage supply of 2.8v was too low to drive the mouse chip. The battery can be up to something like 4.1v, which is too high for the mouse chip. However there is a 5v - 3.3v converter on the mouse module with a very low "dropout" voltage of 0.2v. So a battery voltage of 3.5v and above should be enough to drive the voltage regulator that will drive the mouse chip. (I had expected a typical dropout voltage of 1v or more.)
(Grr where is my spell checker?)
Re: SPI Mouse for stable flight.
Posted: Wed Sep 04, 2013 8:37 pm
by BillyBag2
OK, this project is still ticking over in the background. Been trying to find some good inflight parts for connecting to the extention port.
See:
http://forum.bitcraze.se/viewtopic.php?f=6&t=518
P1040666 by
billybag2, on Flickr
Re: SPI Mouse for stable flight.
Posted: Wed Sep 04, 2013 8:53 pm
by BillyBag2
So I am abit over budget with payload. The Module with the lens mount is 7.69gm the suplied lens is very good quality but is 5.29gm. So the total is 12.98gm.
However I got a usb webcam off wbay for a few quid and it has a real cheep plastic lens that is 1.51gm. Its probably a different focal length so I will have to experiment with it. Also the original lens is for IR, not sure if the new one is and how much difference this will make.
P1040667 by
billybag2, on Flickr
Re: OTG Mouse for stable flight. [ now SPI not OTG ]
Posted: Thu Sep 05, 2013 9:28 am
by BillyBag2
Another issue bubling in the background is running the SPI at 2MHZ or less. Not used the Micro controller before the flie project. I think I can work it out with the manual and the periph support lib suplied but if anyone knows how to do this off the top of their head this would help. I seam to remember seeing the clock divider in the docs but for some reason the periph support lib did not go as low as 2MHZ. As I said, I think I can work it outt, but if someone has used this chip before the insider knowlage would be very useful.
Re: OTG Mouse for stable flight. [ now SPI not OTG ]
Posted: Mon Sep 09, 2013 6:52 am
by tobias
When you initialize the SPI peripheral you can set a baudrate pre-scaler. See the
nrf24l01 driver for an example.
The pre-scaler is set by this row:
Code: Select all
SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_8;
You can set it to any of these values:
Code: Select all
#define SPI_BaudRatePrescaler_2 ((uint16_t)0x0000)
#define SPI_BaudRatePrescaler_4 ((uint16_t)0x0008)
#define SPI_BaudRatePrescaler_8 ((uint16_t)0x0010)
#define SPI_BaudRatePrescaler_16 ((uint16_t)0x0018)
#define SPI_BaudRatePrescaler_32 ((uint16_t)0x0020)
#define SPI_BaudRatePrescaler_64 ((uint16_t)0x0028)
#define SPI_BaudRatePrescaler_128 ((uint16_t)0x0030)
#define SPI_BaudRatePrescaler_256 ((uint16_t)0x0038)
The SPI clock will then be Fplck/spi-pre-scaler thus 72Mhz/spi-pre-scaler. The slowest possible clock is 72MHz/256 = 281250Hz
Re: OTG Mouse for stable flight. [ now SPI not OTG ]
Posted: Wed Sep 11, 2013 11:11 am
by BillyBag2
tobias wrote:
The SPI clock will then be Fplck/spi-pre-scaler thus 72Mhz/spi-pre-scaler. The slowest possible clock is 72MHz/256 = 281250Hz
Thanks for this. Saves me guessing if I have read the spec correct.
Re: OTG Mouse for stable flight. [ now SPI not OTG ]
Posted: Thu Sep 19, 2013 3:39 pm
by marco.tognon
Hey BillyBag2,
I'm just started to work with the crazy flie but i'm trying to make the flie completely automomus. For this porpos I was thinking your same solution: mous optical flow!
Altought i'm new about programming firmware and so on, actually I would learn from you and may be cooperate with you!
