Custom light controller for Spektrum receiver/ESC

This site may earn a commission from merchant affiliate
links, including eBay, Amazon, and others.
Thanks!

Cost depends quite a lot on quantity that I can justify ordering. I've made enough changes to the PCB that I'm going to do another small batch of 10 before ordering any larger quantity. I'm thinking probably somewhere around $15 for the PCB itself, and a bit more with the case.

If anyone wants one of the current boards, I've got a couple spare that I'll happily part with for cost of postage and some feedback.

One of the other things I've now sorted out is how to build a firmware file containing the software so that upgrading the software is trivial - just hold down one of the buttons as you plug it into a computer and it'll appear as a USB drive, and you then just copy the firmware onto it.
 
Thanks!

Cost depends quite a lot on quantity that I can justify ordering. I've made enough changes to the PCB that I'm going to do another small batch of 10 before ordering any larger quantity. I'm thinking probably somewhere around $15 for the PCB itself, and a bit more with the case.

If anyone wants one of the current boards, I've got a couple spare that I'll happily part with for cost of postage and some feedback.

One of the other things I've now sorted out is how to build a firmware file containing the software so that upgrading the software is trivial - just hold down one of the buttons as you plug it into a computer and it'll appear as a USB drive, and you then just copy the firmware onto it.
That's awesome. About how much does a small Led setup cost? I'd be willing to test this in a basher if you'd like that but I currently don't have the money for expensive LED lighting kits. Maybe in the future. Do you think you'll be updating the PCB board in the future? Or is this one pretty solid? Great work though 👍. And just to be sure it does work on a non smart setup right? Thanks!
 
...
I've now sorted out is how to build a firmware file containing the software so that upgrading the software is trivial - just hold down one of the buttons as you plug it into a computer and it'll appear as a USB drive, and you then just copy the firmware onto it.

That is Fantastic!
Definitely a Bonus Feature!!

Thanks!

Cost depends quite a lot on quantity that I can justify ordering. I've made enough changes to the PCB that I'm going to do another small batch of 10 before ordering any larger quantity. I'm thinking probably somewhere around $15 for the PCB itself, and a bit more with the case.

If anyone wants one of the current boards, I've got a couple spare that I'll happily part with for cost of postage and some feedback.

...

Count me in!
I would be happy to 👍

I am currently designing several custom 3D parts for a totally Radical new rig that I think your LC would work really well in..
Please PM me and let's discuss details.
 
That's awesome. About how much does a small Led setup cost?
Good question. LEDs themselves cost next to nothing, it's a question of how much you spend on making them fit. You can get generic LEDs with mounts that will fit a body shell for not much on Amazon.
Do you think you'll be updating the PCB board in the future? Or is this one pretty solid? Great work though 👍. And just to be sure it does work on a non smart setup right? Thanks!
I'm hoping the boards I'm about to order will be pretty final. With 3 input channels and 6 channels that should be enough for just about anything. The ones I've got currently are two input + four output, which should be loads unless you want turn signals, as you can use the two inputs as switch from an aux channel, and throttle for brake lights.

I think pretty much everything else I can thing of changing can be done in software, which as above, will be easy to update. These boards do work fine with non-Smart stuff. Some stuff works a little bit differently, and it's got multiple modes for determining when the brake lights come on.
 
A little while since I've posted an update on this, but I've been making some good progress.

Good news - the new PCBs arrived today, and unlike the first batch they're fully assembled apart from the input/output pins.


IMG_20220316_151422.jpg


Bad news: plugged them in and they didn't work. A bit of probing and I discovered I got some product codes muddled up and the resistors on the USB data lines that should have been 27 ohms are actually 1K.

Good news: I swapped the resistors on one of them and it sprung into life and seems to work perfectly otherwise, so I've got some more fun time ahead with a soldering iron and a microscope. Glad I only ordered 10...

IMG_20220316_234101.jpg


The new boards (left) have one more input channel, and two more output channels, and slightly smaller than the previous ones thanks to downsizing a few components.

They also have the option of adding an external power supply for the LEDs, so you can run the LEDs at a different voltage to the BEC, or draw more current than the BEC will allow.

I've also been doing some work on the software, adding some additional lighting modes (I owe you an update @Tex Koder). The only problem is that the menu system for configuring it all is getting a bit out-of-hand. I've been trying to find an easy way to edit the configuration via a computer, and I had a bit of a breakthrough this week when I discovered that there's a new feature in Chrome and some other browsers that lets a web page talk directly to a serial port, so it'll soon be possible to just plug the controller into a computer and configure it via a web browser.

I think this also opens to the door to making it a useful data-logger for a smart ESC, as it solves the problem of how to get data off the device.

Bad news: the ESC in my Felony died at the weekend, so I've no longer got a smart ESC to test with :(
 
I finally got round to doing a video to show the latest features, including how the controller can now be easily configured from a computer via USB.


Fortunately I'm a bit better at coding and electronics than I am at making videos! I've got some more ideas and updates planned which I'll post soon. Likes/subscribes on the video would be appreciated.
 
"the most over-designed and over-configurable RC light controller in the world" that pretty much sums it up.... great work
 
"the most over-designed and over-configurable RC light controller in the world" that pretty much sums it up.... great work
:) I'm not done yet!

Your board inspired me to dig out the accelerometer board that I was playing with originally, and I've already got an updated design for the PCB that squeezes in an accelerometer/gyro chip.

I've also been toying with an idea for adding an option for it to control a servo as one of the outputs, and also possibly controlling smart LEDs. Too many ideas, not enough time!

What I don't have at the moment is any working RCs :(
 
dig out the accelerometer
I think you'll be suprised with how much vibrational "noise" there is from that brushless motor jumping between magnet poles... I was looking into buying the accelerometer in chip form but ran into 2 problems. All of them use a footprint that would make it impossible to hand solder, and secondly no one had any in stock....

Here is anonther feature idea, we were out this past weekend but I had the grandkids with us, so I turn down the speeds . I was thinking what would these boys think is cool and it hit me that I should put a controllable smoke trail on my Typhon, like the cloud jockeys do with the airplanes.....
 
I think you'll be suprised with how much vibrational "noise" there is from that brushless motor jumping between magnet poles...
Possibly - I was hoping the low pass filter might help with that.

The place I've been using for PCBs (JLCPCB) has stock of a few different variants and can do the assembly, but I'm not going to order any boards until I've had a chance to try out some stuff with the prototype.

Smoke trails would be cool! I've no idea what hardware is needed for that.
 
it just occured to me, based on your talent for writing code, what the oop in oops stands for.....
 
:) It's not what I was thinking of when I chose it, but I have to say, I am still amazed by the fact that I can buy a microcontroller for $1, and run interpretted, high level OO code on it directly. A bit different from the PIC16x84s I was using when I last played with microcontrollers.

My Felony is getting replaced by an Infraction and I've already got an idea for a new feature: ESC temperature alert so the lights start flashing if the ESC temp exceeds a set threshold. Hopefully it'll save the ESC from the same fate as the last one.
 
Seeing as I was ordering some PCBs for my next project, I decided to get another iteration of the light controller done:

IMG_20220514_152224.jpg


Quite a few minor tweaks, including an accelerometer squeezed in between the two buttons, an input for a thermistor for measuring motor temperature, an output that can be configured to drive a servo, and a change to the layout of the pins so that a) it's impossible to plug connectors in the wrong way, and b) there's enough space to use 3 pin connectors on the outputs.

I haven't tested it properly yet, but have stuck the firmware on it and it boots OK.
 
Nicely done.

Wish I had tried to look for this thread sooner. As I was thinking of doing the same but making something a bit more versatile than what you and Liposhirly are doing. Think lights, IMU, temp, voltage, current, rpm, SD data logging, GPS, and Bluetooth. To add telemetry to basic control setups, and if someone wanted to figure out the big companies' telemetry stuff worked then we could see about sending the data to those controllers.

Also, just curious, why did you go with an RPICO vs a standard micro?
 
Adding data logging is on my to do list. When connected to Spektrum kit, it's got access to ESC RPM, temperature, current, power and battery voltage. The boards have 2MB of flash, of which more than half is free, so you could log a reasonable amount there, although obviously at the moment you'd need to plug in a USB cable to access the data.

By standard micro I assume you mean Arduino? I have to admit I've never done much with Arduinos, but I went with the Pico because they're cheap, can run Python, are stupidly easy to use and have more than enough ports for what I need. They're also extremely well documented, so building a custom board around the RP2040 processor was actually pretty easy.
 
Yeah, I was referring to micro in the sense of Arduino, etc.

I just double-checked and if you wanted to try Bluetooth or wifi by switching to say an ESP32, it does support programming via micro python.
 
The ESP32 does look very interesting. If I ever do a bigger redesign I'll definitely look at using it, as wifi and/or BT would be nice to have. I've also got a GPS module that I've been meaning to test out for ages. And one of the many other ideas I've had is getting the module sending some telemetry to the receiver. Too many ideas, not enough time :)
 
I ordered some Esp32 and ESp32- cam boards yesterday.

I also have a GPS module I need to use, sadly everywhere I have a PC sitting at work or at home is too enclosed and I get no GPS signal to test.

Also as a tempting idea, ESP32 supports OTA programming I think on all of the models but it depends. Therefore as long as you aren't doing a board revision you can update the software over wifi.

Would be happy to collab on making an all-around RC unit that offers drop-in light control and data logging. Think we could add in signal injecting so that the unit acts as a middle man to add stabilization to an RX with no imu in it. But, I'd save that for near last as reactive kinematics is a pain.
 
I'd certainly be up for collaborating. Looking at the specs for the ESP32 I suspect that most of my existing code will just work. The one thing that's actually specific to the Rp2040 currently is the use of PIO to measure pulse widths but I'd be surprised if the ESP32 doesn't have some way to do it.
 
Use a timer, trigger the timer to start on a rising edge then capture and store the value of the timer on a falling edge then reset the timer, or set the timer to be the size of 2 full frames and just use an API command to read the value of the timer on each of the other channels falling edges. You would of course have to do some math this way to subtract the previous channels to get a specific channel's pulse width time.

For example, you could start the timer at 1 second, then specify a channel to start the timer on a rising edge then the next time that rising edge is detected capture the time, store it, stop the timer, then update the timers period to be 2x that period and block the logic that performs that period capture so that you don't run into issues once it has been set.

The idea behind this is because I don't think EVERY RX produces the same timing, by having the timer "calibrate" to 2x the Rx's period it would be more applicable to more receivers especially those off-brand FrySky clones, and by locking it into 2x you could create a fail-safe option.
 
Old Thread: Hello . There have been no replies in this thread for 90 days.
Content in this thread may no longer be relevant.
Perhaps it would be better to start a new thread instead.
Back
Top