Jared Sanson


Viscons Icon Set

Sep 23, 2014 graphics, icons

Viscons is a hand-crafted icon set for common filetypes used in development (eg. C header files, binary objects, schematics, 3D models), using a nice eye-soothing sky-blue theme:

Black icons represent compiler outputs/object files, while white icons represent human-editable source files.

I created this icon set to remove the horrible style differences associated with different types of files:

Download

viscons.zip (2.53 MiB)

The icons are licensed under Creative-Commons

Future

Here's my future wish-list for this icon set:

  1. Scriptable template system for generating icons (so I don't have to create each one individually!)
  2. Easy installation/association
  3. Dynamic source code icons which show the source contained inside (like linux does)
  4. Automatic binary/ascii icon for all unknown files

If you know how to do any of the above, send me an e-mail!

View Comments...

OSHW OLED Watch

Jul 22, 2014 electronics, oled, oshw

Smart-watches are becoming the next big thing, but with increased miniaturization it is becoming impossible to build these sorts of devices yourself. This project aims to provide a "smart-watch" which can be built from readily available components (eg. from element14, digikey, etc.), and able to be soldered by hand. Of course, processing power must be sacrificed, but who needs a camera and 60FPS graphics on a watch???

I have been working on this watch since early 2013, and it has come a long way! It is still very much a work-in-progress though, and I am working on another hardware revision which will fix all the hardware bugs. (you can read more about those from my previous posts on the project)

You can find more info and progress on my hackaday.io project page: http://hackaday.io/project/2263-OSHWatch

Features

ClockClock
Kernel InfoKernel Info
AccelerometerAccelerometer

The watch features a PIC24F microcontroller and a 128x128 RGB OLED display, along with an accelerometer and magnetometer. The goal is to have both USB-HID (driverless) and Bluetooth 4.0 LE connectivity, so I can sync the calendar quickly and easily.

Working features

  • Real-Time Clock - It can tell the time!
  • University Timetable - I can tell when and where my next class is
  • USB-HID comms and bootloader
  • Buttons
  • Basic accelerometer logging
  • Battery charging & monitoring
  • Anti-aliased font drawing (Just grayscale at the moment, no "clear-type")

Future features

  • Accelerometer 'tap-to-wake'
  • Magnetometer compass
  • Bluetooth 4.0 LE
  • Alarm clock with peizo buzzer
  • Desktop GUI for updating the calendar

Hardware

The hardware is a 2-layer design utilizing SMD components, and is fully open-source in case you'd like to build your own. Schematics and PCB layout were done using Altium, which unfortunately is quite expensive, but they recently announced they would be releasing a free version sometime in the future!

Known Issues (Rev 1)

Known Issues (Rev 2)

  • Watch sometimes resets when waking up (possibly supply decoupling issues)
  • USB comms task sometimes doesn't go to sleep (drains the battery)
  • OLED display has some weird ghosting artifacts
  • In the schematic I got the connector around the wrong way, so the OLED is on the opposite side of the PCB than I wanted.
  • I didn't assign the OLED data lines to the PIC24's TFT driver, so I can't make use of it and drawing performance is less than what it could be.
  • Bluetooth 4.0 is untested
  • There are a few minor "bodges" on the PCB required to make it function correctly

Future (Rev 3)

I am working on a revision 3, which will fix all of the above issues and make the PCB much more compact! Stay tuned... (Subscribe to the RSS feed to keep up-to-date)

Firmware

The firmware is available on my github: jorticus/zeitgeber-firmware
You will need the MPLAB-X IDE, the XC16 free compiler, and the Microchip Application Framework. Alternatively you can download the bootloader & firmware binaries here: oshwatch-binaries.zip

Features:

  • Custom RTOS, with power saving
  • Custom graphics library, with anti-aliased text drawing
  • HID bootloader

Photos

Related Posts


Footnotes

All design files and source code is released under the OSHW License. ie. You may modify, distribute, and make the design, as long as you provide attribution.

View Comments...

Face-Replace

Jul 15, 2014 programming, university, kinect

This is a fun project I did for my computer vision research project at the University of Canterbury. It uses the Kinect face-tracking library to replace a user's face with a custom face, which warps to match their expression.

It is written in C++ and includes a few GLSL shaders.

Download

A stand-alone version is available here if you want to try it out:

face-replace.zip (12MB)

You'll need to download the Microsoft Kinect SDK Runtime which installs the required device drivers for the Kinect. Alternatively you can use a different depth sensor, as long as it works with OpenNI2.

Compiling

I developed this project in Visual Studio 2013 (MSVC++ 12), but it should work in other versions provided you can compile the required libraries.

Before you can compile this, make sure you set up the following libraries:

Operation

The program performs the following steps:

  1. Capture RGB + Depth video frame
  2. Detect head pose and face features using Kinect SDK
  3. Deform the Candide-3 mesh to the given head pose and face features
  4. Process the RGB + Depth frames using OpenCV
  5. Draw the RGB video frame
  6. Draw the texture-mapped candide-3 model in OpenGL, using a custom blend shader.

Side-note: This project uses a custom candide-3 face model instead of the Kinect SDK's internal model, since it's not easy to match vertices with tex coords using the internal model. This functionality is provided through the WinCandide-3 project (all source code named 'eru' is part of this project).

Future Work

It's probably unlikely I'll do much more on this project since I have other commitments, but here's a list of things that could be improved upon in the future:

  • Write a plugin for blender that can read and write the candide-3 model, so textures can be more accurately mapped. (I'm currently using the WinCandide-3 utility to approximately map the texture)
  • Add support for multiple people
  • Decrease tracking latency/improve face location. (Perhaps something like meanshift/optical flow + a kalman filter?)

Source Code

Source code is available on my GitHub page: face-replace

My professional paper is available here: COSC428 Computer Vision - FaceReplace.pdf

View Comments...

OLED Watch Is Alive!

Jul 01, 2014 electronics, pic, oled

So it's been a while since I last posted about my OLED watch, and I've done a lot of work on it! (And also broke it multiple times)

It's taken me a lot of work to get this far, and I developed EVERYTHING from the ground up. The electronics design, the PCB layout, the RTOS and firmware drivers, the graphics engine, the user-mode app code, and even USB communications apps. I've used C, C#, and Python extensively in this project, and Altium Designer for the schematic and PCB.

Overall it has been an awesome learning experience, and if I was to make another one I would do a lot of things differently!

Here's a few features of my firmware:

  • USB HID Communication (No PC drivers required!)
  • Watch face for telling the time (Kind of required...)
  • Date & Upcoming events
  • Accelerometer reading
  • RTOS Kernel debug info

And some features planned for the future:

  • Bluetooth 4.0 (Still need to get the IC for it though)
  • Magnetometer readings
  • Smart alarm clock that wakes me up at the ideal time, by detecting my sleeping patterns through the accelerometer
  • Auto screen on by rotating or shaking my wrist

SMD Rework

If you've read my last blog post, you'll know that I ripped the USB traces off my last PCB! I ended up using my hot-air reflow station to transfer the components to a spare PCB, and luckily it all powered up and worked after that! Here are some photos of my reflow process:

Removing ComponentsRemoving Components
Applying flux for QFN chipApplying flux for QFN chip
QFN chip reflowedQFN chip reflowed
Cleaning flux with MethsCleaning flux with Meths
Soldering the MCUSoldering the MCU
SolderingSoldering
Reflowing accReflowing acc
Soldering the OLEDSoldering the OLED

Notice how I soldered the OLED directly to the PCB, I had used a connector in my last board but it added extra distance to the OLED cable, so it wouldn't fit into the case. Soldering directly to the PCB gave me a few more millimeters to work with!

Case

I was going to print a case for my watch on the 3D printer, but then I found something far more suitable - an aluminium case designed for iPod Nanos. After struggling with metal cutters and grinders, I managed to turn it into something my watch could fit into:

It's by no means waterproof, but it looks nice!

Hardware Issues

Unfortunately I found that the cable on the OLED screens doesn't like being bent at tight angles:

After breaking two screens this way I decided to try and fix it:

Preparing epoxyPreparing epoxy
Epoxy strengtheningEpoxy strengthening

This provided enough strength to the cable to prevent it from breaking, and it's working beautifully now!

I've also had a few bugs with my hardware design, and they are so much harder to debug than software! One particuarly problematic issue was that my LiPo charger circuit wouldn't charge the battery if it was completely flat! The only way to power it back up was to apply voltage directly to the battery to "jump-start" it. Eventually after many iterations of soldering in different resistors, I noticed I had set the charge current an order of magnitude too low (something like 10mA charge current instead of 100mA), so the battery would never charge. After replacing that resistor it came right.

Future Work

Now the hardware is mostly done, I just need to work on the user interface to make it more usable. Currently battery life is just over 24 hours with intermittent use, but I plan on extending that through better firmware.

Update

I've released the schematics, PCB layout, and firmware as open-source: OSHW OLED Watch

View Comments...