Introduction: Bike Rear Light
I was asked for several times details on the rear bike light PCBA I made and I thought I summarize everything on a web page.
First of all : why ?
I do not like to re invent the wheel, but …
When I picked a Cateye TL-LD570-R, it seemed to be a very nice product. http://www.cateye.com/en/products/detail/TL-LD570-R/
Why? Because :
- it is automatic, I do not need to swith on/off. When ambient light conditions going under certain level, it starts to work, if it sense vibration
- it integrates a reflector, which is
a, a very useful thing
b, mandatory to have on the road
- it runs on AAA batteries. Not LiPo built in what is the fashion nowdays, what does not like cold and needs extra care, charging etc. but the good old battery, what you can replace on the road (I mean, not while cycling :-)
- it is built with very nice quality, the plastics are well designed and made. Just Cateye quality.
- the holder, the bracket and the clamp works great. I had Trelock and Blackburn lights also, I prefer the Cateye’s holder.
what is the problem? Two things :
1, the movement sensor is a cheap mechanical sensor, not a MEMS. I believe just simply not good enough for the job. It is O.K. to put it in toys etc., but come on, it is a life critical product! Friends told me sometime that hey, your rear light does not work. First I though battery problems, but it became obvious quickly that it is the sensor. The problem is, the threshold level is unreliable. It happened that I started gently from traffic light for example and it did not start. Other times it does sense very light movement. For me, it is VERY annoying. Safety first, and this way I can not rely on it.
2, it eats up the battery while on standby or off. I had several rear lights and have other TL-LDxxx lights, but never had one what eats the battery like this. At the beginning I thought it is a battery problem, but when measured the current consumption, that is when it became clear. I can not imagine how. Microcontrollers consumed a fraction of it even a decade ago. How they could design a light eating this much at standby, …. no idea. The problem is safety again. I just do not have the habit to change the battery in every few weeks and I did started sometime with no rear light, the sun went down and I had to go to a petrol station to buy batteries. Of course, cost of the battery is also annoying, but safety first. On the pictures you can see the consumption : 0.55uA on the traditional rear light, 127uA on this one :-(
I asked local Cateye distributor to please exchange it to the manual type, what I can use in a good old way and it is reliable than. It was promised, but never happened.
At a point I got upset, and I decided O.K., I make my own control.
thought what I want from it is :
- reliability, I have to be able to count on it
- much lower off and standby current consumption
- about the same, or a bit higher light output
- similar flash pattern, which grabs attention, but not annoying, like some Blackburn.
- when ambient light goes high temporary, it should not switch off immediately, only after some time, like 30s. A car behind can light right into the sensor, I do not want it to switch off.
- when movement stops, it should not go off immediately, only after a time. Like 1-2 min. If I stop at traffic light, it should not go off.
- similar light radiation angle/pattern. I do not like the focused ones. What if the car is not coming from straight behind you? I prefer wide angle, even 90degrees to the bike it should be visible.
- breaklight, above certain velocity into the break direction, let it switch to quick flash mode (IMPORTANT! I do not say this is legal. I could not find out. I take no responsibility if for example police would stop you and say it is not legal!)
For housing, finally I decided to put it into the smaller house. Into the TL-LD135-R house. That is because by that time I had very good experience with reflector stickers, so the reflector became less an advantage and I like smaller lighter things on bike if possible. Plus, I had some older TL-LDxxx lights too at home, what I could convert. Later, I realized it might have been a bad decision, because to fit into the small house what I want is challenging.
By that time, I already had experience with some MEMS sensor like LIS302DL and ADXL345. Much better experience with the second, so I decided it will be based on AD MEMS sensor. I had a look, and realized there are even better ones, like the ADXL362. If you decide to make it, start sourcing with this component. It might not be easy.
- TEPT4400 light sensor. I have used before, worked fine.
- ADP195, because current consumption is an important aspect, I did not want to start experimenting how to do with discrete elements, I decided I pick this because it promised low current consumption and low level of problems :-), and it was cheap too.
- PIC18F14K50, because I have experience with PIC18, standby current is very good. It is an overkill for the job for sure, but I do not know smaller ones. The 8 pin controllers are not enough. I do not know in between.
- Cree ML-E leds, I just picked based on specs. It is an overkill too. If I would choose again, I would choose smaller footprint ones.
The PCBA design is challenging, at least for me and on 2 layers with normal PCB manufacturing parameters. It is very important to mention, it has problems!
- the switch is on the wrong side. I just simply overlooked it. I manually drilled 0.4mm holes to put 2 wires through, soldered the positioning legs and glued the switch down with epoxy.
- there are traces under the battery clip, where it is touching the PCBA. I use capton tape to insulate. Not the best thing, but works. (by the way, the finished PCBA is conformal coated).
- to manual solder the components on is not easy, the order matters!
The good thing is, I made it more than a year ago now, and it works very reliable (after extensive sw development). Battery consumption is great. I only switch off, if I carry the bike in the car. In the garage not. In winter, if I do not use the bike for a month, no problem, it works on the next ride.
I could not reach the specified current consumption, but I did not go further to investigate how to reduce, because it is already ages better than the original. Normally I would be maximalist, but I went into difficulties going further.
If you decide to copy it, feel free to do, but, consider the following :
- the PCBA design is very dense, it is a very narrow stripe I had to put it on and it is not perfect
- it is not a good project if you are a beginner, not at all. The LED soldering is not straight forward (not a big deal either, but I used hot air to get good result), ADXL is in a small LGA package.
- remember, worst case, your life can depend on it!
- I do not take ANY responsibility for the design. Do on your own risk if you decide to do.
If you recognize the challenges on the pictures and know it is not a problem for you (soldering of the LEDs, the ADXL, just beside other components, hacking the switch to the other side etc.) think that is not a problem for you, I encourage to do it because it is just ages better than the original one.
If you have question, let me know, I try to help.