Brian Chen

Collatz Conjecture

figure

Recently I was reminded of the Collatz Conjecture during a lecture.

It concerns the function

defined by setting

for odd and for even .

Collatz Conjecture

For any natural number , the orbit , passes through 1

I won’t say that I’ve made much progress on the problem, though I did at several stages think I was near a proof only to realise that I’d then need to probe a subproblem that was incredibly difficult if not impossible.

“Mathematics may not be ready for such problems.” - Paul Erdos

Erdos’ quote here hints at something intrinsic aspect of mathematics–there is always something that we don’t know and something new to be discovered.

Given the years of effort many have spent attempting to prove (or disprove) the conjecture, it certainly seems like it’s unlikely that we will see a proof soon. The conjecture serves to show us just how much we don’t know; even the seemingly simple and intuitive can be beyond current understanding.

WSL Windows Interoperability

You have to give it to Microsoft, they’re doing some pretty impressive stuff these days. Last night I got the latest Creators Update, and took WSL for another spin. It now ships with Ubuntu 16.04 and a tonne of improvements. We can now launch Windows applications from bash!

Maths on the web (Mathjax, MathML etc)

LaTeX is amazing. Mathjax allows LaTeX equations to be rendered properly depending on the browser and device but using Javascript (i.e. isn’t static). So when Google AMP (Accelerated Mobile Pages) doesn’t allow custom Javascript to be used, what do I do? I look to static solutions, and the closest alternative I find is MathML–not exactly a solution when Firefox has been the only browser with native support for years, yet MathML is part of HTML5. So while my website might not satisfy Google AMP criteria, I think I’m sticking with Mathjax (which works seamlessly with Kramdown) for now.

Setting up the new site with AWS, Jekyll, and WSL

Over a year ago, for some reason I created my blog on Blogger. Even at the time, I knew I’d eventually want to get my own domain, host, and build my website on something better. Well recently I’ve finally done it and it was surprisingly easy.

An Arduino IDE Alternative

It seems like it was only yesterday when I first downloaded Arduino 1.0.1, when I first discovered the magical world of embedded programming. I clicked on the upload button … “serial port not found.

HM-11 Breakout Update

The boards arrived yesterday –surprisingly quick for OSHPark. HM11 Board Diagram

Laser rangefinder

After adding the laser, I quickly made a test program that sends the estimated range of the object via serial to the computer. The sensing algorithm on theCMUcam5 only detect the laser up to a distance of around 80cm. What’s worse? The accuracy of the sensor is mediocre at best, since the CMUucam5 only outputs an x/y coordinate in a 320x240 range, even though the OV9665 is a 1.3MP sensor. Apparently, this is due to the limited ram of the NXP processor on board, according to the guys at CMU.

Laser rangefinder (camera implementation)

I decided to begin making a laser rangefinder today using a camera implementation.

HM-11 BLE Breakout

So today I finally decided to design a PCB for the HM-11 Bluetooth module. At $10 dollars a piece (and as low as $2 at large quantities), I had bought HM-11 for the ballbot. However, I decided that I’d get the ballbot working first with the RN42 (which I later replaced with a HC-06).

The new control system [with video of robot balancing]

So previously, the ballbot would attempt to stay at the same spot. Sure it worked, but it was very difficult to implement remote control. My only attempt of remote control involved sending the target coordinates over bluetooth to the ballbot. This meant that I was only really controlling the target position of the robot, not the target velocity.

Sanyo projector teardown

So a few weeks ago I managed to get my hands on a Sanyo PLC-WXU700A for free. I tried getting it to work but the warning light would light up and the projector would just shut down. I was pretty sure it was fixable but I didn’t really need a projector anyway so I left it in my room for disassembly in the future.

Deriving the derivative

So I’ve finally managed to get the robot balancing well enough to be confident to push it around on tiles and not be afraid of it falling. The derivative term of the position controller seems to be helping a lot.

Bluetooth. You get what you pay for--usually.

So I’ve been using the RN42 bluetooth module (sold as the bluesmirf silver breakout from SparkFun), and was experiencing issues was experiencing issues with the module crashing whenever the data rate got moderately high. I was sending around 50 bytes of data from the module to the computer at around 200 Hz. The RN42 simply couldn’t cope and would stop transmitting data, though remain connected, after around two seconds. I even increase the baud rate up to the maximum of 230400 BPS and still did not see major improvements.

The new ball: an old ball

After more hours of tubing I decided that one of the biggest problems of the Ballbot was the hard and bouncy ball. So now, I’ve moved to using an old and deflated basketball that is rounder and dampens the vibrations of the wheels. Preliminary results are promising.

Ballbot Balancing -- but not very well

Merry Christmas everyone!

Finally - the hardware is almost complete

So the 18650 battery holders finally arrived yesterday. By drilling a few holes into the acrylic frame and battery holders, the holders could be securely screwed onto the robot.

Motors singing in harmony - Pachelbel's canon

Technically I did this last Saturday, but I was too lazy to upload the video with my ridiculously slow internet.

Omnidirectional control

Balancing the robot

Omnidirectional control

Balancing the robot

MPU-9250 Troubles

According to the InvenSense website:

Ballbot - Soldering the PCBs

So finally the PCBs arrived yesterday afternoon and I immediately got to work this morning. Not having access to a reflow oven or hot air station certainly wasn’t helpful when soldering the 0603 surface mount components, especially WITHOUT TWEEZERS!

Retirement of the PiBot

figure

The Ballbot Chassis

Just some pictures of when assembling the chassis:

Ballbot PCB - Part 2

So with a few modifications to the PCB design, here’s what I’m sending out for production.

Ballbot PCB - Part 1

So after spending a long time over the past two days designing the PCB of the ballbot, I realise I’m missing something.

Team PI's code is now open source!

If you don’t know, I’ve been programming soccer playing robots for three years now to compete in Robocup open soccer. I’ve also been heavily involved in the PCB and hardware design of the robots.

Ballbot Part 1

The ballbot is my latest project. The name was first coined by CMU in the early 2000s when they made the first “ballbot.” Till this day, the CMU ballbot remains one of the best, if not the best, ballbot alongside the Rezero (designed by a few undergraduate students at ETH Zürich) and BallIP (Tohoku Gakuin Uni).

Electrodermal Activity

So I first came across when the Embrace watch was launched on Indiegogo. Essentially by monitoring the resistance across the skin of a person, it is able to reliably detect seizures. Yes, the majority of seizure related deaths have causes that are unfortunately unknown and “just happen” (SUDEP), but even the slightest probability of someone alone having a seizure at the wrong place at the wrong time (such as a flight of stairs) can be extremely worrying for families. Various attempts and products have existed on the market utilising accelerometers/gyros to determine the event of seizures and message loved ones, but they often give off false detections and they require the epileptic to have clonic seizures (i.e. jerking).

Getting drag

When I heard that my maths assignment would be in part, about calculating the coefficient of air resistance of an object with and without a parchute (i.e. comparing the two), I couldn’t help but extend the assignment a bit further.

Robocup Junior 2015 Best Shot

So instead of uploading gigabytes of videos, here’s one of the best goals we scored in the competition.

Getting "yaw" bearing

If there’s one thing that’s popular these days, it’s quadcopters, and one of the obstacles in making a quadcopter is making it balance by obtaining roll and pitch. A simple google search will flood you with information on simple complementary, Kalman, Mahony and Madgwick filters. But what happens when you want yaw? After a bit of searching online and complementary filters (which were good enough for my application of a omnidirectional four wheeled robot), I couldn’t find a single source pointing to how to fuse gyro and magnetometer data together, and so I endeavored to approach the task from scratch. Currently, I’m using a LSM9DS0 but this should apply to all 9DOF imu’s.