dlktdr / headtracker Goto Github PK
View Code? Open in Web Editor NEWThis project is built to record the orientation a FPV headset to allow the camera on your RC to follow your head movements.
License: GNU General Public License v3.0
This project is built to record the orientation a FPV headset to allow the camera on your RC to follow your head movements.
License: GNU General Public License v3.0
Using the Fatshark goggle module door setup, 2 axes are mixed as orientation can not be customised.
Hello
super cool that you added a new sensor to the DIY head tracker.
I already built the new version with the BNO055. I installed the sensor vertically. So I have that use Axis Remapping. If I save the settings it will work. But if I restart the Arduino the remapping is not load. So I have to do the setting again.
I have seen in the code the RemapAxes(); will start in InitSensors(); but not work. So I put another RemapAxes(); after InitSensors(); in the Main INO.
GetSettings(); // Get settings saved in EEPROM
InitSensors(); // Initialize I2C sensors
ResetCenter();
RemapAxes(); // Update the BNO055 axis mapping <--------------------------
InitTimerInterrupt(); // Start timer interrupt (for sensors)
And it works for me.
P.S. I have made a small PCB (44x44mm) and 3D case with Center Button; Audio jack; DC Power plug and 2 status LEDs. Are you interest on the PCB ?
Thanks for the project
Frank
Would it be possible to add sbus support to para master, this would allow module to be plugged into s-port on x9d and use the sbus trainer option.
Currently we need to save before and restore configuration after flash, but maybe you can change it in a way that the GUI temporarily keeps the configuration automatically for flashing and restores it afterwards.
Another idea is that you start update with a soft reset into boot mode before flash (as platformio does, I guess the code should be available), instead of having the users make a reset by button press. This way we can put the Arduino in a fixed case with only a hole for USB.
Version in diagnostics always shows 0.42 on tested 0.5 and 0.6.
Moved From a Pull Request #51 to an issue
Originally posted from @Chefhandwerker
Hello,
is it possible to output the signals in the master as a smart port sensor?
The problem is, the FrSky X-Lite has no PPM or SBUS input. Just one smart port. This would make it possible to use the head tracker on an X-Lite.
Consider adding an optional 'beeper' to the head tracker. This could work as an in dicator / beep to tell you device has powered up, and also as a'center button' pressed.
I'm finding a number of constants that are supposed to be defined, but are not. I can't find these in an include anywhere. Is there a bug, or am I missing a configuration option when building?
Functions.cpp:112:15: error: 'FOC0A' was not declared in this scope
(0 << FOC0A)| //
^~~~~
Functions.cpp:113:15: error: 'FOC0B' was not declared in this scope
(0 << FOC0B)| //
^~~~~
Hello, I Just installed the headtracker on my plane and it works! But now i maybe have to change some settings when i am testing the new setup with headtracker and pan/tilt.
Now i have only the option to take my laptop with me to the field...
But.... I would be VERY VERY nice if there is an android version of this app.
Can you do this? Can someone maybe convert it to an android app??
I have searched the internet and there is an option to convert windows app to android apps but it work only with a setup file, and there is no setup file, only EXE....
Hopefully it is possible to do this...
Tnx
Hi,
I tried to build the code, but PIO is complaining about not finding https://github.com/dlktdr/HeadTracker.git
And... it's not there. Is there any alternative to use?
Cheers, Tobi
nano33ble version does not work wirelessly if ppm out to Digital Pins is disabled.
Hello,
if I power up my tracker the BNO055 will not INT.
If I made reset it will work.
So I test a little with the INT here is my solution
Wire.begin(); // Start I2C
delay(200); <-----------------------
CheckI2CPresent();
A short delay between Wire.begin and CheckI2CPresent
with kind regards
Frank
Issue trying to load firmware. Probably couldn't find the OpenSSL library I packaged with it. Need some more info on the windows version. Maybe I'll switch to a 32bit build for compatibility
If your running Windows 8.1 and earlier versions you will need to install a driver. Please download and install the Arduino MBED Driver. You should be able to connect to the board after this driver is installed
Microsoft made a change in Windows 10, if a device has a compatible ID of USB\Class_02 & SubClass_02 it will use the default usbser.sys driver and isn't dependant on the Vendor and Hardware ID. More information here USB serial driver (Usbser.sys)
I've tried both single wired and remote BLE unit SBUS to AUX1 on TX16S with no luck. Used both BLE Tx and Rx pins as well. Used Hardware set to Serial Port SBUS Trainer, Model Trainer set to Master/Serial.
There was talk of hardware inverters needed etc. Any suggestions?
BTW, there is only one serial port option, not 2 in my TX16S radio.
PPM Master/Jack works fine, would just prefer SBUS
Using headtracker FW V2.03 (didnt work on V2.0, and PPM was jittery there too)
Regarding this page: https://github.com/dlktdr/HeadTracker/wiki/SBUS-Output
I found the steps to set up the TX16S (Open TX) to be inaccurate.
So for example:
That's all that's required to get the head tracker data into an input.
Note: Could not find a way to contact Rotorman/Risto directly to suggest an update.
Get it set to VDD, currently using internal reference, causing voltages readings to max out at 0.6v
The range seems to be very limited.
In a distance of more than 2 meters I get
"Trainer signal lost / Trainer signal recovered" messages.
Arduino Nano 33 BLE
FW 2.0.3
RadioMaster TX16S
OpenTX 2.3.14
Para BT module
Allow a channel on PPMin to reset the Head-tracker's center.
Best choice would probably be one of the channels it's already overriding.
From mfoo:
I completed my tracker including some customizations to the case to make use of the proximity sensor.
Simple holes didnt work as the APDS.readProximity() could not get above 200 to clear the proximity flag, so I added a concave hole around the sensor.
You currently have to have the board in the orientation the axes were programmed for.
Routine where you Tilt 90 down, 90 up. Pan 90 Left 90 Right and it figure out what the boards orientation is.
Choose a rotation in pan, tilt or yaw manually..
Need to figure out how to get bt_gatt_write to work on remote board to send remote button presses back to main board.
Main board appears to reset properly when 'R' sent to 0xAFF2, so that should be ready to go
Effects What this means is you can't reset from the remote board right now
An issue exists when using a second BLE device as a receive unit.
There is a constant 'jitter' on the channel - even when the transmit module is turned off.
The result is that the servo on the head tracker will never stay centered. It is always moving 0% - 1% 0% 1% etc.
I have tested by sending pan on channel 5; using 8ch ppm. Jitter exists.
If I drop to 4ch ppm (which will not have any servos moving) the jitter disappears.
This issue occurs even when the transmit module is off; so I suspect it is something to do with the receive module ppm output code.
I'm not sure exactly what's going on here yet but if you restart the radio it won't try to reconnect to the Nano. If you go to BT and choose discover again it will reconnect.
It doesn't seem to be trying to make a connection attempt, not sure if OpenTX isn't saving the address or there is some kind of issue with it wanting an advertising response maybe? Have one radio with para and the other with non-para right now so can't easily sniff what it should do here.
If the headboard reboots while transmitter is on everything reconnects normally.
Just click discover again for now. At least it's sending data :) I will look into it.
PARA connects every time no-matter the order.
Hi,
I have made the headtracker and setup my spektrum DX6 gen3 according to online videos about setting headtrackers on spektrum radios however, when i plug the headtracker into the trainer port in the back of the radio and move it around, none of my gimbal servo's move. I am using a 2s LiPo to power the headtracker and I have checked if it works in the GUI and it does as expected. Any suggestions would be greatly appreciated. THX!
possible connections modes for jeti users. PPM TX physical connection NOT must be more that 3.2 to 4.2 max 1A. arduino is 5 to 20 volts.
The stand-alone bluetooth module available for the X10 X10S and X12S will not stream data. There is a few variations in the BLE protocol and will not send data to the head tracker.
Two users have this module in a Jumper TX16s and would not function. I would have to assume that it won't work in the X10, X10S and X12S as well.
BLE has firmware 0.72 loaded...tried to connect using .90 GUI to update and got "unable to determine board type" error.
Connecting with GUI .72 connects successfully.
Screenshots below.
Serial info screen shows:
Connected to COM6 Trying to connect to NANO33BLE GUI: �{"Cmd":"FW"}��� HT: FW Requested Trying to connect to BNO055 GUI: $HARD GUI: $VERS Disconnecting from COM6
I kind of feel you should consider a setup similar to to what the old trinity head tracker does.
On power up - send only a 'center' signal to the radio.
A long press of the button then turns the HT on.
Conversely.. if flying; you can long press the button to 'hard center' the head tracker.
This makes it really easy to turn the HT on / off if you are experiencing issues mid flight!
On the remote BLE para board add PPM-Input. Makes more sense down here. Not too sure how to know what channels to override yet. Probably need another BLE service the remote can read. If I muck with the channel data it will cause issues connecting to a normal remote.
Button reset would need a second BLE service. Maybe I could even make the code match one of those BLE shutter buttons for your phone so you could reset with one of those too.
Need to figure out how to get the public address in Zephyr before a connection is made..
Haven't really looked to hard yet. Will get back to this one
Moved this a new issue so others can find it
Although not quite as smooth as i would have hoped. get a slight jitter if panning at a certain speed any advice on how to get a silky smooth movement on the servos?
Originally posted by @JasFPV in #22 (comment)
Remote board currently does not use the override channels sent to it from the head board.
Needs to subscribe and set data in remote btpararmt.cpp completed
Effect: What this means is if your passing PPM data into the remote board you cannot use channels 1-8 as all of them will overridden by the Bluetooth data for now.
I'm thinking of adding 4 channels of PWM output on a0-a4. User can select which variable they want on the pin, choices are Bluetooth inputs 1-8, PPM inputs 1-16, SBUS nput 1-16, Tilt, Roll, Pan. Any others?
PWM also takes up very little processing power so won't affect the main purpose of this board.
Is this a bad idea, comments?
HI,
I just installed everything I need to make the headtracker work on the arduino nano BLE 33 but each time I try to reconnect in the application it says 'Was unable to determine board type'. It is a brand new board and I don't know if something is up with the board or if I am doing some thing wrong. Am I meant to press the boatloader button when I plug it in? Pls help.
Thanks.
I found a way to use the PPI, GPIOTE, TIMER on the NRF to accurately measure an input without CPU intervention until reading the value. Just can't get the ISR to call right, there is a lot of Arduino and Mbed functionality below I have to sort through
I updated to the new version 2.0 last night and it seems to be working great.
When i went to update the firmware through the application I selected "Online V2.0" and there is no firmware available. I had to select "Shipped Firmware" before the listbox would fill. Just thought you should know. Once you select Shipped, you can then select Online and it will work (it seems)
Thanks again for your awesome work.
I have normally been able to get at least 5m of range and still good update rates with no interference around. e.g. Outside with the 2.4Ghz radio turned off.
If I wrap my hand around the Nano 33 BLE the update rates drop drastically and it looses range, as expected. So try to keep the antenna clear of obstructions and wires.
If you seeing extremely low range even with no obstructions / interference check the Nina B306 module on the Nano 33. The PCB antenna has 5 capacitors that all need to be there and soldered on properly. See below photos for reference. Loosing any will cause very poor range.
If anyone finds the capacitor sizes please post them.
I'm going to add 2ch of analog inputs A6,A7 The user can decide the scale and offset and which channel it will be output on or disabled.
Can be used for with a potentiometer as throttle/rudder, battery voltage monitor.. etc...
Once again will take very little processing power and won't affect the main purpose of this project.
Comments??
The parameter list is starting to get pretty big. This does require CRC check to be added and Headtracker returned ACK signal so I can be sure it got there.
Currently when using a FRSky BLE module as the Transmitter and the Nano33BLE as a remote board the connection is highly unstable. Constantly disconnects..
This is not too important of an issue, unless your trying to use a Nano33BLE as a trainer bridge to another radio maybe?
Allow user to load a file from their computer with a downloaded firmware file.
I have a Nano 33 BLE on the google and transmit channels 6-8 with Bluetooth to a Nano 33 BLE Master on a TX16S.
A PPM receiver for trainer operation is still connected to PIN 9 on the master. As long as the Bluetooth transmitter on the google is off, the trainer operation works with the PPM receiver on the master. As soon as bluetooth is on, the trainer is no longer operated via pin 9
Using version 1.2 on receiving unit, v.72 on the head. (same on v.71 as well)
I am using channels 6,7 & 8 for pan, tilt and roll respectively. Pan is reversed, default orientation.
Upon startup everything works normally but if I make a large move in any axis the head unit seems to restart (yellow led goes out). sometimes I have to press the board button to manually restart it to get bluetooth to reconnect.
I've also tried version 1.1 and v.71 with same issue.
I am surprised as it seems I am the only one having this issue?
Hi
https://www.youtube.com/watch?v=g1SLBUuEn3I
Video above to compare RC1.0 -> 0.92
The drift is subtle but consistent, after calibrations and resets the drift persists, the axis affected here were Pan & Tilt. Roll appears to be okay.
When flying, I was flying LR on Sunday I was actually turning in circles to counter the constant drift on Pan. I ended up just switching over to sliders.
0.92 is totally rock-solid, I sometimes have to turn my head to check it's still working as it doesn't drift!
All settings default
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.