Registration Notice

Due to increased spam, forum registration must be manually approved by a moderator! Please see this post for instructions.

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #75 on: April 23, 2019, 01:17:30 PM »
OP Config gives you 10 seconds to push the button on the Teensy, the flash operation doesn't actually start until it detects the button press. But anyway, you have figured it out.

I deduce that you are using the Sound card with the TCB rather than in RC mode. If you get no sound, it could be a wiring issue with your amp, or you might also want to double-check that your sound files are named correctly and saved in the right format (16 bit and 44,100 Hz WAV).

Some users have developed some sound sets for the OP Sound Card which you can download here, if that helps with testing. At least then you know the sound files are not the problem.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline rockchuck

  • 22
    • View Profile
  • australia
Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #76 on: April 26, 2019, 06:10:40 AM »
Thanks Luke.
I got it going, there was a few mishaps-- I was sure I had loaded the sd card with the sound files--  anyhow I checked again and " no sound Files"!!  Anyhow I used the files you listed and tried again. The Teensy activity leds were showing all the right responses just no sound so rechecked all my connections and found the problem in a wiring issue. So once fixed I had sound!  Very happy chappy!! :D

I am using a PAM8610 amp module that I bought online for a few dollars. They are rated at 15 watt into 4 ohm  at 12 volts supply (but at about 10% distortion.).
 So can't have the input to amp up too much as it distorts. I am using a chan on the radio with a pot to control the volume.
Using the 2s supply in a tank which is 7.2volts the amp output is a lot lower around about 6 watts.  It is still quite loud as I'm testing with a Visation FSR7 speaker that has a sensitivity rating of about 88db --not bad for a small speaker.

There is quite a lot of background hiss/noise which I think is due to poor power supply coupling on the amp board as I move the cabling around and the noise levels change.
So my next stage is make a pcb for it which I can hand solder and work out how to fix the amp module to the board as I think you need to keep all the wires as short as possible.
I looked at building the OP Sound card but was a bit unsure about how I would cope with the smd components and with a complete kit with all the parts and a lot of postage charges each board would cost me $120 Aud to make so stuffing a board would be expensive-- I have 15 TCB units that I want to make sound cards for so it is too expensive to go this way.

I can make this stripped down bare bones board for about $50 Aud and I think the sound quality will be good enough. I may have to look at a mute cct that can disconnect the speaker when the TCB/ Sound card boots up as there is a lot of pops and cracks getting into the speaker before the unit is ready. I assume some of this is from the cheap amp board so some more investigation is required.

cheers
rockchuck

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #77 on: April 26, 2019, 03:58:31 PM »
Glad to see you making progress. Noise issues are definitely a challenge on these circuits and it gets worse the higher the amplification, 15 watts is a lot.

The PAM8610 does have a MUTE pin, but I don't know if it is broken out on the board you bought or not. If you can access it, connect it to Pin 14 of the Teensy. The mute pin on your PAM operates in the same manner as the amp we are using on the official OP design (V2 and later hardware), which is to say, a logic level HIGH on the pin mutes the amp and a logic level LOW enables sound. The firmware is already written to keep the amp muted during boot-up for the reasons you mentioned, and it also automatically mutes the amp anytime a sound is not playing which eliminates noise during static moments. You may want to also add a resistor to that mute line pulling it up to VDD (+5V) so that even before the microprocessor has time to get started the MUTE line will be held high (see the schematic for the OP sound card for how I've done it).

That will help, but as for the rest you are right, you need to keep the wires/traces as short as possible and away from wires/traces that carry other signals. One thing I noticed a big problem with was two-way receivers like the FrSky and others, in those cases you want to keep the RC antenna as far away from the amp as possible.

I have 15 TCB units that I want to make sound cards for. . .
Good heavens! I think you set the record. I should have been so forward thinking.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline johnnyvd

  • 170
    • View Profile
  • Netherlands
Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #78 on: April 29, 2019, 06:35:30 AM »
I finally got to reflowing the Open Sound Cards.. Quite easy actually with a stencil and reflow oven!
The biggest challenge is orienting the led's in the right way!

But even with my old eyes (without glasses  ;D) i managed to position all parts in the right way! (i know, some ar upside-down)..
I will take care with the next ones in the series! Still 10 to go!

Next up is the Scout!

*edit: pictures as attachments..



20190426_170900.jpg
Open Source Sound using Teensy 3.2 and PJRC Audio Library 20190426_170900.jpg
Views: 3571
20190426_170908.jpg
Open Source Sound using Teensy 3.2 and PJRC Audio Library 20190426_170908.jpg
Views: 1723
20190427_102926.jpg
Open Source Sound using Teensy 3.2 and PJRC Audio Library 20190427_102926.jpg
Views: 1377
« Last Edit: April 30, 2019, 02:41:53 PM by johnnyvd »
* E-75 / E-100 PAK44 "monster" - in progress
* Sturmjagdtiger PAK44 - in progress
* pz.kpfw KV-2 754(r) - in progress
* T-34 88mm "Kurland Tiger" - in progress

*

Offline jhamm

  • 142
  • It´s a hobby no profession!
    • View Profile
  • Germany
Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #79 on: April 30, 2019, 04:02:26 AM »
No Pictures... :-\

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #80 on: April 30, 2019, 02:37:38 PM »
Glad to hear someone having success with reflow, it's fun when it works.

Feel free to upload your images to the forum rather than link them to an external site, although I know the one drawback of that is that the forum doesn't do inline attachments.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #81 on: May 13, 2019, 04:00:37 PM »
It is an interesting question if a simplified version of the sound card could be made with off-the-shelf parts that would involve more or less minimal soldering and no SMD components. As always there are complications to everything, the SD card is one complication as already mentioned. There is one SD card shield for the Teensy but the design of it hides the reset button on the Teensy which you actually need to flash firmware. Nothing is ever easy. On the other hand, cheap amplifier breakout boards are widely available on eBay and Chinese sites so that part is convenient.

I am giving this some thought and I plan to test a few components. The short answer is that right now there is no good way, but if I come up with something I will post here again with my findings.
Just a brief update, I tried experimenting with various cheap off-the-shelf amplifiers that you can get on eBay, AliExpress and elsewhere and the results have not been good. The sound quality is very poor and/or the volume level is far too low. Most of these only run on 5 volts or less and are rated under 3 watts. Clean audio circuits are tricky enough with a well-designed PCB, but as soon as you start hacking and wiring in a DIY fashion the AC circuits are that much more prone to interference which translates to noise out the speaker.

As Rock has shown it's possible for the tinkerers out there to make something work but from my end I've decided not to invest time in a separate DIY/or through-hole version because I think the end result would attract limited interest and also ultimately not meet standards.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

The sound card can't work in RC mode
« Reply #82 on: July 21, 2019, 08:19:00 AM »
I'm very interested in your Open Panzer Sound Card,and I have made one myself.I use it in RC mode,but the Mute pin is always high even in the test mode.I don't know why . I donwload you source code and always put the Mute pin to low , it works in test mode, so I think there is no problem in the hardware.There is many noise, because the Mute pin is always low.Any suggestion?
Here is a video of my system
The yellow Led is bling, so the audio is playing ,but no sound.When I foced Mute pin to low ,it works.What is the mistake?

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #83 on: July 21, 2019, 01:25:08 PM »
Hi Luckowner. There might be a bug in the sound card firmware, I have posted an update (v0.93.50). Please re-flash your soundcard with this update and let me know if that fixes it.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #84 on: July 21, 2019, 09:08:03 PM »
Hi Luckowner. There might be a bug in the sound card firmware, I have posted an update (v0.93.50). Please re-flash your soundcard with this update and let me know if that fixes it.
It realy works! Thank you. I use this card on my 1/14 Scania truck,it's too big for me. So my next step is to make a little one base on your hardware.In fact,design has been completed but production has not yet started. I am not sure if I can make one without teensy, so all the components can be placed on one board. It is very important to me because I want to make it as small as possible.
The attach picture show my first design with teensy.  I'm trying to avoid using it.This board is 23*52mm I think I can make it more small.
test sound card.png
Open Source Sound using Teensy 3.2 and PJRC Audio Library test sound card.png
Views: 1093

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #85 on: July 21, 2019, 09:21:51 PM »
Very good! Thank you for bringing this to my attention as it is important to fix any bugs or errors in the code.

I do not think it will be very easy to eliminate the Teensy, but you can try. In addition to the main MK20DX256VLH7 processor which you can obtain anywhere, you can purchase from PJRC a pre-loaded bootloader chip that will give you compatibility with Teensyduino, see this link. There are two options, both have the same functionality, but the MKL02 is smaller in size. You can then follow the Teensy 3.2 schematic to match up the MK20DX256 pins with "Teensy pins."

The designer of the Teensy, Paul Stoffregen, has said before that routing for the Teensy 3.2 was a difficult job and I believe him. However you will not need to use very many pins so that will be some help to you. If you are good at board design and routing I am sure it is possible, but it may not be worth the effort. Already your board design is considerably smaller than mine.

Regardless, keep us updated on your progress!
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #86 on: July 22, 2019, 12:34:59 AM »
Very good! Thank you for bringing this to my attention as it is important to fix any bugs or errors in the code.

I do not think it will be very easy to eliminate the Teensy, but you can try. In addition to the main MK20DX256VLH7 processor which you can obtain anywhere, you can purchase from PJRC a pre-loaded bootloader chip that will give you compatibility with Teensyduino, see this link. There are two options, both have the same functionality, but the MKL02 is smaller in size. You can then follow the Teensy 3.2 schematic to match up the MK20DX256 pins with "Teensy pins."

The designer of the Teensy, Paul Stoffregen, has said before that routing for the Teensy 3.2 was a difficult job and I believe him. However you will not need to use very many pins so that will be some help to you. If you are good at board design and routing I am sure it is possible, but it may not be worth the effort. Already your board design is considerably smaller than mine.

Regardless, keep us updated on your progress!
I think Paul Stoffregen is right too, but I will try. I'm following the schematic. The mirco usb part is not necessary for this card,and I can put all the pin at one side.Two side board is enough and difficulty will be greatly reduced.
Just a suggestion, why don't you use stm32? Of couse ,Freescale is more powerfulIt, but stm32 is more cheap and more popular.

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #87 on: July 22, 2019, 11:36:13 AM »
STM32 might also be a good choice, but I already had experience with ARM and the work PJRC has done, especially with the Audio library, has saved us hundreds and probably thousands of hours of work. Because I don't have a lot of free time and no one is paying me to do this I try to use what will be the most direct route to the goal!

If anyone wants to port my code (either the sound card or the TCB) to STM32 that would be an interesting project and they are welcome to do so.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #88 on: July 23, 2019, 08:43:38 AM »
STM32 might also be a good choice, but I already had experience with ARM and the work PJRC has done, especially with the Audio library, has saved us hundreds and probably thousands of hours of work. Because I don't have a lot of free time and no one is paying me to do this I try to use what will be the most direct route to the goal!

If anyone wants to port my code (either the sound card or the TCB) to STM32 that would be an interesting project and they are welcome to do so.
I want to try but I think the first thing is to design a little board. Another bug .When I set RC 5 to switch mode there is no use. I'm following your code but I think it will take some time. And a suggestion, can your make some sound at a specific  speed? For example, when the truck is backing up ,there is always a Beep. I am trying to followyour code and make some changes. The big logic is basically understood.
*
enstart1.doc
(1912.57 kB ~ Downloads: 335)
« Last Edit: July 23, 2019, 11:16:42 AM by luckowner »

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: Open Source Sound using Teensy 3.2 and PJRC Audio Library
« Reply #89 on: July 23, 2019, 01:23:37 PM »
Can  you describe in more detail the issue with Switch 5? Is it a problem specifying the switch function in INI Creator? Or does that part work but the function doesn't trigger correctly on the sound card itself?

Can you also post your INI file?

I will think about the engine speed request. All that sort of thing is possible with the TCB but the configuration framework on this device is much more simple as you can see (no dynamic allocation of functions with triggers). In the meantime, if you are using a programmable transmitter you can accomplish what you propose with a transmitter mix. But it depends on your transmitter, it is true that most pistol-grip car radios do not have that level of programmability.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

 

bomber-explosion