open source – [protofusion] http://protofusion.org/wordpress Open Hardware and Software Fri, 29 Sep 2017 16:16:34 +0000 en-US hourly 1 https://wordpress.org/?v=5.6.13 11753368 Tracking Balloons with WSPR http://protofusion.org/wordpress/2017/09/tracking-balloons-with-wspr/ http://protofusion.org/wordpress/2017/09/tracking-balloons-with-wspr/#comments Sat, 30 Sep 2017 22:00:39 +0000 http://protofusion.org/wordpress/?p=2777 ]]>

What is WSPR?

WSPR is a low data rate digital protocol intended for measuring RF propagation, typically on LF and HF bands and at very low powers (often 1W to as little as 20mW). WSPR messages are digital packets that contain just a few pieces of data:

  • Callsign of sender
  • 4-digit grid locator for indicating transmitter location
  • Transmit power in dBm

This data allows a listener to know how far away transmissions originated and with how much power the transmission was made, giving a fairly realistic and real-time measurement of RF propagation.

On the physical layer, WSPR consists of a 4FSK modulated signal with a separation of 1.4648Hz between tones. This frequency shift is so small that it is nearly imperceptible to the human ear. Bits are transmitted at 1.4648 baud (which is crazy slow!) and messages take just shy of 2 minutes to transmit, which contributes to the protocol’s robustness.

WSPR includes a few other features that help it decode reliably even at very low SNR. Each WSPR message must be transmitted on an even minute, +/- a couple seconds, so receivers know when to expect the beginning of a message. Each message includes forward error correction (FEC) so that receivers can correct any bit errors that do occur during transmission. Messages are also combined with a 162-bit pseudo-random sequence sync vector to aid in receiver synchronization to the bit stream.

Why use it for balloon tracking?

WSPR provides a great transport for data when balloon tracking, as distances of 1000km+ are easily spanned with merely 20mW of power or less. WSPR receivers are located around the globe, and are continuously listening for WSPR transmissions which they relay to the Internet, providing an easy-to-use backbone for balloon data.

The hardware required to transmit WSPR is also very simple. Most transmitters are very simple, and consist of a single I2C programmable oscillator with a simple low-pass filter. The oscillator is re-programmed to different frequencies on the I2C bus for each bit transmitted. Even though this method is several orders of magnitude too slow for conventional modulation schemes, the extremely slow baud rate of WSPR allows this technique to work very well.

While all this sounds perfect for balloons, there are some practical limitations: you can only transmit very limited data, and transmissions are super slow. Packets only include 4-digit grid locators, which only localizes you down to a 70mi x 100mi square. There is no provision for any additional data such as battery voltage, altitude, temperature, etc.

(mis)Using WSPR fields to encode data

We can work around two of these issues with a slight hack on the WSPR network. WSPR packets that have callsigns with ‘0’ or ‘Q’ are considered invalid packets (since no allocated callsign starts with these characters). However, WSPR receivers still process and upload these packets to WSPRnet, and they can be used for balloon telemetry.

Typically trackers will transmit a “standard” WSPR packet that shows up correctly on the WSPRnet map, followed by an “invalid” ‘0’-packet that encodes some additional telemetry. This packet typically encodes battery voltage, temperature, altitude, and 2 additional characters of maidenhead grid locator into a single WSPR packet.

 

Check back for a follow-up post where I walk through how this data is encoded in my WSPR tracker. All of my code will be open-source and available for reuse!

 

]]>
http://protofusion.org/wordpress/2017/09/tracking-balloons-with-wspr/feed/ 5 2777
Crazyflie 2.0 Review http://protofusion.org/wordpress/2015/03/crazyflie-2-0-review/ http://protofusion.org/wordpress/2015/03/crazyflie-2-0-review/#comments Sat, 14 Mar 2015 03:37:45 +0000 http://protofusion.org/wordpress/?p=2108 ]]>

Crazyflie 2.0

The Crazyflie 2.0 is a second generation nano quadcopter created by Bitcraze as part of their open-source flying development platform. Available for $180 from Seeed Studio, this developer-friendly kit seemed like the perfect way to dip my toes into the increasingly popular world of hobbyist drones. I went for the developer combo package, which included the Crazyflie kit, Crazyradio, JTAG debugger, and a couple breakout/prototyping boards for $215. I also purchased a few spare batteries to extend my flight time, a decision I definitely haven’t regretted.

Crazyflie Packaging

Crazyflie Packaging

When I received my Crazyflie 2.0, I was greatly impressed by the packaging. I guess I should have expected something nice given the amount I paid for it, but anything coming from China automatically starts with low expectations in my book. The pcb and parts were all organized and bagged separately and appeared to be of decent quality. Assembly was a breeze, with plenty of instructions and tips to be found on their web page, although no printed material was included in the box. After I assembled the copter, I noticed that the motor mounts (which also function as legs) felt a bit flimsy, and I was concerned that they would not withstand the abuse to which they could soon be subjected.

Getting the Crazyflie out of the box and into the air using the Android app over Bluetooth was a piece of cake. Keeping it in the air, however, wasn’t quite so easy. It took me a while to get used to the controls, and using touchscreen joysticks certainly didn’t help. Fortunately, hooking up a PS4 controller significantly improved the experience. The Android app has a number of limitations, and needs some more development work, so I quickly switched over to the PC client using the Crazyradio and PS4 controller. The PC client is more complete, and includes features such as sensor feedback, data logging, and hover mode. When placed in hover mode, the Crazyflie attempts to maintain a constant altitude using its built-in altimeter and IMU. This feature is still under development according to the Crazyflie wiki, and it shows, but it is usually better than trying to hold altitude manually. With an ever-expanding feature set, I’m sure the PC client will only get better with time.

Crazyflie PC Client

Crazyflie PC Client

I was very impressed with the durability of the Crazyflie, especially considering my initial misgivings. I suppose the feather-light weight of the quadcopter helps to minimize damage, but I certainly did a good number of terrible things that could have easily destroyed it. I ended up breaking off several of the legs over the course of a few days, but since each mount has two legs, it can carry on just fine without a few of them. Thankfully, a few extra motor mount/legs are included in the kit.

Because the Crazyflie was designed with developers in mind, the creators have gone to great lengths to ensure that development is accessible to everyone. They have detailed instructions on the Crazyflie wiki page on how to set up development environments for each of the components, and have even created a virtual machine image with all of the development tools pre-loaded. Better yet, they added wireless flashing on the quadcopter, so new firmware can be uploaded on the fly. These features, paired with their development “decks” (add-on breakout/prototyping expansion boards), open up endless development possibilities. Anyone who has dabbled in coding should be able to dive in and add something new.

All-in-all, the Crazyflie is an entertaining toy to play with. It may not be capable of any real work, such as carrying a camera, but it is very fun to fly around and its small size makes it possible to fly indoors. Probably the most attractive aspect of this quadcopter, however, is the development opportunities it opens up. For example, it would be an ideal platform for a flying robot swarm. Or it could be programmed to autonomously navigate using distance sensors. Plus, if you add some cool features, I’m sure the community would appreciate contributions to the source code.

]]>
http://protofusion.org/wordpress/2015/03/crazyflie-2-0-review/feed/ 2 2108
Converting .MTS video files into .mp4 files http://protofusion.org/wordpress/2010/11/converting-mts-video-files-into-mp4-files/ http://protofusion.org/wordpress/2010/11/converting-mts-video-files-into-mp4-files/#comments Sun, 21 Nov 2010 05:34:04 +0000 http://protofusion.org/wordpress/?p=568 ]]>

I have a Canon HF200 video camera and it outputs HD video, but it’s in .MTS file format. This is a pain because there are no good free video converters or editors for .MTS files. But using Avidemux, an open-source video converter, I was able to edit and convert my video to .mp4 while keeping my sanity and my money.

If you know your way around avidemux, pay attention to black colored text.

If you need extra help along the way, or I have something pointless to say, it will be in gray.

1 – Open the File

The first thing you have to do is import your video into Avidemux by one of two methods:

1) file –> open –> your-video.MTS

2) drag and drop the video file into avidemux

A dialog will appear saying, “This looks like MPEG, Do you want to index it?”… say “yes”

Avidemux will then tell you that it has detected H.264, say “yes”  to it’s other mode.

2 – Set Encoding Options

For the Video encoder you should use MPEG-4 AVC

For Audio I recommend AAC (Faac) and a bitrate of 192, (I’ll tell you right now AC3 does NOT work with youtube).

Use mp4 for the encapsulation (not avi like in the above pic).

Configure –> General

Use CRF (Constant Rate Factor) around 16 – 20. A CRF of 16 produces a larger file size; the higher the number, the less the quality and file size.

Configure –> Motion

Use UHS (Uneven Hexagonal Search) and SR (Subpixel Refinement) of 9 for best results.

3 – Fix Frame Rate Issues

Here is where everyone has the problem of “Why is the video half speed!?”

Well, that’s because avidemux doesn’t like you, and that Avidemux decided to treat the predictive and reference frames differently.

The way I fixed this was to double the video frame rate:

Main menu –> Video –> Frame Rate

According to my TI-89, 29.97 * 2 = 59.94 (or I just did it in my head, but think the 89 is a powerful tool, especially if you’re an electrical engineer)

Well… now your video is the right speed… but why is the file so large?

Go to video filters, transform –> Resample fps (back to 29.97).

Yeah, I know, I went extra wide screen with my video, so I feel like a ninja when I watch it, big deal.

I used other filters as well to reduce the resolution and trim the unneeded parts of the video to save space.

4 – Save the Video

File –> Save –> Save Video

Make sure you use the .mp4 extension.

That’s all, enjoy your well-compressed .mp4 video!

]]>
http://protofusion.org/wordpress/2010/11/converting-mts-video-files-into-mp4-files/feed/ 2 568
Ndiswrapper in a few lines http://protofusion.org/wordpress/2009/08/ethan-zonca/ http://protofusion.org/wordpress/2009/08/ethan-zonca/#respond Thu, 13 Aug 2009 00:28:58 +0000 http://protofusion.org/wordpress/?p=36 ndiswrapper -i yourdriver.inf
ndiswrapper -l  #Ensure that it says “Driver Installed” and “Hardware Present”
ndiswrapper  -m
ndiswrapper -ma
ndiswrapper -mi
modprobe ndiswrapper

…And you’re good to go! Feel free to run /etc/init.d/network restart if you feel like it.

]]>
http://protofusion.org/wordpress/2009/08/ethan-zonca/feed/ 0 36
Quick and Easy Sites with FOSS http://protofusion.org/wordpress/2009/08/quick-and-easy-sites-with-foss/ http://protofusion.org/wordpress/2009/08/quick-and-easy-sites-with-foss/#comments Sun, 09 Aug 2009 02:30:55 +0000 http://protofusion.org/wordpress/?p=13 ]]>

In this short guide, you can learn how to create an easy yet professional-looking fixed-width website with free open-source software. Before you begin, ensure that you have the Gimp and Inkscape installed, in addition to some form of text or code editor (any variety will do).

This guide provides a basic guideline on creating a site simply and easily using few tools. Feel free to try different techniques, see how it works, and leave some feedback in the comments. Feel free to comment on how to improve this article!

Initial Design

First, open up Inkscape and begin visualizing what you want your design to look like. If you have not used Inkscape before, check out this simple Inkscape tutorial.

Things to keep in mind:

  • Your design should include a header, menu bar, mid-image portion, and footer portion
  • The menu bar portion can have image-mapped links, or you can overlay text links on a background image
  • The middle image portion should be vertically tileable for a fixed-width variable-height site.
  • The footer can include image-based text, or text can be overlayed on a background image

After you visualize your initial design in Inkscape, you should have something similar to the image below. In this tutorial, we will be creating a site with a header, an image-mapped menubar, a tiled text background, and a footer image.

Your initial Inkscape design should look something like this

Your initial Inkscape design should look something like this

Exporting the Design

After you have created your design in Inkscape, you must export it to a raster format so it can be parsed by web browsers. The resulting raster image also needs to be separated into different portions that we will reference in our CSS. The fastest and easiest way to accomplish this is by creating a “chopper” layer above the layer(s) your design is in. Go to [Layer –> Add Layer (select “Above Current”)] and put in whatever name you wish.

In this layer, you will now begin creating squares to mask off various portions of your design. Start out by dragging a square across the header portion of your design. Zoom in and make sure that the edges of your mask are aligned with the edges of your design. After you create the first mask, copy the mask and paste it below. This time, center the block on your design and only adjust the height, not the width. Continue this process until you mask each portion of your site: header, menu bar, middle tile, and footer. I find it easiest to color-code these sections and make them semi-opaque, as shown below.

Your completed theme with different portions in different translucent colors should look something like this

Your completed theme with different portions in different translucent colors should look something like this

Finished? Take a break and check out some of the notes below.

Notes:

  • The footer in this design will have copyright info on the image itself, therefore search engines and visitors printing out your site will not have footer information. You can easily add a text-based footer to your design, but this won’t be covered in this tutorial (yet)
  • Many other items, such as the menubar imagemap, can be substituted with a text-based menu with an image background behind it. This is usually a bit more flexible, and nicer to search engines.

Ready to move on? If you know some CSS, you can probably figure out this part yourself. You can create

tags to hold each image, although an imagemapped menu bar must be embedded in the page with an tag. You can look at the CSS source for ethanzonca.com to get an idea of what you need to do.

]]>
http://protofusion.org/wordpress/2009/08/quick-and-easy-sites-with-foss/feed/ 3 13