Mega Pin . | Output |
22 | #8 - Benedini Prop 1 |
23 | #7 - Benedini Prop 2 |
24 | #6 - Benedini Prop 3 |
25 | #5 - Recoil Servo |
26 | #4 - Barrel Elevation servo/ESC |
27 | #3 - Turret Rotation servo/ESC |
28 | #2 - Right Tread servo/ESC |
29 | #1 - Left Tread servo/ESC |
Now another ? It is about the 4 types of transistors used in the TBC. How sensitive types are they? I would like to use transistors who is non-smd types.Torben your English is very good and I understand you perfectly. The values of the MOSFETs/transistors used on the TCB are not crucial.
I plan on using a pair of HobbyKing X-Car 45's for ESC's. Where would I plug them into the Mega? The same pins as listed in the TCB Pinout?See this post from earlier in this thread (http://openpanzer.org/forum/index.php?topic=16.msg97#msg97). Right tread ESC goes to pin 28 on the Mega, left tread to pin 29. These pins are for the signal wires to the ESCs. Both ESCs will also need a Ground connection to the Mega, which you can get from various places on the Mega board. Whether you connect the +5v from the ESC to the Mega is up to you. You could do so and use the ESC to power the Mega (connect the +5v from only a single ESC, not both). Or if you power your Mega directly from your main battery then leave the +5v from both ESCs disconnected. Either way you are going to have a real rat's nest of wiring!
If using the Mega, would it be IR battle capable (with the battle apple of course) or would this function be limited to the TCB?You could connect an Apple to the Mega and you would be able to receive hits, but to send IR you would need additional circuitry because the Mega doesn't have the power to drive the IR LED directly (at least not with any kind of range). You don't need a lot, just a transistor/MOSFET and a few resistors, but again you start to really get into a wiring mess.
And finally a general question about the TCB; is it compatible with the DBU? http://darkith.dyndns.org/~darkith/html/dbu_inst.shtml (http://darkith.dyndns.org/~darkith/html/dbu_inst.shtml)All the various "apples" operate the same way, so yes you can use the DBU with the TCB as long as you connect it properly (easy to do on the TCB since every pin is labelled on the bottom of the board). You can also use the Taigen apple (http://www.taigentanks.com/taigen-tank-parts/tag120098) which is dirt cheap but doesn't have indicator LEDs, there is a photo of it wired to the TCB on the IR page in the Wiki (http://openpanzer.org/wiki/doku.php?id=wiki:tcb:tcbinstall:ir).
I ask because is far less expensive than the Tamiya system and may appeal to those willing to engage in a project like this anyway.
Having no experience with arduino's, could you suggest:
1) a vendor/manufacturer of preferred board with as many components which would make the transition minimal hassle?
2) a complete wiring diagram, which includes lights, sabertooth, etc. which the DIY firmware will work with? The latest one you posted is great, but missing the LED side, I think?
3) any other components which are needed IE: transistors/etc. for inverting the Sbus signal....I assume we need to make a small board to interface this? or any other components needed to emulate the TCB.
4) anyone to contact with success, willing to share pictures, etc?
I have seen that Luke add some possibilities for DIY boards, and I would like to clarify some details :That is all precisely correct. It requires us to give up the I2C port but we are not using that port in the TCB firmware anyway.
- Machine Gun mosfet drive was driven with PE2, non available on Mega board
Now connected to PD1 (Pin 20 SDA of I2c port)
Correct ?
- Recoil switch was connected to PE6, non available on Mega board
Now connected to PD0 (Pin 21 SCL of I2c port)
Correct ?
So, I2c connector can be removed
PS : Sorry Luke, but after your explanations, I2c connector was sacrified !Yes, it's unnecessary. If I were producing the TCB today I would remove it.
I'm using an external source for all 5 volt power, and I checked with my Fluke, all voltages rock solid at 5v and 7.2v.That is slightly confusing, typically we provide an Arduino board with something higher than 5 volts and the Arduino steps it down to 5 with its onboard regulator. In fact these regulators typically require at least 1 volt higher and often more even to function. So if you are feeding 5 volts directly to the Arduino it could be browning out.
Can I assume that the 28/29 pins remain the same for the drive motors regardless of which mode the radio is in?Yes, that is correct. It doesn't care what mode your radio is in or what channel is what, so long as you map everything correctly in the Read Radio procedure. If you have the sticks correctly assigned to throttle and steering and you can see them moving in the correct direction when reading the radio, then you are good to go.
There may yet be a blown tx/rx chip on the 2560, if the tx signals aren't getting through the Arduino. I won't know until the new board arrives.I'm not sure exactly what you mean here, if you can flash firmware and read the radio then tx/rx to the Arduino are working fine. Serial communications aren't used for driving the ESCs, those are servo outputs.
Hi Luck. I am very impressed with your work on the miniature sound card, excellent job. Are you use a 4-layer board?I just use a 2-layer board because I don't need to use all the pin of MK20. And the 2-layer board is cheap. Many of my friend is very interesting in this little sound card.Your work is very good, I can only improve a little.I think that the acceleration sound should change with frequency instead of just playing in the original sound. Have you tried this? I am trying to do this, but I have only little time.
With the elimination of the Teensy and the reduction in size, production costs of such a board should be much more reasonable. I don't know if you have any contacts with Chinese manufacturing but there might be a greater willingness for someone to take this to market than the existing design.
As for the TCB - yes, it does use a custom bootloader, I have attached it to this post along with some instructions if you want to use it. The main difference is that it has been reduced in size from the standard bootloader and it also permits flashing on an alternate serial port depending on the position of Dipswitch 5 (Arduino A12, ATmega2560 pin number 85, port K4). When this pin is held to Gnd the processor will accept firmware flashing through Serial 0 (USB on the stock TCB board), when held to +5v it will accept firmware flashing through Serial 1.
However you can still use the stock Arduino bootloader since we usually don't need the alternate flashing port. Everyone here using off-the-shelf Arduino Megas are using the stock bootloader.
You mention that you flashed the bootloader, but you didn't say whether you had flashed the firmware. After you burn the bootloader then flash the latest firmware. After both of those are done then you can try to connect. I don't know if you are having a problem at the firmware stage or the connecting stage.
If you are having problems flashing the firmware, you can try to flash a simple test sketch from the Arduino IDE, something like blink an LED. See if the IDE has problems or not.
For connecting, have you tried the alternate connection method (http://openpanzer.org/wiki/doku.php?id=wiki:tcb:operation:troubleshooting) where you connect first via Snoop, and once that has been established then click the Connect button?
Let me know what you find and I will help you out.
I think that the acceleration sound should change with frequency instead of just playing in the original sound. Have you tried this? I am trying to do this, but I have only little time.I am not sure I understand exactly what you are asking. But I will say, the current audio capabilities of the Teensy do not allow us to speed up or slow down a .wav file. If we want an acceleration sound that sounds faster, we have to create two sound files - one slow, one fast.
Before that, I think I should have perfect hardware first. Light card is useful for tucks as there are always many lights on a truck.This well be a fully new design.You might also be interested in an earlier project of mine called Open Source Lights (OSL). It is not very sophisticated but it does have a lot of options for lights on cars/trucks. You can read about it here - Open Source Lights - Arduino based RC Light Controller (https://www.rcgroups.com/forums/showthread.php?1539753-Open-Source-Lights-Arduino-based-RC-Light-Controller)
I think I have a bad programmer. So the Hex may not be on the TCB. The light don't work. So I have to buy a new one. Thank you for your suggestion.I will tell you if there is any progress.AVRDUDE should tell you (through the IDE or the command line, whichever one you are using) if the burn bootloader failed. But a bad programmer is very often a problem. I have used this one (https://www.aliexpress.com/item/2036402518.html) with success (set it to 5v).
Yes ,I want an acceleration sound when PWM frequency is high, and a slow sound when the frequency is low. So I can just need a idle sound to creat all the sound for all of the PWM.I don't need any other thing. And it is what I will do with your code.I think that the acceleration sound should change with frequency instead of just playing in the original sound. Have you tried this? I am trying to do this, but I have only little time.I am not sure I understand exactly what you are asking. But I will say, the current audio capabilities of the Teensy do not allow us to speed up or slow down a .wav file. If we want an acceleration sound that sounds faster, we have to create two sound files - one slow, one fast.Before that, I think I should have perfect hardware first. Light card is useful for tucks as there are always many lights on a truck.This well be a fully new design.You might also be interested in an earlier project of mine called Open Source Lights (OSL). It is not very sophisticated but it does have a lot of options for lights on cars/trucks. You can read about it here - Open Source Lights - Arduino based RC Light Controller (https://www.rcgroups.com/forums/showthread.php?1539753-Open-Source-Lights-Arduino-based-RC-Light-Controller)I think I have a bad programmer. So the Hex may not be on the TCB. The light don't work. So I have to buy a new one. Thank you for your suggestion.I will tell you if there is any progress.AVRDUDE should tell you (through the IDE or the command line, whichever one you are using) if the burn bootloader failed. But a bad programmer is very often a problem. I have used this one (https://www.aliexpress.com/item/2036402518.html) with success (set it to 5v).
It's hard to tell exactly from your picture, but I don't see a USB connector. Did you go with your previous plan of using a separate board for the bootloader chip?
Dear LukeZ, long time no see, I my very busy before, and now I can take a break.
I have made some sound card without teensy, and it works well. So my next step it to design some TCB card for my trucks. I wound make you a surprise when all the things finshed, but TCB does not work. So I have to get some help from you.
In fact I have made some TCB from empty pcb and new atmega2560. Is the bootloader for TCB special? I use stk500boot_v2_mega2560.hex as bootloader, is that right? When I finished flash the bootloader , I connect TCB with USB but OP config can't connect.
Can you tell my some detials about how can I make a empty 2560 be a TCB? Thank you.
And here is my sound card, It is just 5*3 cm .
I have ppm working fine from a 9x pwm xmtr through a converter to ppm. When I try hooking up the inverter, using a FrSky XSR receiver, no radio is detected (both from blinking leds, and from snooping 'waiting for radio'). So I tried the 9x with converter using the sbus output, still no go.
I put a voltmeter from input to output on the inverter circuit, and get 3.27vdc, which to me seems that the signal is getting inverted? Am I right in thinking that? Is it perhaps that this transistor is too slow for the frequency of the sbus signal?I think there isn't much we can tell with just a voltmeter, the scope would tell us more, but I would try the easier tests above first.
When you say you tried using the "converter with the SBus output", do you mean you tried using the PWM-to-PPM converter on the SBus output? That will not work since the converter will only work with PWM input. But I do note that the XSR also has a PPM output. Since you know your Mega is reading PPM just fine, you could try connecting the PPM output of your XSR directly to the Mega, for that test you won't need the converter or the inverter.
I wonder if it could be something as simple as the receiver just not being bound correctly to your transmitter module.
So I connected up my trusty Tektronix TAS 465 dual channel scope, (be kind as I think I use this thing once every 5 years). Channel one to the input to the inverter, and Channel two to the output. The input square wave is about 2.5v high, whereas the output is about twice that. So the transistor is amplifying the signal? I checked with both sets of resistors (6.8k/2.2k & 47k/10k) and the ouputs appear about the same. This signal is being inverted, just by too much??That o-scope test hasn't told us anything. We are interested in whether the signal is being inverted, the absolute voltage levels are not of interest. No doubt your receiver is operating at 3.3v and the Mega is running at 5 volt so what appears to be an "amplification" is to be expected (nothing is really being "amplified" just translated).
Should I now go for the through hole equivalent of the BC848 (I think its a BC548)?
Actually, I'm willing to be I know what your problem is. Note that the radio input signal gets routed to two pins on the Mega - Arduino pin 3 for PPM, and Arduino pin 15 for iBus/inverted SBus. Probably you have just routed the receiver to pin 3 and not also to 15.
I am using a PWM tx/rx and an S2PW pwm>ppm converter. These are widely used in the RC aircraft world and are reliable.I have mentioned this many times before and at the risk of sounding like a broken record, PWM-to-PPM converters are not recommended. They are not widely used in my opinion and the whole reason digital receivers were invented is to eliminate all the problems and shortcomings not only of these converters but of native PPM itself. The TCB is designed for high channel count digital radios, buy one!
The most that happens is that the tank motor will run for a few seconds using Channel 3, but if I centre the stick it will not then restart. It will not run in reverse.Have you run Radio Setup on this arrangement? You will get nowhere until that is completed. Watching the channels move during Radio Setup will tell you whether the Mega is reading all the channels correctly, and lets you confirm whether they are mapped correctly to your functions.
What have I missed?
This is my first experience with PCB layout and EasyEDA in my life. :(Good work, your trace layout is very neat! I think we can keep the discussion in this thread where more people will see it.
I have already placed an order, now I am only waiting for the arrival of components.
Should I create a new topic or describe my experience in this topic?
Yes, I plan on using MOSFETs externally for various third-party devices.Yes, I certainly know about that! No sooner do you send your board design off to be produced, do you remember something that should be changed. The production version of the TCB board that Hobby King sold was my 23rd revision. You never get it right the first time!
As the saying goes, a good thought comes after I handed over the layout to production, now I would have done some things differently.
One question that someone may be able to answer?Yes, a single battery should work just fine and I don't expect any issues with spikes to the Arduino, since in fact a single battery is all we use with the TCB. If your drive motors draw too much current and lower the source battery voltage too much the TCB (but more likely your receiver) will brown out (meaning reset), but that is really just an issue of a dead battery rather than spikes or temporary drops.
I currently have two 2000mah 2S Lipo's installed. One powers the Arduino, the other powers the esc's and recoil servo. Can I assume that using a single battery will work perfectly, I tested it this way to avoid any power spikes to the Arduino, but I am guessing that this is overkill.
I still had the problem where the low voltage warning would simply shut the board down.Arduino Pin 15 is the input for digital receivers (SBus or Ibus), but I think you mean pin A15 (or ADC15). It can be confusing, but there are digital and analog pins on your Mega and so even though they have some of the same numbers there is a difference between 15 and A15.
I took a look back through the info available on the site and found a reference to pin 15? Should this be pinned to GND to activate the LV warning correctly?
Ordinarily an Arduino has both the servo GND and a battery GND onto the Arduino. I am assuming that this isn't required, and that the servo GND is the only one required?Your servo will of course always require GND and positive voltage (as well as the signal). But of those first two only the GND is necessary to share with the Arduino. As long as the ground connection to your servo connects to some wire somewhere that also connects to the ground on your Arduino and the ground on your source battery, then you are fine.
I am wondering whether the TBS needs the correct values in Prop settings so that it knows when to play the sounds when it gets a signal from the TCB. The engine sounds work ok, so it must just be Prop 2 that isn't seeing what it should.Yes I think that is the case. To use the Mini with the TCB (whether it be Benedini's or the DasMikro) you will need TBS Flash v3 or v4. Flash v1 will only work with the Micro sound cards and even then with more limited options.
I've got these two, but can't see the *.tbp file, even a search doesn't throw anything up?Yeah, in TBS Flash go to the File menu and select "Save Parameter" and select a location on your hard-drive.
Due to the way the engine is started on the Micro, if you assign the individual “Engine - Turn On” and “Engine - Turn Off” functions on the TCB to a 2-position switch on your transmitter, the Micro will begin playing the engine sounds when you turn on the device, even if the switch on your transmitter is on the Off position. In order to avoid this, use the “Engine - Toggle On/Off” function instead of the individual on and off functions, and assign that to a 2-position switch. One position will toggle the engine, the other position will do nothing. Keep the switch in the nothing position when you start the TCB and it will then remain synchronized with the Micro.
Hi Wibbly, you have the Prop2 Type set to "2nd Coder 2-Key" but it should be "Function 1/2" (http://openpanzer.org/wiki/doku.php?id=wiki:tcb:tcbinstall:sound_benedini_micro#flash_-_parameter_tab). I know, they look similar, but do very different things.
The gun sound will only operate if the left stick is about 1mm to the left of centre at the top, otherwise i just get the flash and recoil. I don't know if this is due to the Prop settings in diagnostics, it seemed to work ok when I tested the mini. The v1 won't allow uploads of settings, the v3+ allows Luke's files to be uploaded.This sounds strange, theoretically if the flash and recoil are going then the signal is also being sent to the Micro, moving the stick over a bit won't change that signal at all. So no in this case it is not an issue with the Benedini Prop settings and anyway those settings are mostly for Prop3 which we aren't using on the Micro anyway.
I like the black! And we will be waiting patiently to see your experiment progress.
The boards arrived, it remains to wait for the arrival of the necessary radio elements and nodes.
I like the black! And we will be waiting patiently to see your experiment progress.
The boards arrived, it remains to wait for the arrival of the necessary radio elements and nodes.
You could try moving those various cannon fire functions off the turret stick and assigning them to a switch on your transmitter and seeing if the problem goes away. Although the behavior you describe shouldn't happen, I also don't think the turret stick is really an ideal trigger source if you can avoid it.
As soon as all the components are delivered and I will assemble the minimum configuration, I want to make a separate topic where I will describe all my first experience in mastering from the first steps - manufacturing.I agree, a new thread dedicated to your project will be a good idea. It might be difficult to extract your messages and their replies from this thread but hopefully you can just give an introduction of what has already happened and then continue from there. Feel free to start a new thread in this forum (TCB Dev) whenever you are ready.
I would be grateful if you transfer my messages there.
P.S. I did not expect PCBs to look so good, this was my first experience with such an order. But I already found the shortcomings of my design, for example, the holes for the pin panels are very large.In my experience no matter how careful I am in the design stage, there is something about holding a physical board in my hands (as opposed to looking at it on the computer screen) that makes clear all kinds of things that should be done differently!
It will be necessary to pay more attention to the study of the nuances of designing printed circuit boards.
Do I understand correctly?There was a problem with the code, but it should now be fixed with the latest firmware.
Is there some kind of problem in the code that sometimes the processing position of the smoke machine switch does not occur?
Or am I wrong configuring triggers?
I can’t say for sure at the moment what firmware I have
So my question is: Does anyone know of another source of the Arduino Mega2560Pro other than Robotdyn that can be flashed okay by OPConfig??To answer that question specifically, any board with an ATmega2560 processor can surely be flashed by OPConfig, but I understand your actual issue is the regulator on these. It may be that the regulator on those boards is not so much faulty as they are unable to handle the loads your shield may require, as Jurgen says (on the other hand, being a Chinese product I also would not be surprised if in fact they are using poor quality components).
1) When using LEDS for lights off the various pins, is the pin output 5v so i would need a resistor for correct led voltage ? I noted that on the Russian chaps schematic he used resistors on the green and red presumably board indicator leds but not on the lighting leds, or was this just an oversight on the lighting leds ?Correct, all outputs from the Mega chip are 5 volts, so yes, you should use an appropriately sized resistor for whatever LEDs you intend to connect. LedCalc.com (http://ledcalc.com/) is a good site for figuring this out. Keep in mind also that each pin (output) of the Mega chip can only source a maximum of 40mA! On the TCB board we have the Mega chip driving MOSFETS, and these MOSFETS actually switch on or off the LED outputs, so the current available on the TCB is much higher. But when you are using an off the shelf Mega board you are just connecting things directly to the processor so you have to respect this maximum current draw. As for the Russian example, I suspect he just omitted some resistors for simplicity or maybe forget to include them in the schematic, but anyway they are necessary.
2) I use direction indicators on my tanks when using a TCB from the 2 IO ports on the TCB does anyone know which pin outputs these will be on the Mega board please ?.There is a handy PDF available in the second post of this thread (or you can click here (http://openpanzer.org/forum/index.php?topic=16.msg70#msg70)) that shows all the TCB outputs mapped to what their label is on the Arduino Mega board. You can see the the general purpose I/O A is mapped to the Mega A9 and B is mapped to A8 ("A" for "analog" which is how it may be written on your board).
I was graciously gifted an Arduino Uno and the LCD screen that goes with it plus various other bits by a good friend and was wondering if this screen could be utilised some how with a DIY TCB using a Mega board, all the pins correspond to each other, or is my brain going way too fast for my skill level at the moment ? It would be cool if it could be used to show what the board is doing some how, even if it was only current voltage of the battery.This is a good question but in short the answer is probably going to lean more to the "brain moving too fast" side of things! Of course almost anything is theoretically possible but you'd need a good understanding of coding and also I think you would need to use a different LCD than the shield you presently have. Yes, that shield will plug directly into a UNO (and probably also a Mega) but it will interfere programmatically with pins required for TCB functions. If I were going to use an LCD the better way would be to get a serial LCD unit, there are lots available, and then send the messages out the SER.1 port. But even this would pose challenges. As an aside, I had originally planned an LCD feature for the TCB and that is what the (now unused) SER.3 connector is for. But even I who know how this thing works decided it wasn't worth the trouble.
Now the other one, I did exactly the same, it stated com port 5, but it would not flash the firmware, it kept stating wrong com port,As you've returned this one and will be getting a replacement we'll hope the replacement works on the first go. But if that one also gives you problems let me know, there are several things that could potentially have been going on.
I could connect to com port 5 through snoop and it showed connected, but again i tried to flash from snoop and it disconnected saying wrong com port.
tried snoop and it connected to com port 5 ?.
Well, wired up my Mega to fit my receiver, connected dipswitches and input button, the large manifold on the right is for servo pos and neg for the tank it will be going into, also red / green leds for board read out.That's a great start! If you intend to use a lot of servos (or maybe even just one), I might recommend that you supply them 5 volts through a hobby BEC rather than the 5 volts from the Arduino Mega. The TCB design used a hefty 5 volt regulator that can supply up to 3 amps, but an off the shelf Mega board can probably only supply maybe 500mA of 5 volt power. That's plenty to drive your LEDs and the receiver, but a servo could potentially cause the board to brown out. It won't hurt anything to try it, but for sure if you are using more than one servo I'd get a BEC, they're cheap and plentiful.
so if i understand you correctly, the esc would provide about 2 amps to the board but this would only be enough to power 1 servo at max stall ?There is no one single answer for every application, but simply to avoid problems a BEC would be a good idea.
I have found 2 MOSFET modules pics attached, i think ( from my limited electronic knowledge that these could be used with the mega for switching Higher amp load applications, is that correct and for the LEDS if i need more than the 40 mah that the mega can supply.You certainly can use those MOSFET modules to switch higher current devices, including LEDs if they will draw too much.
If i apply 6v to the vin and gnd terminals, my servo + and - manifold to the V+ and V- terminals, then connect pins gnd to the Mega and sig to 5V pin on the mega when i switch on the mega it will provide 5v to the mosfet module switching it on and supplying the 6v from the battery plus about 1 to 3 Amps to the servo manifold if i use a heat sink over 1 amp.Your understanding here seems correct to me, but I don't see what the advantage is of this approach. You still need to come up with a 6 volt power source, so that is yet another thing to add and wires to attach. BECs are inexpensive and you can wire them directly to the battery without involving any wires to the Mega. When you plug the battery in, or flip on the main power switch for the model, then the BEC will turn on and can provide 5 (or 6 volts) to your servos.
The only thing i could not get to work was the recoil servo, snoop said the cannon was firing but the servo didnt move but led flashed....Good catch and thanks for letting us know. It looks like he had the wiring correct, he just got the labels switched around. I edited his picture in several places where I found it on this forum, so if anyone looks at it again in the future it should be correct.
Edit re above...now have recoil servo working, turned out i had looked at Sergeys schematic which is NOT correct as he has recoil in servo pos 4, pin 26, i found the error after going back to read the pin position PDF, for the upteenth time... the recoil servo is pin 25 servo pos 5.
Dont know if that is how Sergey's radio is set up BUT for any other newcomers like me, just go off the PIN PDF and be wary of some one else's Arduino set up schematics.
If i wish to use a heng long motor gearbox for turret traverse i take it i use an esc connected to pin 27 for signal and then one of my mosfet modules for power and ground ?You are correct about using pin 27 for the signal to your turret rotation ESC, but again, you do not need any MOSFETs, that is an unnecessary complication. From the Mega to the ESC you need only the signal (pin 27) and a shared ground which you will have anyway. To power the ESC, simply connect it to your battery.
Hi,
I have suddenly started having an issue with my Arduino Mega 2560 diy board.
The issue is that if i connect a freshly charged NIMH 7.2v pack or 2cell lipo via the jack plug the board throws a fit by flashing all the lights on in quick time, All the lights, those on the model and board and forward and reverse indicators, the board will not function, the receiver is powered up and lights up but the board is giving the signal of no radio connection yet it is, or low voltage but it is not???
The puzzling part is if i connect a slightly used NIMH pack say around 7.5 volts the board powers up first time every time, even when i connect a 6v NIMH pack it functions correctly, but not with a fully charged pack. It is as if something is limiting the voltage going into the board at a set voltage
Does any one have any ideas how to fix this issue its driving me nuts..thx
Regards.
Sub.