09/17/2017 at 19:03 •
I have just finished adding a few updates to Torrus PCB !
- CP2104 FTDI chip to programm Torrus over USB port
- Battery reading
- Fix switch footprint
- Voltage regulator at 3.3V to avoid frying the chips
- Adjusting battery charging speed
- MPU9250 to 0x69 I2C address by default
- Reset output to USB
Now I still have a few verification to do and I can go in production, which means we could have developer kits within a month !
09/16/2017 at 03:22 •
I have setup a Trello board to write down all that has to be done to port the software to Arduino and make Torrus usable by any Arduino dev. As you can see, there is a lot to be done... If you want to help and have experience with nRF52, go ahead !
09/15/2017 at 19:26 •
Now we are really getting started here ! How to program Torrus ?
Torrus is based on an nRF52832, and is usually programmed in C using an interface chip called CMSIS-DAP. That programming chip can be found in nRF52 dev kit for ~50$, but I think we could also program it for 0-2$ !
We currently have two problems to solve :
1. Use Arduino to program Torrus, not a complex IDE
2. Program Torrus without requiring an external programmer, or just an FTDI chip.
Arduino and nRF52
Thanks to Sandeepmistry we have a port that allow us to use Nordic nRF5 chips with Arduino ! It's been used by others who based their core software on this library :
- RedBearLab nRF51822 Github (DFU Over The Air bootloader, seems to be buttonless !)
- Bluefruit nRF52 Github
- Sparkfun nRF52832 Breakout board Github
So guess what ? We are going to do the same !
But we might need to provide extra features to make it easy to program. That's what I will be working on for the next weeks. I have started to fork the library on Github, and work on Torrus board support. I have also included the serial programming tool from Sparfun (more below...).
Here is the big deal ! We want to get rid of the CMSIS-DAP programmer, because if it is great for debugging, it is big and expensive.
To avoid using the programmer, Nordic offers another way called DFU (Device Firmware Update). DFU can be done via two ways :
- Serial Update.
In this case we need to reset the device, press a button to get in DFU mode and send the new firmware over serial (from Arduino for example), perfect for developing.
- OTA (Over The Air) Update, in a word via Bluetooth. The device can be set in DFU mode from a Bluetooth Service. This is great so everyone can update Torrus from its phone.
Before going further I like to give you a quick explanation of the Application layout (all the data that goes in the nRF52, Torrus brain) :
The softdevice is provided by Nordic, it runs all the important functions. We can't modify it, just call functions. It is the first piece of software to be executed on boot, just before the bootloader.
The application is ... well the application ! All we need to develop ! To create bluetooth services, communicate with other sensors... This is what we will work on most of the time
The bootloader checks if we are trying to update the software, otherwise it launch the application.
Here is what we have to do now :
Create the bootloader so it can update from Bluetooth or Serial
Modify Torrus circuit to add a Serial programmer (certainly the CP2104A) that will be able to automatically reset the board.
Make the new bootloader work with Arduino.
Then we will be able to program Torrus from its USB port.
Below you will find most of the interesting documentation on the subject (pretty much all we need to solve those problems).
Sparfkun nRF52832 breakout board guide (Serial bootloader) :
Nordic DFU official documentation (Buttonless DFU OTA only supported in prod since SDK v14)
Bluefruit nRF52 feather documentation (bootloader buttonless with CP2104 FTDI, factory reset)
09/15/2017 at 17:03 •
I received the first PCB prototypes a week ago, and I have been running some tests :) It all seems to work as expected, I noticed a few minors changes for the final release though.
Now the big part is the embedded software, I'll porting it to Arduino over the weekend and provide informations to program it ;)
Do you guys want prototypes ? =)
09/13/2017 at 01:13 •
I finally got the nRF52840 DK, received the Trackpad dev kits and modified my MPU0250 breakout board so it fits with the nRF52DK.
Yes, it looks like ... a dev board ! But at least we can get started quickly and start validating the components, test them, try the algorithms, and start developing the software. So far I had good results with the Trackpad, the Bluetooth communication, and the IMU starts giving results but the hardest remains its calibration and saving the calibration parameters over a reboot... More headaches ahead...
09/13/2017 at 00:36 •
Let's go through the main components of Torrus !
First the brain, an nRF52832 bluetooth 4 (and BLE 5 enabled) chip with a ARM Cortex M4. It can run quite some badass algorithms, supports encryption, has NFC, and on top of that is pretty famous in the Bluetooth community. It is programmed in C and requires Nordic SDK, but we will see later how to use it with Arduino to make everyone happy ! One last thing I like about the chip is that you can update it's software using your smartphone, they call it DFU OTA (Device firmware upgrade over the air).
Then I was wondering : should we use buttons, a joystick ? I wanted it to be versatile, and to fit everywhere (small form factor). And this is how I ended up using the TM035035 Trackpad from Cirque. It's a circular trackpad of 35mm diameter with a very good precision. And the people a Cirque's are very cool and helpful, it is always good to have people you can ask questions too ;)
Finally we need an IMU (Inertial Motion Unit) sensor. I have chosen the famous MPU9250. It's a 9DOF IMU, I2C or SPI, with a processing unit (though we are not going to use it). There are plenty of Arduino library for that sensor, but only one that's really great : FreeIMU.
We will talk about interfacing those sensors later.
At last but not least, the charging connector is an USB-C. It also allow to access the nRF52832 I2C and Serial for programming.
More informations coming soon ;)
09/13/2017 at 00:19 •
Why is Torrus coming to life ? We see more and more mobile controller out there, so why bother ? Torrus doesn't want to be "yet another VR controller", but "The VR controller". What's the difference I hear you say ?
All those controllers are very closed. They each have a different communication protocol that works only with certain plugin and a few smartphones. Should a game developer adapt to each of these devices ? No ! Should we have one device that works with everything ? Yes !
That's the objective of Torrus, and that's why we want it to be community based. Let's develop faster together and make Torrus more and more compatible. We believe in mobile VR and we know it is just missing good content and interaction. Let's solve the second and take care of the first right after :)