Jump to content

Search the Community

Showing results for tags 'arduino'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Tamiyaclub.com Forums
    • General discussions
    • Vintage Tamiya Discussion
    • Re-Release Discussions
    • Tamiyaclub News
    • Tamiyaclub Rules and Site Usage
    • Build Tips and Techniques
    • Monster Trucks, 4x4, Wheelie Rigs and Crawlers
    • Big Rigs and Scale Armour
    • All things RC Nitro
    • The Builds
    • TC Designs...
    • All things electric...
    • RC Racing Talk
    • Meetings & Events
    • Sales, trades & wanted
    • Off-Site sales plugs, tips & gossip - Including eBay, Gumtree etc.
    • Related sites
    • Suspicious Traders
  • Tamiyaclub Sponsors Forum
    • FusionHobbies.com
    • Stellamodels
    • Time Tunnel Models
    • Tamico.de
  • Other makes of RC model...
    • Kyosho
    • Marui
    • Nikko
    • Other makes
  • tcPhotos.com
    • About tcPhotos.com
  • The Outside World
    • Anything not RC related goes here

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


TC Subscriber

Found 4 results

  1. OK - here's another crazy project I "started" last week. Well, I say started, I actually started cutting code on it over 3 years ago, but had some problems, but it was based on code that I wrote well over 4 years ago for a big rig MFU. The main plan back then was to have full customisable sounds as well as lights, cruise control and inertia settings, but that proved a step too far for my brain and possibly for the processor on the Arduino Mega2560. Anyway, I was supposed to be in the workshop last Friday but I was having some trouble with parts in stock, so I ended up sneaking into the studio and digging out the old big rig MFU code. It took me a few hours but eventually I had it all stripped down to the very basics, and hooked up to a spare ESC and servo sitting on my workbench. So, what is it? Well, it's an Arduino Mega2560 microcontroller, which is about the size of a shorty 2S LiPo and can be bought for under £20. It's not going to scare a gaming rig, in fact its clock speed is about a thousand times slower than a Raspberry Pi, but it's more than powerful enough to make a simple MFU. OK, but what does it do? It acts as an interpreter between a radio receiver and the ESC, servos and lights of an RC hillwalking rig. I've set the receiver up to work in PPM mode - this is where all the receiver channels are sent down a single wire, so I'm only taking up one pin on the Mega. Reading the PPM pin requires the use of an interrupt, which for the non-nerds among us, means we don't have to waste processing time on the Arduino board waiting for the radio to do stuff - the Arduino can happily run its code and the radio tells it when it's sending a new signal. This all happens many times per second. Well, yes, but what does it actually do? It allows me (and, ultimately, you) to have various clever functions on our hillwalking rigs. OK, I called it the ScalerController, but it is more geared towards hillwalking. It might also work nice on a big rig layout, although I stripped out some of the rig-specific functionality because it was way too cumbersome. Right, OK, I've read a lot of words, but I still don't know what it does. Yes, sorry about that, it's like being in a work meeting. So, right now, as it stands, it has the following functionality: Reverse lockout / selectable reverse This is one of my favourite functions on the Beier truck units, but I implemented it on my big rig controller before I got a Beier. Basically, pushing forward on the left stick makes the rig go forward, but pulling back makes the brakes come on. Actually, officially, the ESC is a Hobbywing 1080 with a 100% drag brake, so what it really does is outputs a centre signal, so the truck stops. Pulling back on the right stick and release to engage reverse. Then push forward on the left stick to go backwards. Pull back to brake. This functionality probably isn't great on a technical crawler course but IME it makes regular driving much more intuitive. Inertia Independently configurable throttle / brake / deceleration inertia in both forward and reverse gears. Give it full throttle and it'll take a while to get there. Let go of the throttle and it'll coast to a stop. Pull back on the stick and it'll stop quicker. Pull full back on the stick to brake hard (output signal goes to centre, so the drag brake comes on). Inertia values are all configurable and probably need tweaking, but right now the concept works. I tested this on a layout with my Drag King truck back in the beforetimes and it made for some very smooth driving on the layouts. I'm looking forward to feeling how it goes on the trails. Using a 100% drag brake on my hillwalking rigs has been awkward, as we're usually moving at a brisk walking pace and letting go the stick causes the truck to jerk to a sudden stop. Some trucks will even roll forwards. Not great for the drivetrain. But a 100% drag brake is nice, because it stops the truck rolling away on hills. Cruise Control Push full forward and release on the right stick to engage cruise. Push forward on the left stick to increase speed, pull back to reduce it. Inertia rules apply here too, along with the selectable reverse. This should mean I can tweak the truck's speed to my current walking pace, which varies depending on fatigue, terrain, weather and inclination. Brake and Reverse Lights Pull back on the left stick and the brake lights come on. Engage reverse and the reverse lights come on. TBH that's all there is to it - I consider it a minor bug that if you pull back on the left stick when cruise control is on then the brake lights show, which probably shouldn't happen unless the stick is pulled more than half-way, but it's not an easy fix so I'll leave it for later. Plus - there is more planned for the future: Full lighting options - off / sidelights / dipped beams / roof lights / full beams. Ultimately the plan here is to have a powerful set of LEDs donated from a hiking head torch mounted on the roof of my Scania, which I can use to light my way when I'm walking. However, just like a head torch, it will be bright enough to dazzle other walkers, so I need to be able to turn it / down off from the transmitter. Rear floodlight - another torch light mounted on the back of the truck so I can see where my feet are going. Winch controllers - stick the MFU in winch mode and the right vertical axis becomes the winch controller. Although I may have to think about how to select reverse when the winches are in use..? Pass-thru switch - have a problem out on the trails? Buggy code making it impossible to drive? Flip the switch and it will revert to pass-thru mode. All the lights and winches will go off, no selectable cruise or reverse or inertia, just plain forward / back / left / right. OK, I've heard enough, where can I get it? Well, I don't have full installation instructions ready yet (and likely won't for a very long time) but if you know your way around an Arduino and you're happy to wire it all up yourself, you can find the code here: https://github.com/Mad-Ax/ScalerController It's still pretty messy as there's loads of stuff commented out from the old big rig controller, which will be tidied up as I finish various areas. Pull requests are accepted if you spot any bugs or have any ideas. It would be nice to know if this can be made to work on a Nano board, which is way smaller and cheaper, but I'm not sure it has enough interrupts. I tried to make it work on a Uno a few years back with no success.
  2. Hi Tamiya Retro Fans! About a month ago I got good advice here on my Traxxas Gearbox project. Thank you again! Well... it is more or less done! I went so far and replaced not only the gearbox but also the lower arms, uprights and axles with new Traxxas ones. The result is a MONSTER! But it works brilliant. Check out my first test Video. More videos will follow! The restauration as it stand now: - new TBG replacement body + MCI Racing decals - Light Kit - Cockpit with articulated driver head. - Gopro mount inside cockpit Hope you like the action!
  3. Following on from this thread, I think I'm now ready to start on the long and crazy path down building my own custom MFU using an Arduino Mega and some additional bits and bobs. Big shouts must go to @Ray_ve and @Nobbi1977 for their quick advice and useful info, without which I might have lost faith in the project and let it stall. So, what have I got planned, and will it all get done? Well, who knows for sure? This will be a fairly open-ended project and could keep me busy for a few weeks, a few months, or even a few years. I'm not 100% sure if and when I'll hit the limits of the Arduino Mega. I'm hoping I won't overflow the number of available inputs and outputs (the Mega has more than the Uno but I haven't done a complete count of my function list against the available ports yet), and I'm hoping I'll be able to buy a budget multi-channel handset that has the right number of the right type of switches (I have planned on using a lot of 3-way switches but my 6-channel Turnigy handset only has one 3-way switch, the rest are 2-way or dials). I don't know how easy it might be to swap out 2-way switches for 3-way switches on a budget radio - I'm guessing 'not easy'. So there may be quite a lot of re-thinking my inputs to get the functionality I want. Anyhoo, what does the project involve, and what am I hoping to achieve? Phase 1: Full lights - headlights, tail lights, brake lights, turn signals, fog lights, reversing lights. Driving modes - Off, Drive, Park. In Off mode, lighting will continue to work but no motor or steering input or other functionality will work. The throttle will be at the neutral position and ESC will have a drag brake, so the truck will not move. In Drive mode, the motor will drive the wheels and steering input will operate the steering servo. Park Mode will be much like Off mode and will not be used until a later phase. Gear select: I don't intend to use the Tamiya 3-speed gearbox. Instead I'll have a fixed ratio. Hopefully I can find a transmission that will do this so I can save some space under the cab, otherwise I'll fix the Tamiya transmission into 1st gear. Gear select will be a toggle switch so select Fwd/Rev (or Fwd/Neutral/Rev depending on handset functionality). In Neutral mode, the truck will not move when the throttle is applied. In Fwd, the motor will turn in a forward direction when up stick is applied. In Rev, the motor will turn in a backwards direction when up stick is applied. In both modes, the ESC will go into drag brake mode when the stick is pulled back. I may use a 'cruise control' throttle system here depending on how it feels on the layout. Phase 2: Engine sounds will be added. Other incidental sounds (such as brakes, compressor, etc) may also be added at this stage depending on how difficult it is to perform multi-channel audio operations. In Neutral mode, the throttle lever will cause the engine sound to rev but the motor will not turn and the drag brake will remain on. Phase 3: Additional functionality such as operating another servo for trailer legs, tipper, ramp, etc. will be added to the steering channel. This can be accessed by putting the truck into Park mode. Full additional sounds. There's lots of scope for additional stuff here too but I'll get to that later. I'll probably use a Hobbywing 1080 Crawler ESC. It's not the cheapest option but it can be configured with a strong drag brake and simple Fwd/Rev functionality. I didn't want to have to program around the awkward sometimes brake/sometimes reverse functionality on most ESCs and I hate that when in reverse, most ESCs don't have a brake, they just shoot forward. Using code I can make sure that pulling back will always stop the truck. I can also add some throttle profiling so it's not possible to go into full-speed fwd or rev to avoid any panic-inputs causing lots of damage on the layout. I may even alter the Park mode above so that the motor will continue to operate but at very reduced throttle and with the drag brake always on neutral. Obviously an ESC with an always-on drag brake isn't going to be easy to drive on the layout, so I'll add some throttle-off profiling to ramp the speed down gradually, or use a cruise control feature to keep the throttle in the last position until the stick is pulled back. Of course all this functionality needs a rig to power it, so I'll be building a King Hauler day cab from an NIB kit using Globe Liner chassis rails and a cut down cab. Truck build thread to follow once I've acquired some more parts and cleared up the workshop a bit Stay tuned - I'll be ordering some parts in the next few days and will start cutting code soon after that.
  4. Anyone using Arduino devices in an RC setting? What have you achieved, what pitfalls have you uncovered? Is it as easy as the tutorials etc. say and do you ever have random "why doesn't this build" / "why has it crashed again" issues or are they genuinely quite trouble-free and stable? I royally avoided the Raspberry Pi hype when they appeared on the market a while back - some friends of mine bought them with the intention of doing something edgy and cool and AFAIK never got them to do anything at all. IIRC they were quite expensive back then so it seemed like a lot of money and time spent for no result. I'd heard of Arduino but I thought it would be pricey so I've never looked into it. That is until I was thinking about some lighting / sound / functionality requirements for my next big rig build, and I decided to see if anyone else had done something similar and what was involved. Long story short, last night I ordered an Elegoo Mega 2560 R3 and an L298n motor driver, all for less than £20. Delivery is due tomorrow. For all the things I've thought I'd do (such as taking inputs from RC receivers, producing sounds, controlling motors) there's already someone doing it. There's loads of source code online that does a bit of what I want to achieve. It's all pretending to be suspiciously easy and I'm not sure if I've missed something somewhere. I did a bit of electronics at college but it was mostly theory work. I remember doing projects on the 741 op amp and the 555 timer chips, I'm pretty sure I had them in a breadboard at one point, but it was all so long ago, I can't remember if we ever saw any live results. We used some breakout boards at college that used Z80 processors, but they were the size of an ipad and wouldn't fit under an RC shell. Besides, they were programmed in machine code, and making them do anything beyond adding two numbers and saying "I've added two numbers" by means of an LED (which didn't actually list the value of the added numbers) took hundreds of lines of unreadable code. Anyhoo, here I am already thinking out loud about what seems possible, and it makes me wonder if the likes of Beier and Servonaut got onto this a while back and that's why they can offer so much programmability in such small packages. In fact I've wondered if a lot of the electronic stuff on the market now, which used to be very expensive and is now cheap as anything (e.g. light/sound modules), uses Arduino boards or custom boards based on the Arduino design. There's no complex circuits to design from scratch and no low-level code to write. Just a bunch of boards made up by the thousand and anyone who knows C++... I'm digressing. It occurred to me that I hate how the Tamiya MFU has such a terrible throttle profile, especially for reversing. In fact I hate how the Tamiya MFU still uses that awful "pull once for brake, twice for reverse with no throttle profiling at all" thing. Try letting a fully-loaded rig roll down a ramp, you can either use the brake just once and hold it on, or you can use it twice and watch as your rear wheels go into reverse and either jack-knife the rig or reverse it into whoever is coming down the ramp behind you. But that's OK, I can make my own throttle profile. In fact I can move to a Beier-style throttle system with FWD/BRK or REV/BRK toggled by a switch or other input. (OK, I'm not sure yet how to make a motor brake instead of reverse over PWM, that's something to investigate). I can program my own sound system to use the sounds I want the way I want them. Alright, I might have issues with available RAM for samples and I'm not sure how many output channels I can use for other effects, but hey... I'm not sure I want to replicate Tamiya's entire lighting functionality. That seems like a step too far. But for my next rig I probably don't even need that - just a simple toggle setup for headlights, maybe a toggle switch for indicators (I hate that MFU-01 indicators only work on full lock and MFU-03 indicators need that little wiggle input to turn them on), and brake lights off the brake input. I'm guessing the two most daunting parts to any beginner are wiring up the peripherals and writing the code. Well, I did a bit of electronics in my younger years - I've got a lot to refresh myself on and no doubt I'll blow a few LEDs along the way and maybe even let the magic smoke out of an Arduino chip, but at current prices that's not the end of the world. And I'm a C# coder by day - nothing I've seen so far in the code samples I've read phases me at all. I'd love to see what anyone on here has done Arduino-wise. I'll be sure to update this with my results once I've got my first board plugged in and doing stuff, and I'll add a proper project thread once I've decided what my first major goals will be
×
×
  • Create New...