Go Down

Topic: RC scale model of battleship Yamato (Read 256 times) previous topic - next topic

clarka22

Hi, I'm doing a personal project using arduino to convert a 1/350 scale model of the battleship Yamato to RC. I am using four 6V 450 mA motors for 4 propellers, a servo to steer, and a servo to control the front two turrets at a realistic speed. I'm using a flysky FS-i6AB reciever with a I6X transmitter. Due to lack options, i am stacking two ardumoto motor drivers on top of each other to be able to use 4 motors. I have access to multiple UNOs and only one Mega.

My difficulty is the code. All the codes ive found don't necessarily do everything i want to do. I'm still learning arduino code, and I have tried modifying codes ive found with mo luck. I'm really more of a mechanic than a programmer. It would be amazing if someone could help me out with this and how to execute this.

slipstick

If you have found code that does much of what you want but not everything then post it here and specify what it does and what else you want it do in some detail. If you can work out a detailed specification you can almost certainly get some help to achieve it.

At the moment I'm not at all clear why you need an Arduino if you already have an RC system which seems to me to be perfectly adequate to control everything you need.

Steve

clarka22

#2
Mar 21, 2019, 07:14 pm Last Edit: Mar 21, 2019, 07:16 pm by clarka22
I just thought I would try something different with materials I could access with out having to purchase them.

I can put the codes below. There are more but these two are ones I could get to. Im trying to have the flysky's channel 2 control the motors, channel 1 for the rudder (middle: 90 left full rudder: 47.5 right full rudder: 137.5), and channel 4 for the guns. I dont know how to accurately calculate the correct values put out by each channel on the receiver, nor how to utilize these values. The code to get the realistic speed of the guns interferes with the code to return values from the receiver, and I am unsure how to keep that speed while still having receiver values getting returned at the regular rate they should be returned.

vinceherman

#3
Mar 21, 2019, 08:54 pm Last Edit: Mar 21, 2019, 08:56 pm by vinceherman
The code to get the realistic speed of the guns interferes with the code to return values from the receiver, and I am unsure how to keep that speed while still having receiver values getting returned at the regular rate they should be returned.
I would suggest that something is using blocking code.  Likely the use of the delay() function.  The common fix is to learn to use millis.  But that would be guessing since I cannot see your code.  :-p

Edit: I am not sure what restriciton you are under with regards to the motor drivers, but Pololu has many to choose from.

vinceherman

Oh, and pics.  Seriously.  I want to see pics of your model.

slipstick

We can't really help much with code we can't see. But if you're trying to make a servo work slowly for your guns then using VarSpeedServo.h instead of the standard Servo.h will probably help.

There are loads of examples of reading RC receiver signals and then driving servos from them so that part is definitely not too difficult.

Steve

clarka22

Here are some of the codes I've tested. Some work to an extent, others not at all. @vinceherman I have one pic of it. Hopefully, that suits you.

clarka22

here is the pic of the model

slipstick

Here are some of the codes I've tested. Some work to an extent, others not at all. @vinceherman I have one pic of it. Hopefully, that suits you.
Four bits of code some of which (but you're not saying which ones) don't do anything at all doesn't really help.

Pick just the one that is nearest to doing something useful, which is what you will logically start with. Post that one and don't forget to say what it actually does and what you want to change or add to it.

Steve


wildbill

It sounds like you're going to have the Arduino act as an ESC for the motors and you need it to limit the speed of the servo traversing the guns.

What's the need on the rudder(s)? I'd expect that to be a simple mechanical linkage to the servo.

clarka22

I'm pretty sure this code is the closest to doing something useful. There is also a kit that I bought from eBay that included motors, prop shafts, rudders, and stuff to hook up servos. but, it's more difficult than I thought it would to hook the rudder servo up. Ill provide a link.


link to RC kit for this specific model:
https://www.ebay.com/itm/TAMIYA-1-350-Yamato-Battleship-Brass-RC-Upgrade-Kit/292584759259?hash=item441f691fdb:m:mkeQq_7gb6r_0rmXwlHinMA&var=591391718445

Keep in mind that on eBay there is an example config for the regular way to do this and vids on youtube for the example configuration. But I'm not doing the example configuration. There is also a picture with the contents of the kit for reference I guess.

Go Up