Troubleshooting power on/midi play/keyboard play problem

Discuss x0x construction and related issues

Moderators: altitude, adafruit_support_bill, adafruit, phono, hamburgers

Please be positive and constructive with your questions and comments.
Locked
User avatar
sacha
 
Posts: 5
Joined: Sun Nov 02, 2014 2:49 am

Troubleshooting power on/midi play/keyboard play problem

Post by sacha »

My wife built an x0xb0x a couple of years ago. After completing the build it seemed to work fine. After having it sit on the shelf for a while, recently I decided to start using it again. That is when the following problems started. I am posting here so that my troubleshooting efforts could be useful to others with similar symptoms; and perhaps to get some feedback/suggestions from hardware gurus here. So here it goes:

My b0x has several problems, which may or may not be related to each other:

1) Often it does not start up. Sometimes, some leds come on and stay on. Other times, no leds come on at all, or all leds come on and stay on. The b0x does not respond to any key presses (i.e. its frozen, does not produce any sound, no blinking tempo light). I am using an 800mA 9vAC adapter. However, occasionally it does start up, and when that happens it works- as in, I can play back/edit patterns. If/when it comes on, power cycling it sometimes results in the startup problems reappearing; and sometimes it (repeatedly) just starts up as expected.

2) IF the b0x starts up, I cannot get midi play to work (I know how to set up Ableton as a midi/clock master). I got midi sync to work once.

3) IF the b0x starts up, keyboard play does not work

Here is what I did to troubleshoot so far; none of these seemed to resolve the problem:

- I programmed Sokkos 2.0 successfully
- I reseated the ATMega162 CPU
- I tried different wall outlets (to rule out variations in line voltage); including using a UPS
- I verified that the voltages from the power supply were according to those listed in the build manual on the ladyada site

... and this is where I'm currently at. I'm not sure what to do next. My current line of thinking is that the CPU could be faulty (which could explain all 3 problems). Another cause could be in the power-on-reset circuitry; but I have not had the time to look into this (and I'm by no means a hardware guru)

Does anyone have any insights/suggestions to offer about what could be the problem(s) here?

User avatar
antto
 
Posts: 1636
Joined: Thu Apr 15, 2010 3:21 pm

Re: Troubleshooting power on/midi play/keyboard play problem

Post by antto »

i suspect that when you turn the x0x ON and it "freezes" with semi-random LEDs - it might be in bootload mode.. since that's what the bootloader does - it makes the device look like frozen and waits for commands from outside

here's how to test this theory:
turn the x0x OFF/ON untill you get it into the "frozen" state, then use the control app and try reflashing the firmware
- if reflashing works, or even if there is any kind of meaningful response to the control app - then that's the bootloader right there
- if the app thinks that the x0x doesn't respond - then it's probably not the bootloader but it has really frozen (this would be very weird and i would retry the test again at least a few more times)

if the frozen state is actually the bootloader being running - then it has to be an issue related to the rotary selectors, because the bootloader only remains running after power-up if the MODE selector is pointing at "BOOTLOAD", and should jump to the firmware if it's not

MIDIPLAY mode: the x0x expects notes on a specific Channel, you have to either change this (iirc using the BANK selector, the selected MIDI channel is shown on the BANK LEDs) or set your DAW to send MIDI Notes on that channel

Keyboard mode: if you press the Keyboard buttons - their LEDs should get lit accordingly too, if that doesn't happen - then probably there's an issue with the buttons<-cpu communication

User avatar
rv0
 
Posts: 395
Joined: Tue Jul 14, 2009 4:50 pm

Re: Troubleshooting power on/midi play/keyboard play problem

Post by rv0 »

Problem also looks like what happens if the voltage on boot drops too low (burnout detection fuse setting).

User avatar
sacha
 
Posts: 5
Joined: Sun Nov 02, 2014 2:49 am

Re: Troubleshooting power on/midi play/keyboard play problem

Post by sacha »

I did some more testing, keeping in mind what Antto replied.

With the b0x 'frozen' I tried to test whether the cpu is in boot loader mode; it was not. BANNED was not able to upload firmware. I tried this several times, so it looks like the CPU really freezes.

Furthermore, I don't expect the issue to be with the rotary knob, since IF the b0x starts up, the rotary knob does work (e.g. I can switch between pattern play and pattern edit mode). Also, the keyboard seems to work, as I can edit patterns normally.

MIDIPLAY mode: I have not seen the BANK leds light up to indicate which midi channel is currently active. I tried setting the rotary knob to every possible position but the b0x would not play notes. I made sure that the DAW was sending midi note on/off on the appropriate channel when turning the rotary knob- I verified that using another midi instrument I have and a midi monitor running on another computer) . Another thing; MIDI THRU works just fine (so, daisy chaining another midi instrument with the b0x); and driving a VST with midi from the b0x also works (meaning; program a pattern in the b0x, hit play, and both the b0x and the slave VST instrument will play the same notes). I ~think~ pattern playback when synced to midi clock provided by the DAW also worked, at least once, but I'm not sure. I will check that the next time the b0x starts up, which by now is rarely. In the past couple of days, the number of times the b0x successfully starts is decreasing. What is really strange that IF the b0x starts, it runs fine (until I power cycle it again)

KEYBOARD mode: the keyboard LEDs do not light up when pressing a key; and no note is played. Since the keyboard works in other modes, I don't think that the keyboard->CPU communication is the problem.

Darffader suggested that there may be issues with the power dropping too low during boot phase. Although the power adapter provides 11vac and I measured the voltage at the atmega162 to be a little over 5v, it could be that that adapter is bad. Or that the outlet voltage is (too) dirty. I've noticed that problem before (I have two pinball machines who are "not happy" when I plug them directly into the wall outlet; which is why I have a UPS that conditions the outlet power).

I have an Atmel programmer; I will see if I can use that to check the fuses one of these days. The ATMega CPU came from Adafruit directly; other than updating the firmware the other day I did not tamper with it. I seem to recall from a forum post that if adafruit provided the CPU that the switch settings will not be a problem (can someone confirm that?). I will also get a new ac adapter; and take the b0x to my university and try it there.

Thanks so far for your suggestions so far. I am really puzzled about what the cause of these problems could be.

User avatar
rv0
 
Posts: 395
Joined: Tue Jul 14, 2009 4:50 pm

Re: Troubleshooting power on/midi play/keyboard play problem

Post by rv0 »

If you have a programmer, it wouldn't not hurt to try setting the fuses with it. I used AVRFuses to do this in the past. (was using a x0xlarge cpu though)

User avatar
antto
 
Posts: 1636
Joined: Thu Apr 15, 2010 3:21 pm

Re: Troubleshooting power on/midi play/keyboard play problem

Post by antto »

you have an AVR programmer
the very first thing i would ask you to do is to dump the fuses and lock bits and post them here

weird problem

User avatar
sacha
 
Posts: 5
Joined: Sun Nov 02, 2014 2:49 am

Re: Troubleshooting power on/midi play/keyboard play problem

Post by sacha »

I need to get a 40 pin IC socket so that I can attach it to the AVR ISP mk2 programmer. I tried it without the socket by just plugging the atmega162 into a breadboard and wiring the avr programmer directly into the breadboard, but I don't think that the pins actually make a decent/reliable connection (the avr programmer status led is blinking in orange which means something like 'reversed target cable connection'. This is both with and without the cpu on the breadboard)

I will order the parts I need from Mouser, along with a new atmega162. When they arrive, I will continue with the debugging efforts

I also looked at the schematic to see how the rotary knobs (bank select, function select) are wired up, I thought that perhaps one of the pins (rotary1,2,4,8) may have an intermittent connection to the CPU, but I don't think that I can easily measure that. If debugging the CPU does not lead me to find the cause of the problem, I will reflow the function rotary knob and the associated diodes (as the bank rotary seemed to work just fine)

Thanks again for your suggestions, I really appreciate it :-)

Locked
Please be positive and constructive with your questions and comments.

Return to “Making x0x”