While my Tindie QR Clock fundraiser is underway, I thought I'd take the opportunity to post an update on another project I'm working on.
Remember this guy?
Reflecting on Reflectors
If you recall, the last time I talked about my longboard wheel display, I had pretty much given up on the whole concept. The main issue was providing an inexpensive and robust method for detecting the wheel's velocity. I had previously tried using an IR reflection sensor which worked fairly well for a short demonstration.
The reflector was attached to the wheel's axel and stayed stationary as the circuit board rotated around it (more detail/pictures in the other post). There were two main problems with this strategy. Firstly, the reflector was pretty far away from the proximity sensor. In order to successfully bounce an IR beam off the reflector and back into the sensor, I needed to boost the IR LED's power by quite a bit. By the time I got it working, the LED was drawing about 15-20mA of current which rapidly killed the battery.
Secondly, the shape of the reflector didn't really give me much leeway when it came to different wheel shapes/designs. Longboard wheels aren't standard, and if I was hoping to make a universal display that fits all shapes, I wasn't going to do it with that reflector scheme.
Shortly after I finished up writing that blog post, I went to see a movie. By the way, if you want to see a block buster movie on opening weekend, it helps to go alone. You show up 10 minutes before the movie starts and still get the best seat in the house.
Walking home, I turned my phone back on and noticed a new comment from reader MarkS. He suggested making a flange that stemmed outward in the direction of the axel. Such a device would work in virtually any wheel and could be easily modified to fit by the end user. The best part is that rather than being used as a reflector, it could actually be used as a beam-break. This would drastically reduce the amount of power required.
If you don't quite understand what I'm describing, read on.
Considering there was only a small change from my last design to accommodate a new sensor, there was very little different between my new PCB and the original one. I wasn't too keen on the prospect of spending the afternoon etching exactly the same thing over again, so I opted to instead get the PCBs made this time.
Someone I met at a party (yes, I talk about Electrical Engineering at parties, shoot me) recommended I try out Seedstudios. They offer an incredibly cheap PCB printing service. They save money by combining multiple smaller orders into one big one that they ship off to a CM to print all at once.
What it means is that I got 10 fairly high quality PCBs for just $30 including shipping. Of course, they didn't ship for over a week, but that still isn't that bad considering the price.
The quality wasn't flawless; My new beam-break sensor has a oddly shaped asymmetrical alignment post. They tried to create the corresponding slot in the PCB by drilling two small holes, but they didn't quite get it right:
You can sort of make out on the top left and right of that hole that the back end is supposed to be square. This is to fit the sensor:
I can't really fault them though. It's an incredibly small slot and a very cheap printing service. In the future, I'll probably just bore the slot out into a larger hole and indicate alignment using a silkscreen label. For now, the hole was easily "repaired" with some careful razor blade work.
When flipped upright, the beam break sensor has a horseshoe shape. You can just barely make out the slot containing either the LED or phototransistor (they look the same) in the image below:
The principle is that the LED keeps the phototransistor turned on until something passes through the horseshoe and blocks the signal. The small gap between the LED and sensor means that a very small amount of power is required to keep the phototransistor turned on. I managed to pull this off with just 3mA of current. That's almost 1/6th of what I was using before.
Of course, now I needed a proper beam-break, so I flew to Arizona and picked up some fruit punch.
I really wish they sold the stuff anywhere outside of Arizona...
Soda cans are a great source for really cheap and really thin aluminum sheeting. I measured the thickness of my can to be about .004 inches. While I was originally only planning on using the can as a temporary solution for my prototype, I later reasoned that I could sell the unit with a set of instructions for the end user on how to make their own beam-break out of a can. This would reduce production costs.
Using a pair of scissors, I cut the soda can into a wrench-like shape:
This easily fit between the nut and washer on the wheel's axle:
I designed the circuit board so that the aluminum flange should be exactly flush with one side of the nut. This ensures that it doesn't extend too far outwards radially where it could get caught in the wheel.
After screwing down the nut, I cut the beam-brake down to size so that it fit inside the sensor without touching the sides or the bottom:
It took a few tries to get the length and positioning right. I imagine this thing would need to come with some kind of cardboard guide to help the end-user determine the appropriate length.
With everything assembled, the unit worked! I didn't take any pictures of it or anything because it honestly looked exactly like the old one. I didn't even need to change the firmware.
The biggest problem with this solution is durability. The axel of a skateboard (or in my case Freeline Skates) undergoes a lot of stress as the texture of the ground causes it to vibrate. I found that these vibrations were enough to bend my thin slice of soda can.
The sensor's gap is only 2mm wide, so even a small misalignment was enough to cause the sensor to strike the beam break and bend it entirely out of shape. I found that just a minute or so of relatively smooth riding indoors was enough to cause this to happen. The rhythmic ticking sound of the sensor striking the aluminum was a dead give away. Also, given that the beam-break was located under the PCB which was attached with adhesive, it was incredibly difficult to re-straighten the beam-break without use of a pair of tweezers.
The obvious solution would be to make the beam-break out of a thicker metal, but I'm afraid that if I make it too durable, a minor misalignment would cause it to destroy the sensor. I'd rather have the beam-break bend.
Besides, I'd be loosing the benefit of the DIY aluminum can solution. I looked into some online laser-cutting services, and it looks like making something like what I need could cost up to $1-2 a piece for orders of over 100. That's simply too much to add to what is otherwise a very low BOM cost.
So I'm already on the 3rd generation of this thing, and I'm still not satisfied with the solution, but I think I'm getting closer. On the original post, reader Derek Lewis left a comment suggesting that I try a Hall-effect or magnetic sensor and use a small magnet instead of a reflector or beam-break. I originally overlooked Hall-effect sensors as I assumed that they were too pricey, but after some research, I found some that were actually cheaper than my optical sensors!
Also, reddit user cypherpunks suggested that I change the current-limiting resistors of my LEDs to reduce the amount of light that the inner LEDs give off. Given that they won't be moving as fast, they don't need to be as bright. This could further increase the battery life of the light. I'll have to roll that suggestion into the next revision.
I still have 9 more of these PCBs, so I might keep playing with different beam-break materials to see if I can increase the durability, but I'm still glad that I've got a few backup ideas anyway.