Close

Working during holidays -> stress -> mistakes (documenting today's fail)

A project log for BitMasher

Portable lo-fi music sequencer

Michele PerlaMichele Perla 12/31/2014 at 00:540 Comments

Hello there,

I just returned from my hometown, during these 4 days off from Rome I had the time to program something while waiting for the boards and for the enclosure delivery. I got everything on breadboard in order to simulate what the final PCB should do; it includes power control lines, serial communication via external USB-to-Serial converter, 5-way tactile switch w/ mux, and dual channel headphones amplifier in Sallen-Key topology to cut off "all" the nasty sampling stuff. Here's the breadboard setup, in the picture you can also read a test menu on the OLED, right now pressing left or right changes wave sound (sine, tri, saw, square, stair), pressing up or down changes frequency (not yet notes frequencies, it just changes by one the increment rate of the index used to read the tables, so it plays all the natural harmonics of 61 Hz (15.625/256 = 61 Hz)):

First thing: I had to start program way back; working all day long was a big drawback from this and I spent so much time worrying about putting everything together for the final round that I actually forgot to focus on what should be put together in the first place.

I'm saying so because I'm very behind schedule and the sequencer code is not yet up.

I actually got samples playing, and that's a good thing; I also made a small Java app and sketch to stream a few WAV samples (max length 65535 bytes) to the ROM, the Java app takes the file, tells the Trinket Pro how many bytes it contains, then the Trinket Pro writes this length (two bytes) in a known address (the list starts at the beginning of the ROM), along with the address at which the sample is going to be written (4 bytes even though the ROM accepts 24 bits max addresses), and finally the app streams the whole file on the Serial port and the Trinket writes such stream at the specified address; the next file is written after the previous and so on (that is the samples data is contiguous); unfortunately, I think I'm encountering some writing issues because when I try to read such addresses I get some sound glitches; the first written sample is good, the other though are not; he oscilloscope shows that sometimes the output stays high (when you erase the ROM it is put as 0xFF) but I could clearly hear parts of the other samples during the glitches. I may want to dump the ROM and read it as a WAV file to see what's happening.

I also just found out that when a LED on the Trellis is on, a nasty hum goes back into the audio amp surely due to LEDs PWM frequency going back on the power supply. That is not good, but it may be attenuated naturally when putting everything on the PCB (no tangled jumpers and ground plane = good).

Other issue: I TOTALLY forgot to add elongated pads for the very small packages (read: DFN). This has led to trying to solder 3 (THREE!) boards with nasty result, the worst being burned and lifted traces due to overheating (that is me trying to heat those little dabs on the DFN package sides to let some solder flow beneath it). The worst thing is that I actually screwed up a few boards before the one I thought could have been the final one, so I "may" have ran out of a few parts; I'll try to desolder the necessary parts and start over even though I already know it may be just a waste of time (and patience); I might as well send an "enhanced" board to fab altogether and wait for it...Here's a picture of the board:

Here you can see the first screw-up, that is another trace lifted up and I had to solder a jumper to an inductor. In the next photo you can see the multiple screw-up in one take, that is the DFN traces for the LTC2955:

Long story short: today I've failed hard my friends. I wanted to take a finished board with me for my new year's holidays (yep, I'm going out again) so to focus on programming, but I'm back to this:

The funny thing is that I also forgot to take the headphone plug with me because I was trying if it fitted the 3D printed enclosure but I was in a rush to pack up before leaving for a few days... At least the 3D printed enclosure came out nice except for a few minor issues that can be easily solved with some filing. Oh well, glad that my USB-to-serial/ISP-programmer also acts as a very low quality oscilloscope (10KHz in dual channel mode, 20 KHz in single channel mode, plenty for this project).

Last hopes: I really want to get at least a basic sequencer up before the deadline.

Guys, see ya!

Discussions