Kids workshop: build a synth

Status
Not open for further replies.

Nico-L

New member
Hello,

I am currently working on the setup of activities around sound and music for kids (ten years old and up). One of the activity is the creation and the building of a synth using a Teensy 3.2, along what Sparkun proposed with their digital handpan. I'd have some questions both from the hardware and software point of view

hardware:
I would like to propose an autonomous setup and remains as simple and low cost as possible. The base is teensy 3.2 + the audio board feeding a PAM8403 amp driving some audio exciters as well as proposing the jack output for use with headphones.
* One the audio board, do the lines-out cut out when the headphone is plugged?

* It seems to me that the simplest way to power the setup is to use the usb socket that becomes standard for usb charge, either with a power bank or directly to the socket (with a phone charger for example). The Teensy would power the PAM, either at 3.3 V on 4Ohms speaker or for extra juice using a 5V step-up on 8 Ohms speaker. This would need around 400 mA for both solution. Would it be possible from the Teensy ? Would a 5V power socket be preferable?

* the handpan use 8 touch pads and have to use the 25,32 and 33 pins to get the necessary input (as well and pin 15, no volume control from the audio board then). These pins are quite fragile, and due to the audio shield, no pin can be solder to ease the handling. Any advice on dealing with these pins? On my prototype I directly sold wires on the pads but I always fear that a connection could be lost.

* I understand the connections between the Teensy and the audio board have to be kept as short as possible and stacking the boards are the best solution but it is then difficult to access pins when mounted on a breadboard for example, and the usb socket and the jack face the same direction, which may be difficult to handle depending on the answer on the power question... How would using the board side by side affect the sound quality?

software:
I am currently putting quite an effort on the software part for a facilitation towards the youngest (and adult not tecchy at all). I base my work on a visual programmation tool named bitbloq (based on Google blockly) which is a nodejs application. I create some dedicated blocks to hide a bit the code complexity, and kind of re done the excellent audio GUI based on node-red but I wanted to have a unique tool (without mentioning the workshops are in French).
The issue is to compile and upload the sketches. Bitbloq is mainly focused on arduino like boards. They developed a nice piece of code based on platformio to build an upload with avrdude... that can not be used for Teensy. I have to developed another solution.
* for compiling I'll use the command line for arduino, as discussed here and here. From my understanding, something like
Code:
arduino_debug --board teensy:avr:teensy31 --verify path/to/sketch.ino

then 

teensy_loader_cli --mcu:mk20dx256 or
should do the trick. Is there any gotcha I have to take care of?

* I have to implement this in javascript/nodejs, some any examples would be welcome if they exist.

Overall, there may be a main flaw in the way I am thinking up the whole thing, do not hesitate to bring better ideas!

thanks
 
I am currently working on the setup of activities around sound and music for kids (ten years old and up).

Sounds pretty awesome.

I'm trying to get caught up to forum messages I've missed over the last week, so here's just some quick answers to the specific questions...

do the lines-out cut out when the headphone is plugged?

No, the line outs continue sending a signal.

It seems to me that the simplest way to power the setup is to use the usb socket that becomes standard for usb charge, either with a power bank or directly to the socket (with a phone charger for example).

Yes, USB power is the simplest way, especially when the output is to headphone or a speaker.

When you start connecting to other grounded equipment, analog ground loop problems can come up, because the USB cable connects to the computer's ground which is almost always earth grounded, unless using a laptop running from its battery.

The Teensy would power the PAM, either at 3.3 V on 4Ohms speaker or for extra juice using a 5V step-up on 8 Ohms speaker. This would need around 400 mA for both solution. Would it be possible from the Teensy ? Would a 5V power socket be preferable?

Usually you can get up to 500 mA from the 5V power of the USB cable, if plugged directly into a PC or a powered hub. Unpowered hubs are often pretty limited, so you would want to avoid those.

The 3.3V output is not recommended for more than 250 mA. I would not recommend power an amplifier for a 4 ohm speaker from the 3.3V power. The peak current will be far too high.

the usb socket and the jack face the same direction, which may be difficult to handle depending on the answer on the power question... How would using the board side by side affect the sound quality?

Usually wires under a few inches are fine. A good quality ground connection between the boards really help. These signals are digital data, so if it works the sound quality should not be impacted.

However, you should be aware the rapid digital switching on these wires, and especially the switching signals at the output of a class D amplifier will dramatically interfere with capacitive touch sensing. The touch sensing wires and electrodes need to be kept far away from these fast switching digital signals.

developed a nice piece of code based on platformio to build an upload with avrdude... that can not be used for Teensy. I have to developed another solution.

I highly recommend at least starting with Arduino + Teensyduino.
 
Hi Paul,

Thank you for taking time to answer my numerous questions.

I succeeded in compiling and uploading using the platformio command line. The button-push forced me to hack a bit (more) into the bitbloq code to catch the warning message. It is not very clean but it works.

Regarding the powering, I understand that even is USB is the simplest way, if I want to power the PAM, I have to provide a dedicated source that would feed both Teensy and PAM. A usb charger for instance would have all the current needed for the application. But is it a good idea to split the wiring of a female micro usb socket to Teensy and to the amp? What would you recommend?

Finally, I'm not sure to understand the fast digital switching issue, I'm hitting my current knowledge limits:
* the fast switching wires are those connecting Teensy to the audio board?
* the class D amplifier is the PAM right? I have to keep the touch sensing wire and electrodes far away from the wires connecting the PAM to the speakers? All the stuff will be enclose in a dedicated box so the space there won't be hudge. I am concerned how far is "far". Again, what would you recommend? Should I use more regular buttons?

Thanks again for your precious answer.
 
if I want to power the PAM, I have to provide a dedicated source that would feed both Teensy and PAM. A usb charger for instance would have all the current needed for the application. But is it a good idea to split the wiring of a female micro usb socket to Teensy and to the amp? What would you recommend?

Teensy 3.2 has a pair of pads on the button side which you can cut apart, to separate the USB power from external power. That prevents the external power from being able to flow back into your PC.

Finally, I'm not sure to understand the fast digital switching issue

The capacitive sensing pins are very sensitive. Fast switching signals like digital audio data and especially the output of any class D audio amp will severely interfere, if located within the general area, even if not touching. Sorry, I don't have time for a lengthy explanation... you're going to have to just trust me on that one. (or maybe someone else can add to this....)
 
I trust you! I just want to make sure that I'd have enough space to put all the wiring far enough from each other so they won't interfere. I'll test.
 
Status
Not open for further replies.
Back
Top