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 ... 75 76 77 [78] 79
1156
Let's take a step back and look at our options. The Audio Library enables the Teensy to stream sound data from two possible sources - an SD card or flash memory. It can then perform various tasks with the sound (mixing, adjusting, etc) and output to one of two outputs - mono analog using its single onboard DAC, or digital I2S data out.

If we use the onboard DAC, all we need to add to the Teensy (on the output side) is an amplifier IC. This is easy to do and there are lots to choose from. PJRC sells what they call a Prop Shield (not for propellers, for props) that uses a Texas Instrument LM48310; I have been using this for experimentation. Adafruit has an inexpensive breakout using a Diodes Inc PAM8302A. I'm sure there are a million other options as well. Both these listed operate at up 2.5 watts on a 4-ohm speaker which is probably more than enough for most 1/16 scale models and is equivalent to the Benedini TBS Mini.

In other words, in terms of hardware using the Teensy's DAC out is about as simple as it gets.

We could also use I2S out into a codec chip like the afore-mentioned SGTL5000 and then into an amp. This adds another IC but gives us some audio processing abilities we may not need.

I also recently discovered this fascinating combination I2S-DAC/Class-D amp chip that Adafruit sells a breakout for: MAX98357A. Feed it I2S digital audio and it will convert to analog and give you a hefty 3.2 watt amplified mono output you can connect directly to a speaker. I have ordered one to experiment with but don't have it yet.

All these options involve relatively inexpensive chips we can easily incorporate into our own board design. The final result I am shooting for is a small carrier board with a socket to plug in a Teensy 3.2. The carrier board will "carry" all the extra audio components we need such as the amplifier, plus the SD card slot, standard headers to attach HengLong/Taigen speakers and volume control knobs, and serial and power connections for hookup to the TCB.

So the question at this point is what hardware route to take. But we have some more things to consider first.

1157
This thread will follow my attempts to create an open source sound card based on a Teensy 3.2 microcontroller featuring a 32 bit ARM processor (72 MHz Cortex-M4). It costs about $20 so represents a lot of power for very little money, and it's also very small.

All Teensy devices (there are several versions) are Arduino compatible and can be programmed using the Arduino IDE if you install the free Teensyduino add-on. Development can proceed rapidly because all the standard Arduino libraries can be used, and there are lots of Teensy-specific libraries available as well.

The greatest thing about this board is that it runs the Teensy Audio Library. This is an entire toolkit for building audio projects using a Teensy processor. They have a workshop you can go through that will probably blow your mind. I attended one of these in person last year for the express purpose of learning how we could leverage these resources for an Open Panzer sound card.

The workshop examples use a Teensy 3.2 mated to the PJRC Audio Adapter board. This board outputs CD quality stereo sound (16 bits, 44.1 kHz) and basically just consists of an SD card slot and an SGTL5000 codec chip. This chip takes I2S audio data from the Teensy (not to be confused with I2C) and with the onboard DAC converts it to analog audio. It has a built in headphone amp so you can listen on headphones without any extra hardware. But if you want to drive a speaker you have to add an amplifier circuit to the line-outputs. The SGTL5000 also has a lot of audio processing and signal conditioning features that can be manipulated through convenient functions in the Audio Library.

The Audio Adapter board is a bit overkill for our purposes. We don't need headphone outputs, we don't need stereo sound, and we probably don't need the majority of the signal processing capabilities. We do need however to drive a speaker and that requires yet another chip. However it would not be hard to create our own board with the SGTL5000, SD card, and a small Class D IC.

We do however have other options...


1158
TCB Dev / Re: Getting Started
« on: January 15, 2017, 12:15:59 PM »
Well it sounds like you have a very diverse background and I'm sure we will benefit from any contributions you may decide to make. The beauty of open source is that we can potentially involve a wide variety of skills and by definition, everybody working on the project is interested in and personally motivated.

As for projects on the shelf - believe me I have plenty of those too! But many of them are still there because I have focused on this one.

On the topic of code, there is a brief synopsis of all the custom classes used in the TCB firmware here: TCB Libraries. At whatever point people start wanting to change things, it is a good place to go to figure out where to look for certain functionalities.

Whew!  I had forgotten how long it took to install the Qt IDE!  :P.
Qt is a bear to get going as I recall, but simple to use once it is setup. This was my first exposure to it and I didn't take advantage of all it could do I'm sure. I hadn't figured anyone would bother to mess with it but seeing you charge ahead I hope we get more like you in time! There is much that could still be done on the Qt side.

1159
TCB Dev / Re: Getting Started
« on: January 14, 2017, 05:00:05 PM »
  • Download and compile OPConfig source code to review from GitHub: Still looking around for my old Qt license!
Holy moly, you really are jumping in the deep end!  :o I applaud you sir.

As you mentioned the sound unit, I can volunteer that I purchased my TBS directly from Thomas and at the time I don't think I could have gotten it any cheaper from a US source.

I will also volunteer for what it's worth that my current open source sound card development is using a PJRC Teensy 3.2, Prop shield, SD card shield, and a simple carrier board. The hardware needs to be simplified but this works for testing.

[EDIT: That is what I'm using for testing now, but please don't follow along yet, or worse, buy any of these components. I have a strong suspicion some of these pieces are going to need to be changed.]

I will attempt to start a thread soon about this project for anyone to follow along with and contribute to. The hardware is basically all off-the-shelf other than the carrier board, which doesn't really do much and could simply be bread-boarded. In the absence of a TCB people could still use a standard Arduino Mega for the purposes of sound card development.

But I am only in the earliest stages now and I need to get some things organized first before posting them...

1160
TCB Dev / Re: Getting Started
« on: January 14, 2017, 04:45:26 PM »
Don't feel bad vonT, I consider myself in some ways a digital dinosaur as well (I have never owned a smartphone for example). And using HTML in a forum post was only a mistake someone makes who knows too much, not too little. 

You and I have had the exact same idea with regards to testbeds. For the last seven years I have been using a PZIII which, while reliable beyond expectation, is really too small. I've since done the same as you, ordered a Taigen Tiger 1 lower chassis to which I will fit plastic wheels and tracks.

If you don't mind sharing I'd be curious to know what sort of embedded work you have done. With any sort of formal education, or even just the long experience you possess, my coding practices may seem unusual - or maybe not, I guess I don't know. I often wonder if I've missed context, perspective or sense of proportion from self-education, but it's hard to know what you missed if you don't what you missed!

1161
TCB Dev / TCB Firmware with Stock Arduino Mega
« on: January 14, 2017, 02:26:34 PM »
It occurred to me that now, prior to physical release of the TCB, some people may have already on hand an Arduino Mega. The TCB uses the same processor as the Arduino Mega (ATmega2560) so the firmware will compile just fine on that board.

If you have an iBus or PPM receiver, you can connect it to your Arduino Mega with 3 pins (PPM to Mega pin 3, or iBus to Mega pin 15). Unfortunately SBus uses an inverted serial protocol, and before the processor can read this information the signal has to be "un"-inverted. This requires a transistor and two resistors which are on the TCB board but of course absent on the Arduino Mega. If you want to implement this transistor inverter yourself see the TCB schematic, it is very simple and most any basic transistor would work (the SBus signal would also go to Mega pin 15). But otherwise, stick with iBus or PPM receivers.

The Sabertooth can be connected to your Mega with two pins.

Additionally you could also hook up a Benedini TBS Mini to the Mega with only a few jumpers.

See the diagrams below, the first shows only a receiver and Sabertooth, the second adds the Benedini.

You don't need to use the Arduino editor for any of this.

Important Circuit Info: You will notice in the diagrams below we have Arduino pins A12 and 33 connected to ground. On the actual TCB board these pins are assigned to physical switches. Pin A12 is Dipswitch 5 and we set it to ground in order for the TCB to know it should be communicating over USB rather than an alternate serial port. Pin 33 is the Fight/Repair switch and we set it to ground in order that the TCB remain in Fight mode. This one doesn't really matter so much for the testing done here but Repair mode can have some confusing side effects without all the rest of the circuit present, so just jumper it to ground.

  • Plug your Arduino Mega into your PC using a USB cable.
  • Launch OP Config (download it here)
  • Select the COM port assigned to your Mega
  • Go to the Firmware tab of OP Config, click the "Get Latest Release" button, and then click the "Flash" button. After this process is complete, your Mega is running TCB firmware.
  • You should now be able to connect to your Mega using the "Connect" button in OP Config.
  • If you have a receiver connected, you should also be able to run through Radio Setup.
  • Make sure Drive Motor type is set to "Sabertooth Serial ESC" on the Motors tab of OP Config.
  • Create some function triggers if you like, and adjust any other driving settings you might like.
  • Write settings to your Mega using the blue arrow button.
  • Drive your tank around like a boss!

Other Helpful Threads:
Sergey's Open Panzer TCB From Scratch - on Russian site, but Google translate works very well.
Sergey's thread here on the OP Forum - with not as much detail as the Russian thread.


Edit: I've added also another diagram even more detailed from user jhamm (Jürgen) showing connections to a Mega Pro Mini, but the pin numbers are the same for the standard Mega.

1162
News & Announcements / Re: Project Status
« on: January 14, 2017, 11:24:34 AM »
Introductory threads have been started at the RC Universe and RC Tank Warfare forums.

RC Universe Introduction

RC Tank Warfare Introduction

1163
TCB Dev / Re: Getting Started
« on: January 14, 2017, 12:48:02 AM »
vonTirpitz, welcome, and thank you for starting the first real thread of this entire website! And thank you for being interested enough in this project to document your experiences.

I've just come in late and I won't write much tonight. But a few thoughts -

  • If you are new to this project and have just stumbled onto this thread, realize that you don't need to get involved with coding, Arduino, or any of this other stuff to enjoy the TCB.
  • But if you are like vonTirpitz and want to get under the hood, great! We definitely need developers.
  • vonT, try reading through again the introductory section of the GitHub page where you downloaded the project: GitHub TCB. The reason Arduino is giving you errors when compiling is that it thinks you are trying to compile for the "Genuino Uno" board, but the code is designed for the TCB board. The TCB is based on the Arduino Mega board which uses a different processor. So in the Arduino IDE go to the Tools menu, then Boards, then select Arduino Mega, and it should compile.
  • Now actually the TCB uses a slightly modified arrangement of the Mega than Arduino knows about, so if you really want to do it right you need to edit Arduino's "boards.txt" file and add a new entry for the TCB. Instructions for this are at the link I posted above.
As for inserting hyperlinks into your posts - for security reasons this forum (and all other forums) ignore HTML. Instead the forum uses something called BBC, which stands for Bulletin Board Code. So rather than using html tags, to insert a hyperlink do this instead: [url=www.google.com]Google[/url]. Then the forum will render it as Google.

BBC is standard across pretty much every forum you might encounter so once you get the hang of it then you can use it anywhere.

You can also just highlight the text you want to make a link in your message, then click on the little globe icon in the message editor and it will help you create the link. There are actually two editing modes - advanced (where you have to enter the BBC yourself), or standard (where when you click on the buttons in the editor it does things for you). You can toggle the editing mode when posting by clicking the button that has an icon of an arrow within brackets. See the image below.

Here's a page with more detail on all the BBC codes.

More later!

1164
Scout Dev / Re: Scout ESC - To Do List
« on: January 12, 2017, 11:26:19 AM »
Erik, the final version is actually Rev 10 and I think the one you have is probably 8 or 9 (it should say on the bottom of the board). The Rev 10 files are on the Downloads page, the main difference is that it is slightly wider to make room for a 3-pin JST-PH serial plug instead of the 2-pin on the version you have.

If you don't have Eagle I can make up a dimensional diagram and post it soon. You can also always buy a bare board from OSH Park and then you have the physical thing in your hands if that helps (it's about $24 shipped for three).

I've tried sticking screw holes on the far side several times but there's no good way to do it without significantly increasing the board size. Maybe it's worth doing, I don't know... with a case it would seem the extra screw holes might actually be less important than without a case.

1165
Open Source Sound Dev / Guidelines for Posting in this Forum
« on: January 11, 2017, 08:28:11 PM »
This forum is for discussion of ongoing development of an Open Panzer sound device - in other words, the creation of new firmware and hardware.

If you have general questions about operating your existing Open Panzer products, or need help with a problem or bug, please post in the Open Panzer Help forum instead.

1166
Scout Dev / Guidelines for Posting in this Forum
« on: January 11, 2017, 08:26:11 PM »
This forum is for discussion of ongoing development of the Scout ESC - in other words, changes to the firmware or hardware, or alternate ESC designs.

If you have general questions about operating your Scout, or need help with a problem or bug, please post in the Open Panzer Help forum instead.

1167
TCB Dev / Guidelines for Posting in this Forum
« on: January 11, 2017, 08:25:06 PM »
This forum is for discussion of ongoing development of the TCB - in other words, changes to the firmware, hardware or OP Config.

If you have general questions about operating your TCB, or need help with a problem or bug, please post in the Open Panzer Help forum instead.

1168
News & Announcements / Re: Project Status
« on: January 11, 2017, 01:18:16 PM »
January 10, 2017 -

Great news! Hobby King has decided to produce and sell the TCB. This is a very generous move on their part as they are funding completely the manufacturing costs and undertaking all the financial risks. Hobby King has a long history of supporting open source projects and we're excited to be working with them!

Availability is tentatively scheduled for the spring of 2017. The final price price has not yet been announced but when we know more we'll post it here.

We are still shopping the Scout ESC around to various places but nothing definitive yet.

1169
TCB Dev / Re: TCB - To Do List
« on: December 17, 2016, 04:56:43 PM »
On your TODO list, have you considered hooking the telemetry into OpenTX for the Taranis radios?  It could make pre-battle easier to setup and verify.

This is certainly a possibility. Strategically I think for roughly the same effort development of a telemetry app for smartphones could benefit more end users. Not everyone has a Taranis, or is using OpenTx with it, or wants necessarily to mess with programming on their radio - but everyone already has a smartphone (ironically except myself).

On the other hand, the OpenTx/Taranis community consists of precisely the sort of smart, experienced, computer-savy RC hobbyists that this project needs, and if OpenTx integration got them involved or served as a gateway for those people into the world of open source RC tanks, it would be well worth it.

I've added this to the list.

By the way - congrats on being the first user and the first one to post!

1170
News & Announcements / Project Status
« on: December 17, 2016, 01:19:18 PM »
December 6, 2016 -

After several years of internal development, it's time to hand this project over to the "community" - a community which maybe doesn't yet exist, but we hope will come into being soon.

It is important for you to know, that as of today there is no way for you to purchase any of our products, unless you want to build them yourself. Although we have made dozens of prototypes, assembly is simply too time-consuming and complicated to make these by hand for sale in any quantity and right now there is no manufacturer lined up for production.

The original intent was not to publicize the project until people could actually purchase the TCB - if you can't get one, what's the point? But getting a manufacturer to invest a substantial amount of money in a production run, without knowing the potential demand ahead of time, is a tough sell. Talks are ongoing with several different manufacturers but so far none have made a firm commitment, and I can't predict when or if any will.

So it is time to take the opposite approach - make the project public, let people examine and discuss the capabilities of the Open Panzer project, and let things take their course. 

Everything we design is completely open source. If you are a manufacturer and want to produce these boards, all the designs and bill of materials are freely available on our Downloads page. Have at it! We do ask that you respect the copyright and maintain attribution.

To the tankers and hobbyists - I created this project because this is what I wished existed when I started building model tanks.  I hope you like it. Please read through the Wiki to see what we've made and start some conversations in the forums if you have questions.

Please remember that like the rest of you my time in this project is volunteered, and no one (so far!) has paid me anything. The work accomplished to date is my gift to the RC community, given freely. I will continue to invest in, advocate for, and lead development, but the future of Open Panzer belongs to you!



LukeZ

Pages: 1 ... 75 76 77 [78] 79
bomber-explosion