Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - LukeZ

Pages: 1 ... 13 14 15 [16] 17 18 19 ... 79
226
Other Open Source Projects / Re: Standalone Tank IR
« on: November 12, 2020, 01:46:53 PM »
Ok, you have made good progress. We are now halfway there! Yes, the 3.3 ohm resistor is very low, but we really have to overdrive the LED in order to get any range. I have found since the signal is so brief the LED can survive it quite well.

Now for receiving. In fact what you have reported tells me that some things are working as they should. It is actually as designed that the firmware seems to quit reading after the 50th bit, this limit is set by the RAWBUF define in the IRLib.h file (around line 247, there are some comments that go with it). You also found earlier some comments on how we send the 1/35 Tamiya signal - there is also a discussion on how we decode it, starting around line 378 in the IRLib.cpp file. You will see that for decoding of this particular signal, which is really quite different from the one all other models use (including Tamiya in 1/16th scale), we actually only read the first 3 bytes (no other protocol has those same first 3, or even the same receiving pattern, so we are not going to confuse it with something else). As you found with your Excel work, the firmware is actually detecting the first three bytes we would expect: 199, 242, 192

So we can rule out hardware issues, the Arduino is reading the signal from your Panther just fine, the issue is with decoding. I've spent some time refreshing my memory about what I wrote all those years ago, but I don't see any obvious problems with the code. The debug dump that you posted was exactly what we expect and it should have recognized it.

Let's try an even more detailed debugging routine. In file "IRLib.h" at or around line 52, you will see this line, which is also commented out:
Code: [Select]
// #define IRLIB_TRACE

Let's uncomment that, and also change it because it should be named this instead (so basically just replace that line with the following):
Code: [Select]
#define OP_IRLib_TRACE

Let's also change that dump test that we already uncommented earlier. This is what you had uncommented in "Tank.cpp" at around line 315:
Code: [Select]
    IR_Decoder.decode();
    Serial.print(F("Decoded: ")); Serial.print(ptrIRName(IR_Decoder.decode_type)); Serial.print(F(" Value: ")); Serial.println(IR_Decoder.value);
    IR_Decoder.DumpResults();

Let's change that first line to this:
Code: [Select]
    IR_Decoder.decode(BattleSettings.IR_FireProtocol);

This way it doesn't try to run through every possible protocol but only checks for the Tamiya 1/35 signal, since we already know that's what we're sending it.

Now give your Arduino a hit from your Panther and let us see what the Serial Monitor shows us...

227
Other Open Source Projects / Re: Standalone Tank IR
« on: November 09, 2020, 12:48:35 PM »
Ok, you have made good progress already! It seems you have almost completely confirmed the similarity of the signals, which is good. The marks and spaces you have measured correspond exactly with what I have measured, and with each other.

There is some debugging code including in the TankIR project, if you uncomment these lines at around line 315 in the "Tank.cpp" file:
Code: [Select]
    IR_Decoder.decode();
    Serial.print(F("Decoded: ")); Serial.print(ptrIRName(IR_Decoder.decode_type)); Serial.print(F(" Value: ")); Serial.println(IR_Decoder.value);
    IR_Decoder.DumpResults();

It might help you see the full signal coming in from the Tamiya tank, or whether anything is being received or not. But I feel quite certain, as you surmised, that in fact the signals are no doubt the same for all 8 bytes, if you have already confirmed the first 6 (and I confirmed all 8 once upon a time!)

I'm inclined to think you might have a hardware or wiring problem since the firmware seems to be working correctly. I would double-check that you have the IR connected to the right pins, etc... (Use the camera trick to confirm that the IR is indeed transmitting). What IR transmitter LED and receiver are you using for the Arduino side - is it 1/16th Tamiya gear, Taigen, something else?

PS: In fact the 2560 (Mega) boards and the UNO (and other variants) use a different microprocessor, the former use the ATmega2560 chip and the latter the ATmega328. Of course either one can work, we use the ATmega2560 on the TCB, and the Uno for the standalone IR code. If the standalone IR code compiles on the 2560 board, that is a coincidence! Anyway, I'm sure your clone Uno is fine, I have used several without problems, and we can see from your capture that the firmware is running correctly.

228
Other Open Source Projects / Re: Standalone Tank IR
« on: November 08, 2020, 01:27:31 PM »
Hi CodeWarrior, my apologies for the slow reply. Yes, the firmware has been tested with a 1/35 Tamiya model, I used the Sherman but they should all be the same.

One thing you mentioned is that you compiled the code on an Arduino Mega2560 board, however the standalone TankIR firmware is designed for use on an Arduino Uno/Nano/328-compatible board. I don't know if that is part of your problem or if you just made a typo when describing your setup.

You can easily verify that your circuit is at least sending a signal by watching the IR emitter with a digital camera, or your phone, or by hooking up a standard LED with human-visible light to the output instead of an IR LED. This will at least tell you if the firmware is trying to do what you think it should. Beyond that there are many troubleshooting avenues to take, and where to start depends on where you think the issue probably resides.

I do believe the firmware works, so be sure to double-check your wiring and such.

Keep me posted on what you find and I'm sure we can figure out the problem eventually.

229
News & Announcements / Re: It's all over?
« on: November 01, 2020, 09:05:41 AM »
Thanks guys for the kind comments, I'm glad there are people still finding the site useful. I hope someday the board will become available again, but things move very slowly, and the global situation has not helped, so I have nothing to announce for the moment. But do not worry, the site is not going anywhere!

230
Open Panzer Help / Re: Recoil wiring
« on: October 27, 2020, 12:09:53 PM »
Very glad to hear it!

What happens differently (or nothing) to the recoil
3 pin out puts as labeled on the bottom of the TCB (pos neg and signal) when switched from
Mechanical recoil to Airsoft?
The difference between the two is the order in which things are performed. You will not get the correct behavior if you set OP Config to airsoft when you have mechanical recoil or vice versa, but it will not break the board.

231
Open Panzer Help / Re: Recoil wiring
« on: October 27, 2020, 07:22:49 AM »
Ok, I guess I had not seen that before. You can see the mechanical recoil page for instructions on how to wire those. Your unit looks different from the one in my example, but anyway, the principle is basically the same between all these recoil/airsoft units. There is a motor that requires two wires, and a switch with two contacts, one side of the switch is attached to the negative motor terminal, the other side of the switch goes to the "trigger/signal" terminal on the TCB. If you can wire it correctly, and then select "Mechanical Recoil" in OP Config, it should work.

Let us know your results.

232
Open Panzer Help / Re: Recoil wiring
« on: October 26, 2020, 11:26:08 AM »
I have not seen that kind of airsoft unit before but assuming it operates like all the others it should not be difficult to wire it correctly. Jurgen is right, the diagram on the page he linked to makes it about as simple as it can, I have re-posted the relevant part here.

Now it's true, in your picture the switch at the rear of the unit is different from normal in that it appears to have 3 contacts instead of two. I'm assuming the third contact at the very back is used to trigger a flash or something. Just ignore that third contact and let the TCB take care of the flash. Try getting the airsoft to work first, then we can deal with the flash if that is still an issue.

233
Open Panzer Help / Re: New Board / visual check
« on: October 21, 2020, 05:56:38 AM »
I think you have the correct MOSFETs! Enjoy the new board.

234
Open Panzer Help / Re: New Board / visual check
« on: October 19, 2020, 07:41:54 PM »
If the board has the wrong MOSFETs, none of the light outputs will work (Aux output, L1, L2, Brake, MG), the IR transmitter will not work, the IR notification LEDs will not work (these are the LEDs inside a Tamiya apple), and the mechanical recoil/airsoft output will not work. That is a total of 8 outputs that will not function.

Ironically, the high-intensity flash will work (it uses a different component).

235
Open Panzer Help / Re: New Board / visual check
« on: October 17, 2020, 04:05:04 PM »
Hi Osika, just a quick glance at the board will not tell us much, you need a closeup view of certain MOSFETS, and a magnifying glass can help.

Here is a post that shows exactly which components need to be examined. If you can read "23EG" on the MOSFETs, then they are the wrong ones!

Hobby King claimed to have fixed the issue but in fact some people received faulty boards up until the very end. You won't know till you get the board in your hands, but let's hope it's a good one!

236
TCB Dev / Re: Gear Shift
« on: October 16, 2020, 03:35:59 AM »
There is an option as you already know to have a "manual gearbox" where you must select forward, reverse or neutral using a switch on the transmitter, and then the throttle stick simply controls the speed within the selected. However I do not have multiple forward or reverse gears, just the one.

Rad was able to create a multiple gear effect using some programming on his 9X transmitter, you might find it interesting to read about what he did which is discussed in this thread

237
Open Panzer Help / Re: Servo Recoil
« on: October 15, 2020, 10:48:16 AM »
I have ordered a servo and elevation recoil unit to use and just tested recoil using another servo I had using the output for gun fire.
It works each time with recoil set on cannon fire which is great. (Have not tried setting to mechanical
trigger or see need to?)
I assume what you mean to say is that you have left the "Trigger with Cannon" checkbox checked, so that when you active the cannon fire function, the recoil action occurs. That is the way most people will want to do it, the other options are for unusual setups.

One thing though and not a big deal..upon turning power on... Servo does some fast movements then upon triggering cannon does the proper fast/slow recoil return movement. I have not adjusted end points or anything yet.
Yes, I think this is not a problem. The behavior of some output can be erratic on boot depending on the position of your servo, the status of your receiver, etc... As long as it ends up in the correct position when boot is complete, and as long as it works when you trigger the function from your transmitter, then I think everything is fine.

238
The version 0.93.70 is what's posted on the website now, so yeah we have a copy of it. After you feel like you have a stable version on your end with your various changes, you can send me a new hex and I will post that, but at that point you do want to be sure to update the version number. Go ahead and take your time on it, it is of course better to wait and be sure you have everything added that you want, than to post a whole bunch of versions...

239
Open Panzer Help / Re: RC on off switch
« on: October 08, 2020, 05:43:17 AM »
No, that will not work. The device you are looking at only accepts RC signals for input. RC signals are 20Hz PWM pulses from 1-2mS. The device you are looking at converts an RC signal into a simple on/off.

The General Purpose I/O ports can not output an RC signal, so your device will not recognize it. However, the General Purpose I/O ports can turn on and off. And that is all you want.

The General Purpose I/O ports however are not strong enough to power a heater or fan. That is why you still need to use a relay. See the link I provided above.

240
Open Panzer Help / Re: RC on off switch
« on: October 07, 2020, 05:01:55 PM »
The RC switch takes an RC signal so it would have to be plugged into one of the RC outputs, which would be mapped to a channel on your transmitter and set to type "analog" in OP Config, even though you will obviously actually use a switch on your transmitter.

That is one option, but depending on your setup you might not have a lot (or any) RC outputs free. The easier way is just to get a relay module that can be controlled directly from the General Purpose I/O ports. There are several mentioned on the wiki page.

Note there are built-in options for controlling the smoker fan and heating element separately already. If you choose to go that route, the fan is driven from Aux output (but it only delivers 5 volts) and the heating element is driven from the smoker output (at full battery voltage, as usual). You can control the level of the element and the fan separately with options in OP Config on the Motors tab.

Pages: 1 ... 13 14 15 [16] 17 18 19 ... 79