• Welcome to RCCrawler Forums.

    It looks like you're enjoying RCCrawler's Forums but haven't created an account yet. Why not take a minute to register for your own free account now? As a member you get free access to all of our forums and posts plus the ability to post your own messages, communicate directly with other members, and much more. Register now!

    Already a member? Login at the top of this page to stop seeing this message.

16mHz Steering Micro-Controller (4WS/Crab/RWS) Build

Hydrocarbon92

Rock Crawler
Joined
May 13, 2016
Messages
618
Location
SoWIs
I recently got into the crawler hobby with a Redcat Everest-10 I purchased from scottyshobby.com, along with the parts needed to make it 4WS and some Proline Interco TSL SX tires. Initially I just used my old Clodbuster rear servo (MG996R), which is modded for reverse rotation. The place I crawl at has some tight corners & ledges, so I either had to ditch 4WS or buy a controller. I decided to just build my own!



I started with an Arduino, which uses an Atmega328 chip running at 16mHz. To put that in perspective, the original Playstation ran at 33.8mHz. The biggest problem was reading the receiver (FlySky FS-GT3C). I figured out how to use an old library (backend code) for reading it, then wrote more code to alter the outputs sent the servos. I looked at the Bastens and HeyOK controllers for ideas.

Here's a video of the original controller:
https://www.youtube.com/watch?v=tmHEIJZGIFA

The original has 3 modes: 2WS (default), 4ws, and crab-walk. RWS isn't on it because this version only controls the rear servo. To change the mode, I just press the 3rd channel button. On this controller it's a 2-position channel, so the controller just senses if the position has been changed. There is zero lag due to how the signals are read & sent.



I got another Arduino to add to my Clodbuster, which let me re-write the code a bit. First I changed it for a reverse rotation servo, second I added RWS mode (directly controls both serovs), third I got it to read the steering trim. That was one of the reasons I didn't choose one of the off-the-shelf controllers. The HeyOK has manual trim pots and the Bastens only applies new trims to the rear after a power-cycle. My new code lets me adjust it while in 4WS mode, applying it instantly to that mode. I still have to power-cycle it for the other modes, but I have plans for that.

YKTSE9G.jpg

Ajuegz0.jpg

OHMw1nM.jpg


The wiring between the body posts is the UBEC and lighting power supply, the bundle past the battery strap is for the steering. It can take up to 3S voltage and I protected it against reverse polarity too.
 
A lot has changed in the past 3 months. I got a used Axial Wraith & converted it to 4WS, but the aluminum links I used have almost no adjustment available. My steering kept getting uncentered from our "king of the hill" battles & rough crawling, so I've done some re-coding along with many hours of crawling tests.

I have the Arduino powered by the ESC's BEC (along with the receiver) and the servos each have separate 3A UBEC's running 6.0 volts. So far I've never had a brown-out. It's also survived LOTS of mud.


The HUGE difference is the new programming. It now has a trim-programming mode using the on-board EEPROM memory (similar to FLASH memory). Once set, the settings will be saved even if I power it off - and don't use it again for YEARS. Each bit of data can be read or written about 1 million times, meaning I'll wear out the rest of my truck/radio before the memory.

Programming mode is entered by holding the steering full lock (left or right) for half a second w/in the first 2 seconds. It lets you adjust the front and rear separately AND set the radio's neutral point. Adjustments are 24% either way (+/-120ms), more if endpoints are below 100% - roughly 1.5 teeth on a 25T servo. The mode has 5 steps:

1) center the steering trim & wheel then confirm by pressing ch3 button
2) front trim only, set via trim or wheel then confirm by pressing ch3 button
3) rear trim only, set via trim or wheel then confirm by pressing ch3 button
4) same as #2, duplicated in case the rear was badly off in step 1
5) same as #3, duplicated to match a new setting in step 4

https://www.youtube.com/watch?v=Ueta3kTsuZk

After I made the vid above I changed the code again. You can bypass a programming step by turning the wheel past 80% left & pressing the ch3 button or you can cancel programming completely (revert to previous values) by holding it past 80% right & pressing the ch3 button.
 
Thanks. Arduino code can be learned by anyone, one example is my friend who's a tow truck driver figured it out enough to make his own multi-light flash bar for his truck.
 
Hi #Hydrocarbon92,

Fantastic work, but... What is that board? Is there a possibility to get your FW? I don't see any links to FW nor to any instructions...

P.S. Just found a board - it looks like Funduino PRO Mini. :)
 
Last edited:
Back
Top