Jump to content

Search the Community

Showing results for tags 'arduino'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome Guest!
    • Click here to Sign Up
  • Chit Chat
    • Introductions & Welcomes
    • The Lounge
  • News
    • RC News
  • General RC
    • General RC
    • General - Electric
    • General - Nitro
    • General - Petrol
    • RC Pics & Videos
  • Model Type
    • Monster RCs
    • Buggies, Truggies & Stadiums
    • Scale Crawlers & Replicas
    • Rock Crawlers
    • Large Scale RC's
    • Short Course & Desert Trucks
    • Micro & Mini
    • On-Road & Drifting
    • Rallying
    • Vintage
    • High Speed RC
    • Bodyshells & Painting
  • Air and Marine
    • Drones / Multi-Rotors
    • Planes / Gliders / Helicopters
    • Marine
  • Meet Ups
    • Bashing and Meetups
    • Racers Talk
  • For Sales Area
    • For RC Sales
    • Off-Topic For Sale
    • Member Feedback

Categories

  • Model News
  • Hop-up News
  • Accessories News
  • Industry News
  • Site News
  • Sponsor News

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Facebook


Twitter


Instagram


YouTube


Location


Interests


RC Cars


How did you find this forum?


eBay Username

Found 1 result

  1. Background is that I was looking into a proper light controller for my TRX-4, but couldn't find anything suitable. I think my expectations were way too high for what is currently provided. Then searching the web I found some guys using Arduino to control RC cars. I taught myself some basics in the last week and found that the Arduino could very well satisfy my expectations. Now I came up with this idea: ( Even though I do it for my TRX-4, I think it can be used on any RC car ) Hardware: - Arduino Nano (Compatible) - Breakout Board (just to avoid soldering anything around the circuit) - Darlington Transistor Array ( I don't to connect LEDs directly to the Arduino ) - 4 Channel Pocket Remote Control with 4 receivers - Photosensitive Sensor with adjustable sensitivity - Traxxas Light Kit for my TRX-4 G500 - Some Jumper cables - 12 pin JST plug as connection between the chassis and the body. The Inputs are: - Remote Control Channel 1 - Remote Control Channel 2 - Remote Control Channel 3 - Remote Control Channel 4 - Photosensitive Sensor - RC Throttle (CH2) - RC Steering (CH1) - RC Transmission (CH3) - RC Diff Lock Front (CH4) - RC Diff Lock Rear (CH5) And the Outputs are: - Daytime Driving Lights (The 5 LEDs below the Headlights ) - Headlights (connected to PWM out to control brightness) - Taillights (connected to PWM out to control brightness) - Steering Left (3 LEDs) - Steering Right (3 LEDs) - License Plate (2 LEDs, Future Option) - Reverse Light - Rear Fog Light - Third Brake Light (5 LEDs, still need to order) - Roof Lights Front (From the kit and my added extra ones) - Roof Light Rear (not for me though) - Horn (goes as RC signal to my ESS-Dual Soundsystem) General Logic: My plan is to always let the " Arduino Loop" run without any interruptions. That means I will not use the delay() function or any hardware interrupts. But rather constantly reading the inputs and always adjusting the outputs according to my logic. That way I can achieve something like a parallel processing and no output logic prevents other output from being changed. My logic: The main logic will be controlled by the throttle. Once pressed the state goes into ignition on. And it stays on until the throttle has remained in neutral for a certain time (10s). I got that idea from the ESS-Dual. The engine sound turns off after stopping for 10s. Without "ignition" being on, no lights will work except the hazard light. The second most important item will be the photosensitive sensor. It defines if it is dark enough to turn on the headlights automatically. Once dark, the headlights and taillights will turn on at 50%. License plate will also turn on. The sensor has a small dial to adjust the sensitivity as desired. Remote Control Channel 1: I use it for high beam. It means that the headlights will be on at 100%. The front roof lights will be on. The rear roof lights will be on if the car is reversing. If low beam is on then the button functions as toggle on/off. If low beam is off the button functions as lights on while pressed. Remote Control Channel 2: This is for Hazard light Once pressed, all the indicators start blinking. Remote Control Channel 3: This is for the rear fog light. Once pressed, the rear fog light will turn on. I addition the headlights will turn on as if it would be dark. Remote Control Channel 4: When pressed a RC signal is sent to the ESS-Dual sounding the horn. LEDs: Daytime Driving Lights: They will be turned on when ignition is on. Headlights: 50% when it is dark or fog light on. 100% when Remote Channel 1 pressed. Special logic when the light sensor goes to dark and the low beam headlights are turned on: Simulate the ignition of Xenon headlights: Flash, off, slowly dim from 0% to 50%. Taillights: 50% when it is dark or fog lights on. 100% when car is braking. The state of braking is defined like this: Ignition must be turned on and throttle is in neutral. An Enhancement could be to measure the speed in which the throttle goes from driving into neutral. If it fast enough brake lights will go on as well. Steering: A rather complex logic. Steering full left or right and back to neutral within 1s: Start the indicator. Turning opposite to the indicated direction: Off Turning into indicated direction beyond a certain value and back to neutral: off. To control the blinking without stopping the flow of the program, the state of the LEDs need to be constantly adjusted. On for a certain amount of time, off for a certain amount of time. Hazard Lights: Just turn on all indicators. Reverse light: Will be turned on once reversing and if the ignition is on. Front Roof Lights: Will be turned on together with the headlights in high beam mode. Rear Roof Light: Will be turned on when the car is reversing and headlights are in high beam mode. Demo Mode: Switch Gear, All Diff Locks on, then off again, Switch Gear within 1s. All the LEDs will be blinking randomly and sounding the horn. So far I have defined my logic as pseudo code in clear English. Tonight I will start programming. What I have not yet found out is how I handle trimmed RC channels. Once trimmed the signal values will change and impact my logic. For example trimming the throttle could cause the "ignition" to be always on. I guess I have to create some code for calibrating every time the car is turned on. Unless I attach an additional memory module to the Arduino to store the trimmed values... Let's see. I could also start calibration mode with the sequence applied to the RC transmitter like with the demo mode. Lastly the hardware connections: Arduino outputs are 5V with 30mA max current. It is somewhat unsuitable for LEDs. 5V would kill LEDs without resistor and 30mA allows only a single LED to be connected. The solution are transistors. Since I have multiple LEDs a prepared Darlington transistor array board with pins is the easiest solution. All the LEDs from the Traxxas kit come without resistors because the kit comes with a 3V power supply. The outputs from the Arduino will only trigger the transistors in the array. The transistor array is then supplied with the 3V from the power supply and then powers the LEDs. My setup is in a way that no soldering is needed. Once everything is connected I will put everything in a box and seal it watertight. Some essential hardware is already on the way to start testing in the coming days ( Arduino, breakout board, push button, 1 LED, some cables )
×
×
  • Create New...