• Testing oled screen

    andrey.malyshenko08/24/2020 at 19:37 0 comments

    Today i finally booked myself to test oled screen.

    Initially i soldered out headers for both SPI and I2C screens to test them both. 

    First discovery - I've soldered out SPI pins wrong, MISO and MOSI are switched places, but what is more important, with oled display connected to SPI bus it won't boot. Kind of a bummer. 

    According to docs GPIO7 and GPIO8 being SPI CLK and SPI MOSI must be left floating at boot, and clearly that's not the case with screen connected. Of course I'd be able to make it work with buffer IC between omega and screen, but since i was ready to have it only for free, I'm dropping SPI idea alltogether,

    As for I2C screen - it works perfectly normal. Once again in the docs there is a great info how to jump start it and even nice command line tool is bundled in.

    So there it is, i'm keeping I2C version of the screen for next revision and SPI has to go.

  • Revision B PCB came in and soldered

    andrey.malyshenko08/06/2020 at 19:48 0 comments

    Revision B just came and i had a chance to solder it and do a quick test.

    Compared to a previous one, there are few key changes

    - I completely changed power source part. rev A was planned to be used in combination with 2.5 inch HDD and therefore i estimated it to use at least 5W. For this one i decided to keep it simple and replaced it with simple AMS1117 linear reg for digital part, and LP2992 low noise  linear reg for digital part.

    - I made it smaller, to be more specific I tried to make it raspberry pi case compatible. This is yet to test since I'm still waitinf for case to be delivered. 

    - I moved all the parts to front side to simplify assembly and replaced barrel caps with pcb mounts for the same reason.

    - I removed some unused pereferial, instead broke out SPI and I2C headers to plug in OLED screens. Just because why not, it is free:) Yet to test.

    - Added 4 gpio leds, again why not.

    In terms of software so far no change, all works same way as before. Key part is audio DAC, and it works like a charm. So far just an headphones audio test and i'm quite happy with the result, however more test to come.

    As for OLED screen - placement could be better, and testing to do.

    Overall, quite pleased with the result, no major flows, however probably one more revision to come to fix minor issues.

  • Setting up I2S sound output

    andrey.malyshenko07/09/2020 at 22:16 0 comments

    I pretty much followed the official tutorial

    Only pitfall is that you need to use firmware build before b195. I used b193 to be more specific. Full list of old builds can be found here, and instruction on how to flash custom firmware is here.

    Issue with later versions is that at some point I2S was disabled in favor of PWM working on the same pins. 

    As soon as you have proper firmware installed you need to issue following commands

    # install necessary packages
    opkg update
    opkg install alsa-utils mpg123
    # enable I2S
    omega2-ctrl gpiomux set i2s i2s

    Verify that souncard is present

    aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: AudioI2S [Audio-I2S], device 0: ralink-i2s-HiFi HiFi-0 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0

     Presense of this device doesn't imply that souncard is working, it will bang I2S pins even if they hang in the air. But to have the sound device listed is a good sign.

    Next you test audio with any audio file or stream, I used my local stream here

    High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
    	version 1.22.3; written and copyright by Michael Hipp and others
    	free software (LGPL) without any warranty but with best wishes
    Playing MPEG stream 1 of 1: fg ...
    ICY-NAME: Fabio & Grooverider
    ICY-URL: http://www.icecast.org/
    MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo
    ICY-META: StreamTitle='ÿþR - ÿþF';

    Voila, we have a sound!


    - I want to build  latest firmware version with I2S support enabled

    - I found board hanging on wifi initialisation. I soldered 100uF cap to power pins directly and the issue went away. Now i need to  adjust PCB design to have decoupling caps closer to Onion board.

    - Today found an article on separating digital and analog grounds, need to try that as well:)

  • Soldering in pcm5102 and basic testing

    andrey.malyshenko07/08/2020 at 20:16 0 comments

    Soldered in pcm5102, testing it with external i2s source for now, just to verify setup and soldering. Started to work after 2nd attempt. Comparing to known working module (yellow one)

    (Sorry for picture quality, i only posses DS0138 toy oscilloscope)

    10khz on yellow module (known good)

    10khz on my pcb

    20khz on yellow module (known good)

    20khz on my pcb

    Looks very similar, relatively clean (oscilloscope is strugling here, actual waveform is really clean).

    Next on setting up Onion and I2S.