|
|
|||
|
Thread OP
|
Build Log
Custom ship RC TX
As I've mentioned in a couple of other threads, I'm building a custom RC transmitter for the purposes of trying to "realistically" simulate the engine orders given from the bridge crew to the engine room via a simulated engine telegraph. In addition, we're trying to simulate the realistic delays in engine changes. Our application for this is specifically a 1:125 scale Lindberg "Blue Devil" Fetcher class DDS model. The transmitter will have adjustable engine speed scales that will allow it to be adapted and fine-tuned for the desired simulation of the desired ship.
The How: Engine orders will be given to the transmitter via 5" sliders (one for the port engine, one for the starboard engine) that are read by an Arduino Microcontroller. The user will not be controlling the transmitter directly. The microcontroller will be managing engine throttles at all times. The sliders will be divided in [STRIKE]6 [/STRIKE 8]ranges that correspond to: Ahead Flank Ahead Full Ahead 2/3 (added 1/15/2013) Ahead 1/2 (added 1/15/2013) Ahead 1/3 Stop Back 1/3 Back Full Let's say the port engine is currently at "Ahead Full", which equates to 90% throttle. If we suddenly order "Back Full" by pushing the slider to the bottom extreme, the microcontroller will slowly reduce throttle over time until it gets to zero. Once it hits zero, it will begin reversing the throttle slowly until 75% reverse throttle is achieved. The transmitter will have a 16x2 character LCD display that will display a number of different screens. But the primary purpose is to display the current port and starboard engine orders. When a new order is given, the appropriate order is shown on the LCD screen and the order begins blinking. Meanwhile, the microcontroller is adjusting the throttle behind the scenes to "reach" the new engine order. When the throttle reaches the commanded order, the order stops blinking on the LCD. How does the microcontroller control the throttles? The microcontroller will use integrated chips (IC's) called "digital potentiometers" that will replace the potentiometers and sticks from a hacked conventional transmitter. This allows the Arduino to control the inputs to the transmitter digitally. I plan to use dual-channel 256 step digital 10k pots, meaning I can independently control 2 digital potentiometer outputs from 1 chip vi the microcontroller. I can control additional channels simply by adding additional chips. Note that these chips also come in single-channel, quad-channel, and 6-channel. I have selected the Maxim DS1803 dual 10k pot i2c bus chips for this. UPDATE: 4/7/2014: Last month the circuit board from the HobbyKing transmitter failed for unknown reasons. Rather than order and hack another transmitter, I discovered that I could drive the separate 2.4Ghz radio module directly. This module has 4 wires going to it: +5V, GND, transmit signal, and PPM. The transmit signal must be supplied with +5V in order for the radio module to transmit. You can use it like an on/off switch. The PPM pin is connected to a digital I/O pin on the Arduino. The Arduino generates the PPM frame using some code that I found from another user here on rcgroups. Sound The transmitter will also have an MP3 player and speaker that is controlled by the micorcontroller. When a new engine order is given, you will actually "hear" the engine telegraph bells sounding for a second or two. Then you will hear a voice relay the engine order response from the engine room telegraph. And when the engine throttle reaches the ordered speed, you will hear a voice confirm this. Note that all these sounds will come from the transmitter, NOT the ship! Steerage We are also going to try to accurately simulate the ship's wheel. The transmitter box will have a small ship's wheel on it that will be connected to a rotary encoder. This essentially means the wheel can be spinned continously. Again, the user will not be controlling the rudder directly. For full rudder deflection to port, or example, it may require 5-10 full turns on the ship's wheel (or whatever we figure out is realistic). This means it takes time to turn the ship's rudders. The rudder position will be displayed on the LCD screen. I might also use a circular LED graph as a visual aid but haven't decided on this yet. How do I get out of trouble? Attempting realistic simulation is all find and dandy, but what if I have to rev the engines to full and get full rudder deflection instantly to get the model out of a bad situation? There will be a toggle button on the transmitter that switches it from "simulated" mode to "instant" mode. In "instant" mode, the sliders become direct-throttle controls with no delay. The rudder now only requires 1/2 turn in either direction for full rudder deflection. Why not just use a programmable transmitter? Well we could, but where would the fun in that be? Also programmable transmitters add to the cost. It's cheaper and probably easier for me to just hack a low-cost transmitter. Why not use specialized ESC's for slow engine throttle? Because it's not just about engine delays. We want to simulate actual engine orders as given by the bridge crew, and we want visual and audio feedback to these orders. Simply using specialized ESC's wouldn't accomplish this. Other factors We also wanted the ship itself to work with a regular transmitter if we need it to without any changes. For this reason, we could switch off our customer transmitter and switch on a regular unmodified transmitter and still operate the ship (assuming of course that it is properly paired with the receiver). Parts List (updated as of 2/4/2013): Transmitter:
Ship:
Update 12/29/2013: I created a Windows proof-of-concept simulation of the transmitter to show how the engine orders will work. It's written in C# and requires the .NET 4.0 framework. You can try this out for yourself if you'd like: http://www.hauntsoft.com/transmitter.zip Update 1/3/2013: I have written about 300 lines of code for the Arduino so far and have the slide pots being read and the engine orders being processed and displayed on the LCD screen:
Next step is to test the digital potentiometer chips with some LED's to show engine throttle output. |
||
|
|
Last edited by Skystream; Apr 07, 2014 at 11:21 AM.
Reason: Updated content and specs.
|
||
|
|
|
|
|
|
|
This sounds really cool. I'm looking forward to how this turns out. Here is a pic of the mod I did to my Futaba 6EX. Thread is here-
https://www.rcgroups.com/forums/show...1015913&page=7 |
|
|
|
|
Thread OP
|
Update 1/7/2013
I've added 4 tactile buttons and started implementing a simple menu system for the LCD display. The buttons will be labeled up,down,left,right. I might add a 5th button which would be a select button. When not in the menus, the LCD can be cycled through 3 "info" displays currently using the left and right buttons. In normal mode, the engine orders and the rudder position are displayed on the LCD. In "throttle" mode, the throttle % for each engine is displayed, and in "analog" mode, a value between 0 and 1023 is displayed for each of the sliders to show you the actual position of the sliders (for debugging purposes). I'll probably add more info screens as I think of them.
To access the menus, you press either the up or down buttons. So far I've only created 2 menus: Set Backlight and Set Contrast. These of course allow you to adjust the backlight brightness and the display contrast of the LCD. I should also mention that all of the settings in the menus will be saved to EEPROM whenever they are changed so that the transmitter remembers them when you next power on the transmitter -- even if the batteries have been removed. No video yet for this update. I will probably wait until the next update when there's more to show. |
|
|
|
|
|
|||
|
Thread OP
|
Update 1/9/2013
I did some more work on the ship transmitter and have a new video to show. The microcontroller is now hooked up to a dual digital potentiometer chip, and I have 2 LED's hooked up to the outputs of that chip as a test. I used the DS1803 chip which is an i2c bus, 10k 256-step dual digital pot. The night before last I tried using 2 SPI-based digital pots and I just could not get them to work. I like the i2c bus much better because I can run up to 8 devices off just 2 analog outputs from the microcontroller. It's good to have plenty of free digital I/O ports for other purposes. Also I can expand the digital I/O just by adding another i2c chip. Anyway, as the microcontroller is changing the engine throttles, you'll see the LED's slowly brighten and dim. 30% brightness = stop, 100% brightness = ahead flank, 0% brightness = full reverse. The output going to those LED's (1 for left engine, 1 for right engine) is what will actually be driving the real transmitter. I can literally replace each LED with 3 wires going directly to the transmitter for whichever channel I want to control. The existing physical pots would be disconnected and these 3 wries would connect to those wires. Also at the end of the video I cycle through the different display modes (as they exist currently) and I show you the LCD contrast and LCD backlight menus.
The next step will be for me to charge up the battery and hook up the receiver, ESC's, and motors and test the unmodified HobbyKing transmitter with the motors to make sure that all works. I'll put a piece of masking tape on the shafts so I can see them spin. After that, I could potentially begin taking apart the HobbyKing transmitter and wiring it up to the microcontroller and have it run the motors for real. I also still need to order a rotary encoder for steerage.
|
||
|
|
|||
|
|
|
|
|
Not sure where it is located there is a Master's school back East (New Hampshire maybe) where skippers pilot scale models of the ships they will captain later on (full scale). One of the things that they have is a delay in the response to engine orders and on the larger models, rudder commands. My dad went to the Navy equivalent of this school and he said it really helped with the San Jose (a Mars class fast replenishment ship, which had one screw (steam plant) and no bow thruster along with an enormous amount of topside windage due to her replenishment rigs.
|
|
|
|
|
|
|||
|
Thread OP
|
Update 1/15/2013
Sorry for the unusually dark & blurry video this time around.
I added a 24-step rotary encoder that will eventually take a ship's steering wheel and added the code to process the rotary encoder. The goal is to require the wheel to be turned multiple full turns (720 degrees) in order to get full rudder deflection (of about 30 degrees each way) as on a real ship. Also added an option to set the maximum deflection of the rudder in degrees. Will be adding an option to scale the resolution of the wheel up and and down so that the transmitter can mimic any ship or boat. Video also shows some of the other adjustments: ENGINE CHANGE SPEED (how quickly the throttle moves) ENGINE ORDER DELAY (number of seconds before order is acted on) REVERSING DELAY (number of seconds to pause before switching motor direction)
I'll be hacking the HobbyKing transmitter soon... I'm still waiting for the correct size bullet style connectors and XJ60 connections to be able to hook up the motors to the ESC's and the battery. We also added 1/2 Ahead and 2/3 Ahead engine orders. |
||
|
|
Last edited by Skystream; Jan 16, 2013 at 05:09 PM.
Reason: Fix video link.
|
||
|
|
|||
|
Thread OP
|
Update for 1/20/2013
This is a test of one of the RGB LED lights that I got. I hooked up the green and the blue components to a DS1803 dual digital potentiometer and hooked up the red component to one of the Arduino's digital I/O pins. This was just a test to see how it works. I added some code to make the LED follow what the port engine throttle is doing. When the engine is at stop, the light is red. When the engine throttle is forward, the light is green, and the brightness represents the engine throttle %. When the engine is in reverse, the light is blue, and again the brightness represents the engine throttle %.
I've ordered 2 DS1844 chips which are quad (4) digital 64-step potentiometers on a single chip. I'll use one for the left LED and one for the right LED. I may use the left over digital pot from each chip for something else. I still intend to use the dual 256-step chips for the actual throttles and for the rudder. One further note... The engine status LED's will be flashing when an order is being processed and the target engine speed has not yet been reached. This has already been coded, but I decided to turn it off for this video as made the changes in brightness easier to see. So who's actually following this thread? Just curious! |
||
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|||
|
Thread OP
|
Update 1/22/2013
Cool, as long as there are at least a couple of people interested, I'll keep posting updates. Here's the update for today:
I've added the RGB indicator lights for both engines, but I'm using dual digital pots to control the green and blue on each light and I'm using a digital I/O pin to turn the red component on & off. I'll be replacing these 2 dual chips with 2 quad 64-step chips. What this means is I'll be able to completely control the red, green, and blue components of each light with 64 levels of brightness for each component, and have an extra digital pot left over from each chip. I may use the extra digital pots on the extra channels of the transmitter for things like turret servos, signal lights, or whatever. My dad asked that the indicator lights blink while an engine order is being acted on but not yet complete. I also decided to have the lights alternate between green/red or blue/red when the engine order is for the engine to be stopped. It flashes between green/red when the engine is being stopped from a forward throttle, and it flashes between blue/red when the engine is being stopped from a reverse throttle. So the indicators are as follows: solid red = engine stop blinking red = engine stopped, new order being processed blinking green = engine is forward throttle, moving to new ordered speed solid green = engine is at ordered forward throttle blinking blue = engine is reverse throttle, moving to new ordered speed solid blue = engine is at ordered reverse throttle red/green = engine has been ordered to stop from a forward speed red/blue = engine has been ordered to stop from a reverse speed
|
||
|
|
|||
|
|
|
|
|
I've got to get this book.
|
|
|
|
|
|
||
|
|
Quote:
|
|
|
|
||
|
|
||
|
|
Quote:
|
|
|
|
||
| Similar Threads | |||||
| Category | Thread | Thread Starter | Forum | Replies | Last Post |
| Discussion | Simulator for our custom ship RC transmitter | Skystream | Scale Boats | 2 | Jan 02, 2013 09:42 AM |
| Sold | NEW 100mW Immersion RC 5.8 ghz TX $30 Shipped | nybeechpilot | FPV Equipment (FS/W) | 1 | Jun 06, 2012 11:34 PM |
| Sold | Immersion RC 600mW 5.8 TX Version 1 $50 shipped. | nybeechpilot | FPV Equipment (FS/W) | 2 | Jun 02, 2012 06:36 PM |
| Giveaway Wild Hawk RC Tx/Rx, Channel 08! (Free Shipping Too!) | kenzietech | Non R/C Items (FS/W) | 6 | May 02, 2012 08:25 AM | |
| Sold | Vintage Custom RC Aircraft/George Miller F-4 Phantom II kit $325.00 SHIPPED!! | stevster | Fuel RC Jets (FS/W) | 1 | Apr 19, 2012 10:32 PM |