Flicker lights on R1 changed to use MOSFET
This builds on my previous post: http://www.wiltshire.net/2017/10/29/flicker-lights-for-the-r1/
The auxiliary lights project on the R1 continues, tonight I’ve completed the transition from the physical relay unit to a MOSFET power transistor – the relay was limited in terms of how quickly it could switch given that it relies upon a spring to return to it’s normal state. In comparison, if I selected the appropriate MOSFET, these are intended to switch reasonable currents at high frequencies.
I’m drawing 3A at 12V in total, through both sides of the LED lights. This is well within the switchable current for a MOSFET. I chose a 5v switched (TTL voltage level) unit, capable of switching 30A.
There were a couple of programming changes, and some re-work inside of the box on the bike. My first attempt to re-wire it (which required using the soldering iron again on the existing Arduino board) ended up overheating the Arduino and I killed it. So, having to re-do this, I decided to do it properly this time and to mount it in sockets rather than solder it directly onto the breadboard.
The video below shows the setup and the lights working at their higher 35Hz frequency. 8ms off, 20ms on… There’s a section where it’s been filmed in slow-mo @120fps, and it’s being replayed back at 30fps. – Slowed down x4 for you to see the flicker.
If they don’t see me coming now, then there’s nothing which will. 🙂
This is a proper flicker now, it no longer looks like a “flash”. I’m happy with the outcome, it was never my intention to set out to create flashing lights on my bike – that would get me into trouble – surely…
Code for this and the circuit design has been posted here: https://www.tinkercad.com/things/0f1WlpV6k4T
It should be noted that they don’t provide Voltage Rail or other abstract components for their diagrams, so the only way to show the headlight and high beam voltage inputs was to add them as ‘power supplies’.