Arduino 2560 project

This forum relates to the Open Source Tank Control Board (TCB). Please read the sticky and visit the main site to find out all about the board and how to install it.

Postby LukeZ » Wed Oct 23, 2019 10:29 pm

The first thing I would suspect is the PWM->PPM converter, as mentioned before. The TCB is designed for digital input and you'd really be doing yourself a favor to get a receiver that can spit out PPM, SBus, or iBus.

Nevertheless keep us posted, I'm enjoying your project.
User avatar
LukeZ
Lance Corporal
 
Posts: 155
Joined: Sat Apr 17, 2010 8:03 pm

Postby wibblywobbly » Thu Oct 31, 2019 10:36 pm

Well after buying two new cheap 2560's, and having chatted to the understanding sellers who agreed to me returning them, I have discovered an important thing to bear in mind. The cheap boards have a CH340 chip on them, and this chip appears to be where communication problems occur.

As both of them told me, if I am going to use the board for something like the TCB firmware, then don't get a board with the CH340 clone chip.

They are easy to spot, the clone chip is a small rectangular chip. It sits just behind the USB socket.

The one to get is either a genuine board, or one that uses the same chip as the original. This is larger, square, and sits in the same place.

Fortunately, I found a company on Ebay that was selling off a stock of genuine, boxed Arduino's. They had bought them for a project and then decided to have their own board designed and produced. They were selling these off for 50% of the price of a genuine one.

Just in case the super cheap PWM>PPM converter I bought was what blew the old 2560 board (which may have been genuine, it has been sitting in a parts bin for years - it may have been playing up when it was used in a 3D printer?) I have a new converter on order, and will wait until I have that before plugging anything in.

Fingers crossed, and I will update when progress has been made. :thumbup:
User avatar
wibblywobbly
Major
 
Posts: 6240
Joined: Fri Oct 17, 2008 9:30 am
Location: South Wales Valley

Postby jhamm » Fri Nov 01, 2019 2:03 pm

Hey Wibbly,
i use the 2560Core or 2560Pro Boards.
The reason is the 5V Power on the 2560Board deliver a current of maximum 1A.
This is not enough for a Reciever an two Servo and other 5V-Device.

Here an example with Mega2560Core Basic TCB without lights:
Mega2560Core.jpg
User avatar
jhamm
Lance Corporal
 
Posts: 237
Joined: Fri May 19, 2017 7:21 am

Postby wibblywobbly » Fri Nov 01, 2019 2:18 pm

I am hoping to get away with 1 servo for the recoil, the turret motor and both drive motors will be powered from the battery via esc's, with just the signals going through the 2560. I could also use a UBEC to power the receiver.

It's early days, I enjoy tinkering with this sort of thing and seeing what works, and what doesn't.

It's always good to see how others use the system. :thumbup:
User avatar
wibblywobbly
Major
 
Posts: 6240
Joined: Fri Oct 17, 2008 9:30 am
Location: South Wales Valley

Postby wibblywobbly » Fri Nov 29, 2019 11:00 pm

Got it working. Did it the cheapest way possible.

Still need to sort out recoil, and muzzle flash.

The wiring looks a mess, this was a quick wiring job to test the circuits. It is being cut down to tidy it all up.

Cost once it is all done?

Arduino 2560 £10
3 x Bustaphedon 20amp esc's (drive and turret) £15
DasMikro Mini sound card (Benedini clone) £25
Speaker £10
PWM to PPM converter £10 (not needed if you have a PPM tx/rx)
Servo recoil £5

phpBB [video]
User avatar
wibblywobbly
Major
 
Posts: 6240
Joined: Fri Oct 17, 2008 9:30 am
Location: South Wales Valley

Postby wibblywobbly » Tue Dec 03, 2019 6:46 pm

Now tweaked the settings, added a DasMikro Mini sound card, and it's running like a dream.

The wiring looks a mess as I just threw it in the hull to test it. I have all of the components on plugs, so in the event that any one component fails I can simply unplug it and replace it.

It's being nailed down and tidied up before I do the turret/recoil and muzzle flash.

phpBB [video]
User avatar
wibblywobbly
Major
 
Posts: 6240
Joined: Fri Oct 17, 2008 9:30 am
Location: South Wales Valley

Postby wibblywobbly » Thu Dec 05, 2019 1:22 pm

I have no idea whether anyone else has completed one of these projects.

I have the lower hull working like a dream, the sounds are excellent.

The turret is proving a challenge, so if anyone has got theirs working I would love to know how you did it.

All I need is:

A working servo recoil.

I have tried using 5v, Pin 25, and GND, directly to the servo. This wouldn't work in the real world as the Arduino can't supply enough power. It should work on a no-load servo, but it doesn't.
I have tried using a voltage regulator stepped down to 5.5v, with the signal wire going to pin 25, but that doesn't work either.
The only thing I haven't tried is running a GND from the battery negative terminal.

Snoop shows the stick as registering a cannon fire. But the servo doesn't activate.

Muzzle Flash.

Pin 41 is used for the HL high intensity muzzle flash. But hooking up a 5v led +GND simply gives a permanent 'on'. If memory serves me correctly the HL unit uses a capacitor. If the capacitor is charged on a permanent 5v supply it would explain why the led stays lit up.

I tried using the A8/A9 pins but the flash led will not light up. The Aux settings are defaulted to Output and Low.
I tried using the Auto Flash but no joy.

Auto Flash with Cannon

If this box is checked, the Aux Output will automatically be flashed (output brought high) whenever the cannon is fired, no function trigger needs to be created. If your muzzle flash is a simple LED, connect it to the Aux Output and check this option. But if you are using a Taigen High Intensity Flash unit, connect it to the dedicated Flash port on the TCB instead, in which case this Aux output can be used for other purposes.


Flash

The Aux Output can be set to flash (blink once). The length of time of the flash is specified on the Lights & IO tab of the OP Config program, from 1/1000th of a second to 5 seconds.

There are two ways to cause a flash to occur. You can check the “Auto Flash with Cannon” option in OP Config on the Lights & IO tab. Now any LED connected to the Aux Output will flash automatically when the cannon is fired. This will be the most common usage for those with LED muzzle lights. (But if you want to use a Taigen high-intensity flash unit the TCB has a dedicated port for that, see here.)

Or you can control the flash manually whenever you want, by assigning any trigger to the Aux Output - Flash function.


However there is also this but I don't know if it applies to the DIY 2560 installation:

Note that most of the eBay sellers will have the red and black wires opposite of what makes sense on the TCB. LEDs require a certain polarity so be sure you wire them correctly. For your convenience, positive and negative are printed on the bottom of the TCB board for every single output.


There is probably a very simple explanation for what I have missed, but if anyone has done it please post the solution up! :clap:
Attachments
Mega_Drive_Full.jpg
User avatar
wibblywobbly
Major
 
Posts: 6240
Joined: Fri Oct 17, 2008 9:30 am
Location: South Wales Valley

Postby Rad_Schuhart » Thu Dec 05, 2019 1:58 pm

Great you have it working! If you can, a step by step tutorial would be great.

Next step for you would be to make your own open panzer sound board (Which is an unvaluable GEM). If you think the benedini sounds are excelent, you have yet to try the ones I did for the open panzer board :)
User avatar
Rad_Schuhart
Warrant Officer 2nd Class
 
Posts: 1447
Joined: Tue Jan 19, 2016 10:22 am
Location: Spanish living in Graz, Austria. Heart in UK.

Postby wibblywobbly » Thu Dec 05, 2019 3:12 pm

It's just the turret that has me frustrated. The OpenPanzer Wiki deals with the stock TCB, but using an Arduino 2560 isn't covered all in one place.

A Russian guy, Sergey, has done it using a slightly different board, and his wiring is different, eg Pin 24 for the servo recoil rather than 25. He has used a voltage regulator to power the servo, but hasn't used the negative output, so I don't know if I should remove it as well. I am reticent to experiment in case I do some blue smoke magic.

I used the Tiger v3 sound file, the engine sounds are excellent, it sounds just like the Bovington Tiger, but the machine gun, and main gun volume is barely audible.

The low voltage detection doesn't function, I have a feeling that this is because a jumper is needed from Pin 15 to GND.

Once I know that everything works I will create a PDF with a full step by step guide. The lower hull is actually quite simple. I could have made it even tidier but wanted plugs on everything so that I can replace anything without resoldering.

It is running a PWM>PPM converter, which means that a standard tx can be used, which is what most people have.
User avatar
wibblywobbly
Major
 
Posts: 6240
Joined: Fri Oct 17, 2008 9:30 am
Location: South Wales Valley

Postby Rad_Schuhart » Thu Dec 05, 2019 3:28 pm

wibblywobbly wrote:
It is running a PWM>PPM converter, which means that a standard tx can be used, which is what most people have.


Not sure about this anymore. Well, maybe among tamiya electronic tank users yes, but SBUS-IBUS is present everywhere now.

In your case I already recommended you plugging an affordable multiprotocol module in the back of the radio, so you can use 16 channels and trigger all the functions the open panzer board lets you use. It also saves you the adaptor, and also the receiver is nail size, which is important in our tanks too. If in your writtings you can explain how to do it with SBUS, it would be very appreciated at least by myself.

Anyway I will read with A LOT of interest your PDF file, and I might try to do my own boards too. This is going to be a very interesting project!
User avatar
Rad_Schuhart
Warrant Officer 2nd Class
 
Posts: 1447
Joined: Tue Jan 19, 2016 10:22 am
Location: Spanish living in Graz, Austria. Heart in UK.

Postby jhamm » Thu Dec 05, 2019 4:04 pm

Hi,
the low voltage detection is very easy to do by
two resistor and one capacitor:
VoltageDetect.jpg
VoltageDetect.jpg (12.28 KiB) Viewed 48 times


this is a part of this schematic:
OpenPanzer_TCB_Mk1_Schematic.pdf
(173.49 KiB) Downloaded 2 times
User avatar
jhamm
Lance Corporal
 
Posts: 237
Joined: Fri May 19, 2017 7:21 am

Postby wibblywobbly » Thu Dec 05, 2019 4:21 pm

PPM and Sbus plug straight into the Arduino. Just 3 wires. For SBUS a signal inverter is required. The PWM>PPM converter is smaller than my PWM receiver, so I simply stuck it on top, it doesn't occupy any hull space at all. 4 short cables going from the rx to the converter and one 3 wire cable going from the converter to the Arduino.

The difference between the TCB and the DIY Arduino is that 99% of the circuitry is built into the TCB.

To add an IR battle system to the Arduino will require various additional components.

There are some people out there who have designed breakout boards that simply plug into the Arduino, this makes things very simple. The files are on the OP forum, so if someone who understands these things wants to, they can get one made.
User avatar
wibblywobbly
Major
 
Posts: 6240
Joined: Fri Oct 17, 2008 9:30 am
Location: South Wales Valley

Postby Rad_Schuhart » Thu Dec 05, 2019 4:28 pm

wibblywobbly wrote:PPM and Sbus plug straight into the Arduino. Just 3 wires. For SBUS a signal inverter is required. The PWM>PPM converter is smaller than my PWM receiver, so I simply stuck it on top, it doesn't occupy any hull space at all. 4 short cables going from the rx to the converter and one 3 wire cable going from the converter to the Arduino.


Yes, but how much room does the PWM receiver and the wires to the adaptor take? How many channels does it have?

Meanwhile...

Image 16 channels

At least on my Panzer IV with tamiya speaker, space is premium and every milimeter counts.

Please dont take it as an argument, lol.
User avatar
Rad_Schuhart
Warrant Officer 2nd Class
 
Posts: 1447
Joined: Tue Jan 19, 2016 10:22 am
Location: Spanish living in Graz, Austria. Heart in UK.

Postby jhamm » Thu Dec 05, 2019 4:32 pm

He is pinned down on his PWM converter ....
and do not want to step away from the path
Any discussion about this is wasted time
User avatar
jhamm
Lance Corporal
 
Posts: 237
Joined: Fri May 19, 2017 7:21 am

Postby wibblywobbly » Thu Dec 05, 2019 5:31 pm

I only need 4 channels, the project objective is to get this working as cheaply as possible. Space isn't a problem, even in a Tiger, I have plenty of space for everything. The XT60 plugs take up more space than the rx + converter.

Sure, I could go and spend money, but that isn't what the project is about. It's got nothing to do with being pinned down on a PWM converter, this is simply the cheapest way to get a PWM tx/rx to send the required signals to the Arduino. Not everyone can afford a new transmitter, or an expensive control board etc. This project is to help those people on a tight budget.

If anyone wants to install a PPM or SBUS system + signal inverter that option is always there.

The cost of doing this is almost £100, an SBUS tx/rx would add another £40-50.
It would be about the same price to buy an Elmod board that runs happily on PWM, and that is very simple to install.
Attachments
IMG_20191205_161318.jpg
User avatar
wibblywobbly
Major
 
Posts: 6240
Joined: Fri Oct 17, 2008 9:30 am
Location: South Wales Valley

Postby Rad_Schuhart » Thu Dec 05, 2019 6:05 pm

wibblywobbly wrote:I only need 4 channels, the project objective is to get this working as cheaply as possible. Space isn't a problem, even in a Tiger, I have plenty of space for everything. The XT60 plugs take up more space than the rx + converter.

Sure, I could go and spend money, but that isn't what the project is about. It's got nothing to do with being pinned down on a PWM converter, this is simply the cheapest way to get a PWM tx/rx to send the required signals to the Arduino. Not everyone can afford a new transmitter, or an expensive control board etc. This project is to help those people on a tight budget.

If anyone wants to install a PPM or SBUS system + signal inverter that option is always there.

The cost of doing this is almost £100, an SBUS tx/rx would add another £40-50.
It would be about the same price to buy an Elmod board that runs happily on PWM, and that is very simple to install.



That is not correct. A multiprotocol module is 30 euros, you can just plug it at the back of your radio.
The SBUS receiver is 9 euros. How much was the converter? For a little more you have a much better setup.

But the amazing thing is the multiprotocol module works with both the PWM turnigy receivers you (and I) have, the frsky SBUS, and hundreds of other brands.

So for me, the multiprotocol module was indeed a way of saving tons of money. You all know I am the cheapest guy here, and I am running 2 two euros ESCs with my OP board, lol.

But hey, I dont want to derrail your thread, so I wont insist here but Ill be happy to answer any questions you might have in private.

At the other hand, you only need 4 channels???! With the open panzer I am using 16 and sometimes I wish I could use more!... Yep, I know I am a freak, lol.
User avatar
Rad_Schuhart
Warrant Officer 2nd Class
 
Posts: 1447
Joined: Tue Jan 19, 2016 10:22 am
Location: Spanish living in Graz, Austria. Heart in UK.

Postby wibblywobbly » Thu Dec 05, 2019 6:28 pm

It's not about 'my' transmitter, it's not about 'me' building something expensive, it's a project using Open Source firmware, and cheap components to see what can be achieved. I keep saying that.

If I had a big house I wouldn't buy the smallest furniture on the market to go in it. :haha:

Only recent transmitters allow someone to install a module. What I am doing is getting the DIY TCB to work for those that do not have a modern transmitter, that cannot be adapted to PPM or SBUS.

I am in two tanks clubs, I don't think anyone in one club has anything other than PWM transmitters, and maybe two in the other club that do have them.

The only option they have is to use a signal converter. They cost around £9, they automatically detect the incoming signal and a press of a button selects PPM or SBUS output. They work the other way as well.

phpBB [video]


If the converter didn't work I would have abandoned the project, it would make far more economic sense for someone on a tight budget to buy any of the aftermarket boards.

If someone already has a PPM or SBUS tx/rx then they can use that, they just need a signal inverter for the SBUS. Once this is all working I will create a guide that shows the options for those that want to explore them.
User avatar
wibblywobbly
Major
 
Posts: 6240
Joined: Fri Oct 17, 2008 9:30 am
Location: South Wales Valley

Previous

Return to Open Panzer Tank Control Board

Who is online

Users browsing this forum: No registered users and 1 guest