New Hubsan Upgraded Version on the way

More
30 Dec 2013 22:17 #17524 by midelic
Replied by midelic on topic New Hubsan Upgraded Version on the way
should be read mode register to check for 1A

Please Log in or Create an account to join the conversation.

More
30 Dec 2013 22:19 #17525 by goebish
Replied by goebish on topic New Hubsan Upgraded Version on the way

PhracturedBlue wrote: The only thing I see is that you don't check for write completion before switcing to Rx mode. After 3msec that really shouldn't be an issue, but it would be safer to verify that transmission has completed before strobing the A7105.

I think I already tried that (check for 0x1a) without luck, well don't worry, I'll come back to you when I'm really desperate.

Please Log in or Create an account to join the conversation.

More
30 Dec 2013 22:20 - 30 Dec 2013 22:24 #17526 by midelic
Replied by midelic on topic New Hubsan Upgraded Version on the way
Never mind.
good luck!
Last edit: 30 Dec 2013 22:24 by midelic.

Please Log in or Create an account to join the conversation.

More
30 Dec 2013 22:39 - 30 Dec 2013 23:22 #17528 by goebish
Replied by goebish on topic New Hubsan Upgraded Version on the way

midelic wrote: Never mind.
good luck!

No problem Midelic, you're always having good advices.

PhracturedBlue wrote: my guess is that somehow you are going more/less than 10000us and are eventually getting out of sync.

Looks like the timing interval between 2 sent packets is not that important, I just tried with 13.5ms instead of 10 and there's no problem ! (at least with the H107L)

My problem lies elsewhere.
Last edit: 30 Dec 2013 23:22 by goebish.

Please Log in or Create an account to join the conversation.

More
30 Dec 2013 23:12 - 30 Dec 2013 23:13 #17529 by midelic
Replied by midelic on topic New Hubsan Upgraded Version on the way
goebish
on your for function I don't see any curly braces "{}" when start and end .. and cannot break of for,..... break of switch function.
Last edit: 30 Dec 2013 23:13 by midelic.

Please Log in or Create an account to join the conversation.

More
30 Dec 2013 23:14 - 31 Dec 2013 00:03 #17530 by goebish
Replied by goebish on topic New Hubsan Upgraded Version on the way
no need for {} here (only 1 instruction in the for loop: the if block), the break exits from the for loop, not from the switch block.
Last edit: 31 Dec 2013 00:03 by goebish.

Please Log in or Create an account to join the conversation.

More
30 Dec 2013 23:19 #17531 by midelic
Replied by midelic on topic New Hubsan Upgraded Version on the way
In that case it seems ok found nothing wrong.When I get home I'll test ...you made me curious.

Please Log in or Create an account to join the conversation.

More
30 Dec 2013 23:27 - 30 Dec 2013 23:39 #17532 by goebish
Replied by goebish on topic New Hubsan Upgraded Version on the way
... but I admit this is a bad coding practice to not use { } here, one could add an instruction after the if block thinking he's still in the for loop. But hey, it's just my crappy testing code, not meant to be committed like that :whistle:
Last edit: 30 Dec 2013 23:39 by goebish.

Please Log in or Create an account to join the conversation.

More
31 Dec 2013 01:12 - 31 Dec 2013 02:39 #17538 by goebish
Replied by goebish on topic New Hubsan Upgraded Version on the way

SeByDocKy wrote: For the 3 CS pins ... it's strange coz in fact, I can also select a channel with +5Mhz increment ....


Got it ! Those 3 CS pins can be used for simple 8 fixed frequencies selection, or as a spi bus:
www.flypix.co.uk/ftp/RTC6705-DST-001.pdf

Funny fact:

in the specs (5GHz Band Transmitter Specifications) it states absolute maximum rating 5725-5865 MHz, however in simple fixed frequency selection table it states it can go as low as 5645 MHz (CS: 011 Band E)

We proved 5645 MHz is working ;)

I guess this is a typo and it can do 5625-5865.
Last edit: 31 Dec 2013 02:39 by goebish.

Please Log in or Create an account to join the conversation.

More
31 Dec 2013 06:23 - 31 Dec 2013 07:43 #17553 by midelic
Replied by midelic on topic New Hubsan Upgraded Version on the way
How about those over 5900 Mhz values?
Last edit: 31 Dec 2013 07:43 by midelic.

Please Log in or Create an account to join the conversation.

More
31 Dec 2013 11:29 #17560 by goebish
Replied by goebish on topic New Hubsan Upgraded Version on the way
It was late... looks like there're 2 typos in the maximum rating specs, I guess it should state 5625 - 5965

Please Log in or Create an account to join the conversation.

More
31 Dec 2013 17:27 #17585 by proteus
Replied by proteus on topic New Hubsan Upgraded Version on the way
very nice work
video and frequency change, work fine with my devo8s

more than the telemetry and everything will be operational


I am impressed

Please Log in or Create an account to join the conversation.

More
31 Dec 2013 22:17 - 31 Dec 2013 22:18 #17600 by magic_marty
Replied by magic_marty on topic New Hubsan Upgraded Version on the way
anybody seen the Hubsan that is due to be released in 2014? looks very impressive and hopefully Deviation can adapt to all the bells and whistles that it has...
GPS Auto Pilot function
Compass sensor
GPS RTH
Stable Mode with GPS and altitude Hold
Flight time around 25 minutes
Failsafe to return home & Landing
Low voltage protection
TX (FPV TX or Normal TX with Hubsan standard)

almost sounds to good to be true but i guess we will see soon :)

www.hubsan.com/products/HELICOPTER/H109.htm
Last edit: 31 Dec 2013 22:18 by magic_marty. Reason: added link..

Please Log in or Create an account to join the conversation.

More
31 Dec 2013 22:30 - 31 Dec 2013 22:53 #17602 by goebish
Replied by goebish on topic New Hubsan Upgraded Version on the way

PhracturedBlue wrote: If you need a hand, let me know, and I'll spend some time actually going over it, but probably not today.


The bug is very easy to reproduce:

Looks like there's an issue with the u8 A7105_ReadReg(u8 address) function, in hubsan_cb(), just add a single register read after sending frame:
A7105_WriteData(packet, 16, state == DATA_5 ? channel + 0x23 : channel);
A7105_ReadReg(A7105_00_MODE);
In theory this code should have no incidence but it is enough to lose connection after a few seconds (random).
I found that if you add a few nop loops here and there in ReadReg() it will work longer before losing connection.

Anyone with a H107D wants to test a firmware with (supposedly) working voltage telemetry ? Don't attempt to actually fly , there's a big risk of connection drop ;) it's only to check if telemetry is working. Thanks, and happy new year !

Devo 7e:
speedy.sh/GknHH/deviation-devo7e-Unknown.zip

Devo 8s:
speedy.sh/T7mRR/devo8.dfu

Devo 10:
speedy.sh/mceNN/devo10.dfu
Last edit: 31 Dec 2013 22:53 by goebish.

Please Log in or Create an account to join the conversation.

More
01 Jan 2014 00:00 #17604 by PhracturedBlue
Replied by PhracturedBlue on topic New Hubsan Upgraded Version on the way
Have you hooked it up to a logic analyzer to see what is going on?
I don't see anything in the manual that would prevent querying the status that way.

Please Log in or Create an account to join the conversation.

More
01 Jan 2014 05:04 - 01 Jan 2014 05:04 #17612 by Daryoon
Replied by Daryoon on topic New Hubsan Upgraded Version on the way
@goebish

It shows the correct voltage. I verified with a charged and a depleted lipo.

However, like you said...I lose radio link. Can not control the model. The video continues to transmit though.

Eventually, I lose the voltage telemetry too. Shows 0.0v when that occurs.


Attachments:
Last edit: 01 Jan 2014 05:04 by Daryoon.

Please Log in or Create an account to join the conversation.

More
01 Jan 2014 05:53 #17614 by PhracturedBlue
Replied by PhracturedBlue on topic New Hubsan Upgraded Version on the way
In Deviation, we run the SPI bus at 4MHz, whereas the Hubsan runs it at ~500kHz. It might be related, though I don't see why.
In A7105_ReadReg() you'll see we play some games with the SPI interface. This is a) tohandle the bi-direction SDIO port, and b) to follow the instructions in the STM32 manual which state that you should shut down the SPI interface after a single clock has happened to ensure you only do one read as otherwise the 1st read will trigger a 2nd one.

The MCU is running at 72MHz, so 20 nops should be plenty to guarantee a single read occurs, but maybe something screwy is going on here.

A trace of the SPI bus would likely indicate the issue. I'll try to hook mine up tomorrow if you don't beat me to it.

Please Log in or Create an account to join the conversation.

More
01 Jan 2014 06:26 - 01 Jan 2014 06:44 #17615 by midelic
Replied by midelic on topic New Hubsan Upgraded Version on the way
I remembered I had a similar problem with reading reg routine in arduino when changed SDIO pin from output to input for bidirectional comm.I shoud wait for 1us for SDIO pin, switch to input before start reading data and another 1us to switch back to output.

HAPPY NEW YEAR!
Last edit: 01 Jan 2014 06:44 by midelic.

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
01 Jan 2014 09:15 #17619 by rbe2012
Replied by rbe2012 on topic New Hubsan Upgraded Version on the way
I am playing around with the button matrix on 7e and have some strange phenomena which can also be induced by switching input vs. output or pullup vs. pulldown too fast. But I was not able to see the reason; maybe some effect of APB2 clock cycle (how fast is this? Related to GPIO_MODE_OUTPUT_50_MHZ?) which is needed to transfer the given data to the real port.

Please Log in or Create an account to join the conversation.

More
01 Jan 2014 12:19 #17626 by goebish
Replied by goebish on topic New Hubsan Upgraded Version on the way
Thanks all for testing and suggestions !

Don't hook up your analyzer yet, I think I just found the trick, let me empty a few batteries to confirm it's working fine ;)

Please Log in or Create an account to join the conversation.

Time to create page: 0.116 seconds
Powered by Kunena Forum