Youtube Video Efforts & LED Mask

Lately I’ve focused more of my efforts on Youtube videos for the side projects that I build. While I enjoy the process of writing blog entries, I also found that I enjoy the visual draw and documentation capabilities that Youtube allows me for the generation process of my side projects. Through the provided analytics I’ve been able to see that the videos I make generate higher engagement, but the value of written posts in providing engagement for text and programming related questions and solutions is undeniable.

The latest video I’ve posted to my Youtube channel is about the making of an LED mask. I have thought about the project in the past and this October I decided to build one using a Particle Photon as the controller. Due to the spacing of the Neopixel LEDs on the strip (60 LEDs per meter) I decided to interlace the strips with an offset.

For those that don’t know, Particle was previously called Spark and I had used their first product, the Core, in the past before the Photon was released. The Photon is evolution of the Core. While much of the platform has stayed the same (both the good and the “could improv), it remains one of my favorite hardware development boards due to its size and capabilities. I’m looking forward to the upcoming release of the Electron that I backed on Kickstarter.

If you want the code for the LED mask, you can find it here.

My Electric Longboard Build – BOM

While I was creating my first build and began to put my first working prototype together, I figured I would document my parts, their prices, and explain why I chose them. I’ve split up the BOM into two parts, the electric longboard components and the board components which are usable on their own for a normal longboard. I decided to go with a single motor design for my first build (it seems fairly trivial to add a second motor in the future) and so far it’s been handling pretty well on hills. The only downside is that sometimes if I lean all the way to the left, the right back wheel comes off the ground slightly and I lose the driving traction. For more info about the trade-offs, check out my previous post.

The way a typical electric longboard works is, you (the rider) use the transmitter to speed up or slow down. The transmitter interacts with a receiver that is hooked up to the ESC (Electronic Speed Controller) which interprets the signal and turns it into a motor signal. The ESC needs to be hooked up to the battery for power since the ESC is what drives the motor. The motor then turns a gear which is hooked up to a belt that will then turn another gear that is attached to your wheel. This is how your longboard will gain movement.

ElectricLongboardDiagram

 

Electric Longboard Components
$70 – 5065 170kV sensored brushless DIYElectricSkateboard motor with 8mm wide and 35mm long shaft
5065 designates the size of the motor and is a common size for electric longboards although they typically have a smaller shaft. 170kV designates the torque the motor can produce (the smaller the number the higher the torque, but the lesser it’s top speed).
motor
$25 – Wiiceiver – (Not needed if you are using the VESC)
 A way to control the input to the ESC coming from the wii nunchuck
wiiceiver
 Has a better feel and is less bulky than a traditional RC controller.wii-controller
$110 + $20 – VESC
I found someone with experience making them and bought one but it needed to be custome made and shipped to me. The extra $20 is because I had to solder on wires and 2200uf 63V capacitor myself.
PCB_Front-1024x683
I used this in the interim while I was waiting from my VESC to be made and shipped to me. With some configuration it turned out to work decently well. I was able to ride it on flat or a slight incline, but with less power and it would cut off if the motor started to draw too much power. 
mambamaxpro
They were a lot cheaper than the 6S1P 5000mah batteries and have decent power and capacity.
5S1PBatteries
DIYElectricSkateboard sells an aluminum part for the motor pulley and I figured that since it’s the part coming off the motor shaft and is only connected by two set screws, it makes sense to get this part made of aluminum to handle the stress.
FREE – 15mm width 36 tooth wheel pulley (3D-printed it myself)
Originally based off a 9mm pulley model, I had to add bigger holes for stronger screws and a couple other changes. I will link to the design I put together for this part once I’ve tested it and made it fit reliably.
OrangatangPulley
$10 – 8mm width 280mm length HTD5 belt
15mm width is better than the 8mm width belt due to it’s wider area and less likelihood of snapping, but an 8mm belt allows for some leeway in alignment.
$5 – 5x M5 x 70mm bolts + washers + nyloc nuts for the wheel mount
These come in a lot more usually than only 5, but it doesn’t hurt to have more just in case.
This works out well and is made of aluminum. This can be replaced with a cheaper non-adjustable mount, but I didn’t like the idea of welding on a mount to my longboard trucks and had not ability to do the welding.
MotorMount
Subtotal: $400

Board Components
I chose these due to the holes in the hub of the wheels that could hold screws in order to mount a gear through.
orangatang_kegel
Due to my choice of wheels, these had to be altered in order to fit them (I used a file to make a bit of room for the screws that hold the gear onto the wheel) If I were to do this again, I might try the Paris trucks since they are more symmetrical.
caliber2fifty
These are some of the better bearings and ride really smoothly.
bonesredsbearings
$100 – Board of your choice
Subtotal: $224

Total $510 with new wheels and trucks on an old longboard
Total $624 from scratch

The Void – The Evolution of VR Entertainment

I originally saw the video above in May 2015 when The Void released the video and was given the spotlight by Virtual Reality enthusiasts. The ideas behind it reflect the future of virtual reality entertainment. Their goal is to make you feel like you are inside the virtual reality world. In order to accomplish this, they’ve integrated small elements into the landscape like heat, wind, water, texture, and movement to make it feel like you are experiencing what you see in the virtual world.

Recently, TechInsider posted a review of their first experience in The Void and they make it sound invigorating and amazing.

Virtual reality and augmented reality technologies are becoming more accessible and gaining popularity. A lot of companies like Oculus Rift, Microsoft HoloLens, HTC Vive, and Google Cardboard are investing in the space. While most companies are targeting home usage, it’s hard to feel truly immersed in a virtual world while sitting on your sofa or standing in your living room. The interactive environment with haptic feedback helps to truly forget where you are.

I just hope that the experiences of all Virtual Reality headsets live up to our imaginations.

Google Cardboard and Unity

I have a friend who is really into Virtual Reality development and he introduced me to the Google Cardboard Kit. Google Cardboard is able to enable accessible VR tools through the use of smart phones as the basis for the platform. Since most people have smart phones, but very few have VR headsets, a simple and cheap conversion add-on was beneficial. I figured that with its cheap barrier to entry, I could at least test it out and as soon as my kit arrived, I started to do a bit of development for my iPhone 5 in Unity for it.

sunnypeak-vr-google-cardboard

I got this kit for $26 and unlike the other cardboard ones, this was made of plastic and had better construction with adjustable focus and lens separations.

Here are some of the thoughts I had while developing for and trying out the Google Cardboard SDK for Unity:

  • It’s awesome for game developers because it provides them with an easy way to take a 3D game and turn it into a VR experience! (as long as its been developed in Unity)
  • BUT theres a very limited way to interact with applications right now (aside from moving your head). The only real interaction is to use the “trigger” which is a magnet on the side of the headset. I’ve seen videos of people hooking up controllers to their Android phones, but it would be amazing if there were better guides on how to set up a wireless controller, Leap Motion, or Myo armband for interactions from a developer standpoint.
  • The Unity SDK really limits the functionality of the applications right now. For example, it’s almost impossible to figure out how to stream video to it from a server, or create a simple socket connection to a server in order to provide input / data. (I am trying to use the headset to move a servo that is connected to a WebCam for remote viewing)

Overall, I learned a lot going into a quick dive into developing a Unity application and using the Google Cardboard SDK, but I’m not sure that it’s ready yet for me to go much further. The biggest issues for me are the limited interaction and the lack of a usable cross-platform networking stack. I’m sure that it will get better, but for now I’ll just have to be happy playing a couple simple games and watching Youtube 360 videos.

If you want to see what I did as an entry point:

I used this “Roll-a-Ball” tutorial in order to get accustomed with developing in the Unity environment before I built this VRCameraDemo that take my phone’s back facing camera and places it on a plane in front of the viewer to recreate what it sees. (Not very “virtual” reality)

Making an Electric Longboard

boosted-board image

Electric longboards have been taking off lately and gaining publicity through Kickstarter campaigns and tech sites like TechCrunch, Engadget, and Tested. The most popular commercial products come from Boosted, evolve, and Marbel. However the price for a consumer board is upwards of $1000!

Because of this price, there has also been a huge movement in DIY electric longboards and the most common designs take a regular longboard and RC Car electronics to create a custom electric longboard with swappable components. This was the route that I was interested in going since I already had a regular longboard and couldn’t justify spending over $1000 on a longboard that I could build myself for less than $600.

The first step in building your own electric longboard is of course research. I found a lot of great material on forums, instructables, custom sites and blogs, but the best resource was a forum dedicated to electric vehicles which had a specific section for electric skateboards and scooters known as Endless-Sphere. From here I was able to gain insight and chat with a bunch of similarly minded DIYers who had built or were building their own electric longboards. The most common designs were a single motor setup, dual rear setup, and dual diagonal setup.

What are the differences?

Single Motor

The cheapest option to build, it’s main use is for traveling on flat ground and it is lighter due to the one motor setup. It doesn’t have as great hill riding capabilities and could burn out with too many or too long of an incline ride.

Dual Rear

This costs more than the single motor setup, and creates a size restraint on the motors since you can’t use two 63mm motors with a traditional truck. However, it allows you to ride faster, tackle more hills with less stress on the motors, and have a back-up motor in case one fails.

Dual Diagonal

Some people prefer this build over the Dual Rear because it spreads out the motorized wheels in order to give better coverage over uneven ground. The cost and performance should be relatively the same as a dual rear, but you are able to use two bigger motors for this build since you don’t have the size constraint of mounting two motors on one truck.

What do you need to build your own electric longboard?

Longboard Components

  • $20 and up – Longboard deck (there are plenty of options here, whatever floats your boat)
  • $60 – Longboard wheels (preferrably with some sort of hub that you can interface a motor pulley with, common choices are ABEC 11 Flywheels and Orangatang Kegels)
  • $50 -Longboard trucks (your choice, but I prefer the Caliber trucks since they come with decent bushings and are great stable)

Mechanical Components

  • $50 to 100 – Motor mount (Can be bought for a couple types of trucks, or made yourself and welded onto your mount or clamped)
  • $10 – Motor pulley (Can be bought for 9mm or 15mm wide belt with varying teeth. Recommended teeth are 12T, 14T, and 15T)
  • $10 – Wheel pulley (This will depend on your wheel. You can make one yourself using a CNC machine and aluminum, or you can buy one for certain types of wheels. Recommended 36T)
  • $10 – HTD5 belt (after you figure out the spacing and mounting, you’ll want to measure and buy this to fit perfectly)

Electrical Components

  • $70 – Motors (The general rule of thumb is to use a Brushless DC Outrunner motor with over 1000W and below 300 KV)
  • $110 – ESC (Electronic speed controller which determines how fast the motor should spin. Check out the VESC that is being developed specifically for electric longboards)
  • $60 – Batteries (LiPo batteries are the most common, and these are commonly used)
  • $35 – Controller (Some people used a generic RC car controller, but I went the Wiiceiver route and a Wireless Wii Nunchuck)

Total: $565 with quality parts!

Starting Development with Amazon Echo

Here’s a simple guide on how to create a Node.js app hosted in Azure that will handle your Amazon Echo‘s API calls.

amazon-echo

  1. You will want to download and install Node.js if you haven’t already.
  2. Download the code from the repository here.
  3. Create an Azure account if you haven’t already and create a new web app.
  4. Using FTP, Git, or whichever method you would like, get the code into the location for your new azure web app.
  5. Join the Amazon Developer program for the Echo and create a new Echo app. (Note: In order to use this while in development on your Echo, the account needs to be the same one that the Echo is linked to)
  6. In your App information tab:
    1. Fill out your “App Name”. This will act as your official app name.
    2. Fill out your “Spoken Name”. You will want this to be short and simple to say in order to give it the easiest time to recognize.
    3. Give your “App Version” which will need to match the info you hand back through the API.
    4. Give your “App Endpoint” which will be your Azure webapp’s URL + the api endpoint. (Example: “https://echotest.azurewebsites.net/api/echo”)
  7. In your Interaction Model:
    1. Fill out your “Intent Schema”. The intent is the name of the function, slots are parameters, and the type when “literal” will give you back the speech-to-text recognized word. More info on this here.
    2. Fill out your “Spoken Utterances”. They should be tab separated between the intent and the sample phrases. Something interesting to note is that they suggest that you provide a sample for every number of literal device phrases from min to max. (In my case from 1-3 words, thus the repetitions.) It also does not like it when you have multiple of the same literals anywhere in the file.. More info on this here.
  8. After this, set your app to be ready for testing and you are on your way!
  9. Call Alexa with your Spoken Name by saying “Alexa, open {YourSpokenAppNameHere}”
  10. Now you can say the commands that you’ve designated in both your Nodejs web app and your Amazon app declarations for your response!

If you want to make it your own, you will need to modify the Node.js back-end to respond according to the requests that you allow while also altering your intent schema and spoken utterances.

 

Amazon Echo: Should I buy?

amazon_echoThe Amazon Echo is a home automation maker’s dream. It provides an easy way to use voice recognition to interact with your devices, but there are a couple things you should know about developing for it before you buy one and start.

  1. Despite it being called an Echo “App”, your development will take place in a web-service hosted in the cloud that can answer it’s calls. What the Echo will do is translate what it hears into text and then hand it off to your service by calling your API with a package that contains the information.
  2. Creating an “app” with Amazon for the Echo requires you to fill out an “Interaction Model” which consists of an “intent schema” and “sample utterances” as well as program your web-service.
    • The “intent schema” is pretty straightforward and you basically create a JSON array of “intent” which contain a name and “slots” which are used like parameters and you must define the type.
    • The “sample utterances” are a list of the “intent name” and potential sample phrases.

Making it talk to a web service hosted in Azure using Node.js turned out to be fairly trivial and I was able to get a basic implementation hooked into the OpenSmartHub that I have been developing in less than a couple hours. I even created a sample in a github repository for those who want simple instructions and an easy place to start.

It really is amazing to see it come together and interact with your voice commands in a custom scenario that you have developed, but still has a long way to go in order to improve it’s voice recognition. It works really well with the pre-programmed functions, but there aren’t that many that I find particularly useful in an every day scenario and it doesn’t do well with brands or non-dictionary words. For example, it recognizes “Pandora” because it’s a vital part of their pre-programmed functionality, but it doesn’t recognize “Yamaha” or “Wemo” well.

Another thing that I’ve noticed is that it can sometimes mix up the singular and plural versions of words when converting text-to-speech. (For example, mine would sometimes hear “lights” when I say “light”)

Overall, I think it’s going to only improve from here and I think it’s worthwhile to invest into in order to integrate voice-recognition and voice commands into your homemade projects!