1/16 Elefant Ludwig/Asiatam
Re: 1/16 Elefant Ludwig/Asiatam
OK so two hurdles done. I can read 'PWM' signal on one channel on the NANO, and now I can control WT588D with 3 wire SPI. These are only the basic steps in a long long process, but at least it's something.... and in a relatively cheap and small package. 20$ for the NANO and 2$ for a WT588D 8mb. Not sure if either will be big enough, but the WT588D gives me about 2.5 min of 16000Hz mono sound, which I think sounds good and is way more memory than needed for accel/decel sounds, and the NANO processor should be able to fit the program and run it fast enough in 3 wire using signal interrupts.....
One nice thing about the adafruit FX sound card is that it has easy loop control built in, whereas the WT588D , I think, has to key a 're-play' to loop a sound track...... But it starts up fast so hopefully, no 'blank sound skips.' 5 sec total play interval on each track...
https://www.youtube.com/watch?v=9iBhJSw ... e=youtu.be
One nice thing about the adafruit FX sound card is that it has easy loop control built in, whereas the WT588D , I think, has to key a 're-play' to loop a sound track...... But it starts up fast so hopefully, no 'blank sound skips.' 5 sec total play interval on each track...
https://www.youtube.com/watch?v=9iBhJSw ... e=youtu.be
Last edited by xrad on Sun Aug 19, 2018 2:51 am, edited 1 time in total.
Re: 1/16 Elefant Ludwig/Asiatam
OK...so got this little bit working. Can read PWM (PPM) single channel input to arduino NANO. PWM signal can be monitored via Serial Monitor in arduino IDE. I only want one channel for throttle sounds. And now I can also activate and LED when > 1.7msec and another LED when < 1.3msec. So far, code only uses 8% of NANO. The hard part is going to be developing the WT588D setup and 'case' code for each sound byte and inserting that where the LEDs currently are. I can easily resolve .5msec steps for very smooth throttle up and down via the NANO. How quickly these will translate into playing a sound file, we will have to see...
There is a lot on the net about creating PPM/PWM to run servos and motors off UNO/NANO, but relatively little on how to work the other way. I suspect this will take a while to figure out and link to the WT588D like I want.
Not all NANO boards have pins labelled same way. I used D2 as input PIN 2, A1 as outlow LED pin 15, and A3 as another LED outhigh pin 17. Also, baud at 19200 seemed the best for speed and resolution, w/slight print delay of 100 ms. LEDs have resistors.
basic code if anyone interested:
https://www.youtube.com/watch?v=8ykUJzQ ... e=youtu.be
There is a lot on the net about creating PPM/PWM to run servos and motors off UNO/NANO, but relatively little on how to work the other way. I suspect this will take a while to figure out and link to the WT588D like I want.
Not all NANO boards have pins labelled same way. I used D2 as input PIN 2, A1 as outlow LED pin 15, and A3 as another LED outhigh pin 17. Also, baud at 19200 seemed the best for speed and resolution, w/slight print delay of 100 ms. LEDs have resistors.
basic code if anyone interested:
Code: Select all
// Basic sketch reads RC PWM (PPM) input pin 2 and
// when greater than 1700msec led pin 17 out HIGH
// when less than 1300msec led pin 15 out HIGH
// can check pulse width millis on serial monitor
int PWM = 2; // pwm input
int outhigh = 17; // LED pin to blink
int outlow = 15; // LED pin to blink
int duration; // Duration of the pulse
// setup serial and input, output pins
void setup()
{
Serial.begin(19200);
pinMode(PWM, INPUT); // PWM input pin
pinMode(outhigh, OUTPUT); //LED Blink pin, using the build in LED on pin 17
pinMode(outlow, OUTPUT);// LED Blink pin, using the build in LED on pin 15
}
void loop()
{
duration = pulseIn(PWM, HIGH);
if (duration > 1700)
{
digitalWrite(outhigh, HIGH);
}
else
{
digitalWrite(outhigh, LOW);
}
if (duration < 1300)
{
digitalWrite(outlow, HIGH);
}
else
{
digitalWrite(outlow, LOW);
}
Serial.println(duration);
delay(100); //delay so you can read the scrolling output
}
- Raminator
- Warrant Officer 2nd Class
- Posts: 1309
- Joined: Tue Aug 11, 2015 9:57 am
- Location: Newcastle, Australia
Re: 1/16 Elefant Ludwig/Asiatam
Interesting stuff xrad, it's nice to see someone delving into the electronic side of the hobby! Looks like you may be able to end up with a cross between the TBS mini and the Open Panzer sound card, in terms of functionality.
Re: 1/16 Elefant Ludwig/Asiatam
Hi Raminator, Yes you are right on. Made a major direction change. Instead of the WT588D, I am now using a TSUNAMI. I am hoping to combine a robertsonics tsunami with a teensy micro-controller. The teensy has awesome processing speed and plenty of ram for this project. I could probably get away with running it on the NANO if I directly hook up triggers like cannon fire or MG from OPTCB board. The OPTCB is already configured to work w/SBUS and the OPsound card code is provided on github, so this may be easy to link the OPTCB output signal to trigger the Tsunami, or I might have to go through the teensy/nano.
Or maybe at first, I would only use the NANO or similar to decode the throttle portion of the sound trigger and send serial code to the Tsunami to trigger accel/decel/full throttle/idle sounds and get that down. while the OPTCB or HL outputs like cannon fire or MG or lights could activate the other sounds.
This does defeat the purpose of 'minimal' wiring and serial control simplicity. BUT, the Tsunami sound card is excellent and has built in fade, overlap, volume control, and 14 track polyphonic capability, and hard switch trigger and serial trigger, which no other sound card has for under 100$ and without serious coding. This would make for the ultimate throttle up and down sound. Works using standard class 10 SD card too. It is really a matter of getting the triggers all set up on the NANO or teensy, or combining triggers to sound card and micro-processor.
will see, right now i'm stuck trying to get the teensy installer working w/arduino IDE......
Or maybe at first, I would only use the NANO or similar to decode the throttle portion of the sound trigger and send serial code to the Tsunami to trigger accel/decel/full throttle/idle sounds and get that down. while the OPTCB or HL outputs like cannon fire or MG or lights could activate the other sounds.
This does defeat the purpose of 'minimal' wiring and serial control simplicity. BUT, the Tsunami sound card is excellent and has built in fade, overlap, volume control, and 14 track polyphonic capability, and hard switch trigger and serial trigger, which no other sound card has for under 100$ and without serious coding. This would make for the ultimate throttle up and down sound. Works using standard class 10 SD card too. It is really a matter of getting the triggers all set up on the NANO or teensy, or combining triggers to sound card and micro-processor.
will see, right now i'm stuck trying to get the teensy installer working w/arduino IDE......
Re: 1/16 Elefant Ludwig/Asiatam
Size comparison jagdtiger to elefant.
Some more deck details including countersunk 1.2mm bolts(scale hardware)...trying to get as close to post refit OEM as possible...without going nuts...
Most of the mini brass hinges these days are pre drilled and the holes are too big, or the brass is too thin for scale armor. And I hate making hinges, so I ordered some vintage thick 8mm undrilled brass hinges for front fenders off ebay....
Some more deck details including countersunk 1.2mm bolts(scale hardware)...trying to get as close to post refit OEM as possible...without going nuts...
Most of the mini brass hinges these days are pre drilled and the holes are too big, or the brass is too thin for scale armor. And I hate making hinges, so I ordered some vintage thick 8mm undrilled brass hinges for front fenders off ebay....
Re: 1/16 Elefant Ludwig/Asiatam
Some more details. Hinges trimmed and drilled for the front track guards. Rivets and pins formed. Sometimes I am picky, so each hinge is composed of 3 barrel sections, with the single barrel located at the 'top' plate (oem), and the rivets scale size. Springs are wound and super-glued so that they do not stretch out. Made 6 wing nut tow cable retainers (4mm wing nuts from scale hardware). Main gun travel lock installed (rough 3D prints on thingiverse in my Elefant Tank build). And a few other things checked off the list....
Re: 1/16 Elefant Ludwig/Asiatam
Working a bit on code this am. I was able to get the PWM input read by arduino nano. So first pic is showing IDLE throttle up to FULL THROTTLE(serial monitor skipped a step due to speed of stick movement and display speed). I have the PWM decode currently stepped like this, in ~100msec increments, for simplicity:
FULL THROTTLE (stick full UP)
Accel 3
Accel 2
Accel 1
IDLE (stick centered)
Accel 1
Accel 2
Accel 3
FULL THROTTLE (stick full DOWN)
But that is only going to be good for engine sound. I really need to decode SBUS packets for16 channels so that I can link an action with a sound. SBUS is more difficult to decode for me as I have '0' knowledge on the byte info. I don't think that I can 'program' the robersonics Tsunami to do what I want since it is really designed to work off serial/midi/or switch triggers. OPTCB has 'open' code on github so maybe I can find the triggers from the board and run that to the Teensy, then trigger the Tsunami. Or I can use a 'Y' harness and split the SBUS signal from the radiolink Rx and run to OPTCB and the Teensy. Seems redundant but I really want to get the Tsunami working as it may be the best sound card for under 100$.
First pic is of the PWM decode, and second pic is of 16 channel SBUS data.
FULL THROTTLE (stick full UP)
Accel 3
Accel 2
Accel 1
IDLE (stick centered)
Accel 1
Accel 2
Accel 3
FULL THROTTLE (stick full DOWN)
But that is only going to be good for engine sound. I really need to decode SBUS packets for16 channels so that I can link an action with a sound. SBUS is more difficult to decode for me as I have '0' knowledge on the byte info. I don't think that I can 'program' the robersonics Tsunami to do what I want since it is really designed to work off serial/midi/or switch triggers. OPTCB has 'open' code on github so maybe I can find the triggers from the board and run that to the Teensy, then trigger the Tsunami. Or I can use a 'Y' harness and split the SBUS signal from the radiolink Rx and run to OPTCB and the Teensy. Seems redundant but I really want to get the Tsunami working as it may be the best sound card for under 100$.
First pic is of the PWM decode, and second pic is of 16 channel SBUS data.
- Attachments
-
- Arduino Nano decode of PWM
- PWM NANO DECODE.JPG (61.8 KiB) Viewed 3939 times
Last edited by xrad on Fri Aug 17, 2018 10:42 pm, edited 2 times in total.
- midlife306
- Warrant Officer 1st Class
- Posts: 2238
- Joined: Sun Aug 27, 2017 10:34 am
Re: 1/16 Elefant Ludwig/Asiatam
Oh I wish I understood any of your post, sometimes it’s frustrating being a mere mortal 
Cheers
Wayne
Sent from my iPhone using Tapatalk

Cheers
Wayne
Sent from my iPhone using Tapatalk
Re: 1/16 Elefant Ludwig/Asiatam
Hi Wayne,
If you can load an avatar, then you can do this. Just need a small processor like a Trinket or an Arduino Nano, a way to edit/ program it (the blue/green Arduino IDE in the pics above), and some code. Adafruit website offers the best tutorials(better than robotshop, arduino, robersonics, pololu), easy 'links' to what you need, and cheap quality products. The best thing to do is get one of their basic kits like :
https://www.adafruit.com/product/2290
C/C++ is the basic coding language that they use, and to get some lights flashing, the code is really simple. You will have to download a few 'libraries' and cut and paste (or create you own code) to begin with, so that when you 'compile' your code, the 'tables' and 'operating loops' are loaded to the mini processor. The key is that these mini processors run the code from beginning to end in a 'loop,' at least in these simple programs. After you write a few, you can kinda see how they work.
What I am trying to do is beyond what I know so it is a challenge. Specifically, trying to convert SBUS into a usable 16 channel signal for the sound board. This requires an 'SBUS' library that will allow me to create the output code I need. But there are many factors including parsing the bit sections correctly, and timing them, and then creating all the 'cases' that are needed to make an effect (run a digital switch ) on the sound card. BUT, I think I have a shortcut! Will see......
If you can load an avatar, then you can do this. Just need a small processor like a Trinket or an Arduino Nano, a way to edit/ program it (the blue/green Arduino IDE in the pics above), and some code. Adafruit website offers the best tutorials(better than robotshop, arduino, robersonics, pololu), easy 'links' to what you need, and cheap quality products. The best thing to do is get one of their basic kits like :
https://www.adafruit.com/product/2290
C/C++ is the basic coding language that they use, and to get some lights flashing, the code is really simple. You will have to download a few 'libraries' and cut and paste (or create you own code) to begin with, so that when you 'compile' your code, the 'tables' and 'operating loops' are loaded to the mini processor. The key is that these mini processors run the code from beginning to end in a 'loop,' at least in these simple programs. After you write a few, you can kinda see how they work.
What I am trying to do is beyond what I know so it is a challenge. Specifically, trying to convert SBUS into a usable 16 channel signal for the sound board. This requires an 'SBUS' library that will allow me to create the output code I need. But there are many factors including parsing the bit sections correctly, and timing them, and then creating all the 'cases' that are needed to make an effect (run a digital switch ) on the sound card. BUT, I think I have a shortcut! Will see......
Re: 1/16 Elefant Ludwig/Asiatam
OK, so found my 'easy button.' An rmilec 16 channel SBus to PWM converter(green board w/black chip in pic). Why do I need that? Because the OPTCB decodes Sbus and not PWM. So now I do not have to code for SBus, but just use the converted signal. Had some trouble with common ground, as in, if you don't have one, the signal is all messed up. Common ground now and all is well. So in first pic, there is the Rx, putting out SBus signal, which goes to the rmilec, gets converted to PWM, then to arduino nano , which holds the program to run the Tsunami sound board. Now, there will be more wires between the rimlec and the nano(or Teensy) for all 16 channels (if needed, but at least 4-6 for throttle sounds, and a few more for MG, cannon, and other effects). But still , the whole package is not too big...
Second pic shows the PWM signal is getting to the Nano from the rmilec, same as it did when hooked to Rx in PWM mode.......So that means I can just use a 'Y' cable from Rx sbus out to the rmilec and the OPTCB.
All of this is probably a big time waster, but still fun to figure out the puzzle.
Second pic shows the PWM signal is getting to the Nano from the rmilec, same as it did when hooked to Rx in PWM mode.......So that means I can just use a 'Y' cable from Rx sbus out to the rmilec and the OPTCB.
All of this is probably a big time waster, but still fun to figure out the puzzle.