Thread Tools
Sep 22, 2014, 12:51 PM
Registered User
4x4_RC_Pit's Avatar
Hi Luke !

Confirmed, the new software version is running well. Good work !

I just have to edit some values in AA_USER_CONFIG.h, simple as it is.
Compiled, saved, uploaded, radio setup executed, tested, it works.

I hope you don't mind that i like my new LED_DEBUG so much haha

        if (DriveMode == FWD)  { digitalWrite(RedLED , LOW ) ; digitalWrite(GreenLED, HIGH) ; }
        if (DriveMode == REV)  { digitalWrite(RedLED , HIGH) ; digitalWrite(GreenLED, LOW ) ; }
        if (DriveMode == STOP) { digitalWrite(RedLED , LOW ) ; digitalWrite(GreenLED, LOW ) ; }    
        if (Braking == true)   { digitalWrite(RedLED , HIGH) ; digitalWrite(GreenLED, HIGH) ; }
Sign up now
to remove ads between posts
Sep 22, 2014, 10:38 PM
Registered User
LukeZ's Avatar
Thread OP
Thanks Peter for your tests. This circuit has been posted here for three years but I haven't received much feedback until now. I'm very glad you've helped me improve it (and fix it )

I'm glad you feel free to modify the code! That is what I like to see. My intent was to provide a solid foundation that others could modify for their own needs.

If you install the circuit in one of your trucks I'd love to see a picture!
Sep 27, 2014, 08:50 AM
Registered User
4x4_RC_Pit's Avatar
Picture ? Who on earth want's pictures. Here's a little video for you...

Open Source Lights on Arduino / RC-Car Light Controller (1 min 10 sec)

Sep 27, 2014, 01:04 PM
Registered User
LukeZ's Avatar
Thread OP
Very cool Peter! Thank you so much for posting that. I love your truck! Very nicely done.

That's an interesting light scheme, I need to learn more about crawlers. It looks like brake lights are always on when stopped (I guess that's the drag brake?) and hazard lights blink on reverse?

I think when I designed it I was thinking of touring cars, but as you see, it is easy to change to any type.

OSH Park has shipped my new boards yesterday so when they arrive I will solder one and let you know what I think. I'll try to shoot a little video too, with a truck of my own.
Sep 27, 2014, 01:25 PM
Registered User
4x4_RC_Pit's Avatar
Yes Luke, always on when stopped. You can't buy that feature in the market.

Because those cars are not coasting at all, there are no brakelights during coasting, instead when stopped. the "warnblinker" (german word for hazard lights -> whats new for me) is just a test, but i think it's looking good. like heavy trucks in reverse mode do. tomorrow we meet in wuppertal for a "crawling session", i will see than if my light configuration is practical.

Luke, i have a question: in a future version will it be possible to have more channels than 3, perhaps 4 or 5 ? also it would be very fine to have a stop-mode in the configuration table so to set the LED's in states when car is stopped. i know that this has an impact to the hard- and software, but i'm sure that we can handle this challenge together

For now, i am very happy with OSL ! Thank you again
Sep 27, 2014, 02:11 PM
Registered User
LukeZ's Avatar
Thread OP
Those are two good requests.

1) Add stop mode - this should be an easy change in software, I will work on it this weekend.

2) More channels - this one is not so simple. Of course we only have three inputs on the board right now. If we want to add more channels without changing hardware, we could plug in a PPM stream (or a PPM Encoder if your receiver doesn't have PPM out) into the throttle channel (which conveniently is also external interrupt INT0). Then you could read up to 8 channels with a software change. But PPM Encoder is more money and they will not ship to Germany (but it is open source so you could make it there).

The other option is to change the OSL board to allow more channels in. Of course then you have to buy new boards and build them, etc... Also software now is using Arduino PulseIn command to read the RC channels, but this is slow. We get away with it because we only read 3 channels and also because we are just controlling lights, not something critical like motors. I think the software would have to be changed if we start putting in more channels.

Right now I am working on a different open source project, and I don't have time to re-write the code of OSL for more channels. It would be easy to add a few more pins to the board (5 channels) and upload to OSH. You could build it, but someone would have to spend time on the software.
Sep 27, 2014, 04:23 PM
Registered User
LukeZ's Avatar
Thread OP
Peter - I uploaded a new version of the code in the first post. I am going to start giving these codes version numbers, this one is v1.7.

  1. New state = Stop: In the setup table in the AA_Light_Setup tab, there is a new column for Stop. You can set any light to any setting that will occur when the car is stopped. For example if you want a drag brake, set your brake lights to ON in the Stop column. NOTE: This replaces the BrakeAtStop definition a few posts up, since it would be redundant. This method works better and gives you more flexibility.
  2. New LED debug: Peter, I liked your LED debugging scheme better than mine, so I made yours part of the official code. If LED_DEBUG is set to true in the AA_UserConfig tab, the two LEDs on the board will behave like this: Green on in forward, Red on in reverse, both off when stopped, both on when braking, Green blinks fast in right turn, Red blinks fast in left turn.
  3. Conditional turn signals: This one has been bothering me for a while. Turn signals are cool, but they look silly when driving around. There is a new setting in the AA_UserConfig tab called "BlinkTurnOnlyAtStop". If you set this to true, the turn signals will only blink if your car is stopped, but not while driving. I think this looks more realistic.
Last edited by LukeZ; Mar 21, 2015 at 04:04 PM. Reason: Updated LED debug to include blinking on turn.
Sep 28, 2014, 11:28 AM
Registered User
4x4_RC_Pit's Avatar
Luke, these news are very good news !
You are my inexhaustible source of good ideas ! Very welcome

Why is it that you are so creative and fast in programming and deployment ? i think that's also your 9to5 Job, isn't it ?

I'am very glad that we have the STOP-State now. Makes some things easier to understand for OSL-Rookies.

Wow, you like my LED-Debug ! I feel highly honored about this

And the "BlinkTurnOnlyAtStop" is the new feature, making OSL indispensable for every single RC-Freak in the world

Thank you Luke, i will download the new version soon and give you a feedback.
Sep 29, 2014, 03:22 PM
Registered User
LukeZ's Avatar
Thread OP
Hi Peter, yes, I do some programming for my real job, but sadly not Arduinos or microcontrollers. Maybe some day, these are more fun!

One other idea I had to increase the number of channels. If you are willing to give up turn signals, you can attach your 3 position switch to the steering channel, and then another switch (2 or 3 pos) to Channel 3.

For the 3 position switch on the steering channel, put light settings in the Right Turn and Left Turn column. When the switch is in the middle position, it will be nothing. In other words, it is a 3 position switch, but you will only be able to use 2 positions and the middle will be off. You can still use this 3 position switch to enter the change-scheme mode (flip the switch back and forth several times).

Then for channel 3 you can use another two-three position switch as usual.

This would require no changes to software, but you should do the Radio Setup again. In the end you still get forward, reverse, stop, and brake, plus two switches. You lose turn signals, but on a model turn signals are not very important.

Just an idea!
Sep 30, 2014, 06:05 AM
Registered User
4x4_RC_Pit's Avatar
Very clever, Luke. I understand all your points.

Sure, giving up turn signals is a valid option.

Needless to say: we need a 4 channel transmitter to do so, because we can't use throttle or steering channel for anything else then throttling or steering

i hope i find some time in the next days to get familiar with the new features.
next friday is a non-business-day in germany because it's reunion-day, yeah !

i'll be back
Sep 30, 2014, 01:20 PM
Registered User
LukeZ's Avatar
Thread OP
I have been using the FlySky GT3B radio, about $35 US online. With a hack mod it can transmit up to 8 channels, great for extra lights and such.

However there are not many convenient switches on it. I have a truck that uses 6 channels and I think I will change to a regular two-stick aircraft transmitter (9X). All the toggle switches are easier to use. For fast race cars a pistol-grip radio is better, but for a slow crawler it doesn't matter.

My OSH Park boards arrived yesterday so I will solder one up this week and let you know what I think.

PS: I'd love to see a picture from one of your crawling sessions!

PPS: Happy Unity Day!
Sep 30, 2014, 02:42 PM
Registered User
4x4_RC_Pit's Avatar
Yes, that's one of my next projects, but i prefer the GT3C, because it has a 1S Lipo installed and the problem with the "self switching" power button is solved. But it's not as cheap as the GT3B. About 47 Euro's here. We have some very good documented threads in our forum, will help me a lot.

I also looked after the "flyer-radios", but i have been told that these radios are not able to let the motor go reverse. not sure if it's true. we need a centering throttle stick. throttle sticks are often just moving in one direction, you know what i mean ?

Loads of pictures from our latest session last sunday morning here, just scroll down there for more:
Sep 30, 2014, 03:02 PM
Registered User
LukeZ's Avatar
Thread OP
You are correct, the throttle stick on a "flyer" radio does not center, but the other stick (usually aileron/elevator) does center. You only need to use one stick for a car so we just use the aileron/elevator stick. Most radios let you swap the centering stick left to right for user preference (Mode 1 vs Mode 2).

But anyway for most cars a pistol radio is best. The GT3C is very good! You will have fun hacking it, it is an enjoyable project.

The forum requires me to login to view the pictures so I can not see them. I will just imagine how nice it was!
Oct 01, 2014, 11:56 PM
Registered User
Hello, LukeZ. I am a RC car newbie in the hobby. I have poor programming skills, little arduino experience, and one RC drift car. However, I decided to make my own lights controller like you, and have been browsing the web. I am happy to get your source code, but it is not working well. According to my logger GetThrottleCommand function has some problems for my system. I do not know exact reason.

I have arduino uno r3 and seeeduino v3.0, 4ch RX / 3ch TX and ESC(ch2) and servo(ch1) by futaba. Of course, I tried both of micro controller, and I could control the servo, but could not contorl the ESC, because ch2 signal displays ch1 pulse. Could you let me know if you know the reason or clue?

FYI, I think that it could be better to replace pulseIn function to attachInterrupt function by PinChangeInt library for reading 3 more different pulse width.



Quick Reply

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Arduino Nav Light Controller chuck99z28 DIY Electronics 65 Mar 23, 2019 06:25 PM
Discussion Linux Based Open Source Control System (OSRC) Gizmoman31 UAV - Unmanned Aerial Vehicles 10 Mar 18, 2012 11:26 AM
Idea Linux Based Open Source Control System (OSRC) Gizmoman31 Aerial Photography 9 Mar 18, 2012 11:25 AM
Question Any open source ARM based multi roter heli? ctrl Multirotor Drone Talk 7 Jul 20, 2011 05:44 AM