Category Archives: Know-How

#oggstreamer – UserInterface for optional LEDs

I just added a small but neat feature I want to include in the V1.0 of the OggStreamer firmware – it is a user interface that allows to control the optional LEDs on the right side of the device.

How it works – the main application (oggs_app) is creating a named pipe in the temporary directory, the name of the file is /tmp/userleds

so the following command will set the optional green led on


echo 1 > /tmp/userleds

you can send any parameter from 0 to 7 to /tmp/userleds. The parameter is interpreted as binary representation of the leds. 1 is the GREEN led, 2 is the YELLOW led, 4 is the RED led. 0 is all leds OFF and 7 is all leds ON

this feature unfolds its potential when you combine it with shell scripts – for example – everyone likes blinking LEDs.

#!/bin/sh
while [ 1 ]; do
  echo 7 > /tmp/userleds
  sleep 1
  echo 0 > / tmp/userleds
  sleep 1
done

But also more useful tasks can be done, for example monitoring whether an IPAddr can be pinged.

#!/bin/sh
while [ 1 ]; do
  ping -c 1 $1
  if [ "$?" == "1" ]; then
     #ping did not succed -> display RED Led
     echo 4 > /tmp/userleds
  else
     #ping did succed -> display GREEN Led
     echo 1 > /tmp/userleds
  fi
  sleep 10
done

 

 

#oggstreamer – Batch Assembling 40pcs.(3) – Frontpanel assembly

For the OggStreamer frontpanel I needed to come up with a solution to produce light-guides that direct the light from the VU-Meter, Power and On-Air LEDs. The first Idea was to use a 3D Printer and print this light-guides out of transparent PLA. But after trying to imaging how the light-guides would look like, I gave up on this Idea and developed a different process for this. Now I am using the transparent properties of Hot-Glue to act as light-guide and glue the LED-PCB in Place at the same time. The transparent Hot-Glue fills all the space of the CNC-punched holes in the aluminum front-panel. In order to produce a smooth surface I am using a glass plate.

Step 1: You will have to apply a lubricant on the glass plate to form a thin oily film so that the Hot-Glue doesn’t stick to good on the glass – which would make separating the completed assemble from the glass a pain in the a**.  (Notice the broken glass plate from our attempts without lubricant!!) WARNING: You are using a glass plate, which can break and have sharp edges. So be careful and don’t apply excessive force – If your assembly got stuck on the glass plate you can use a Hot-Air-Gun to separate it, clean it and repeat the process.
IMG_20130919_141429
Step 2: Evenly spread the lubricant – don’t wipe it of the plate, but try to produce a tiny but consistent film on the glass plate, without producing droplets.
IMG_20130919_141437
Step 3: Fix the aluminum front-panel  with office clips to the glass plate – adjust the office clips in a way so that they will help you aligning the LED-PCB.
IMG_20130919_141600
Step 4: Wait till your Hot-Glue Gun has reached steady temperature and begin applying the Hot-Glue just over the holes of Power and OnAir LED. Remember to do this and the following steps quickly, because you only have a limited time windows to apply the LED-PCB proper.
IMG_20130919_141710
Step 5: Do the same for the VU-Meter holes.
IMG_20130919_141715
Step 6: Once all glue is applied gently push in the LED-PCB – So that the still liquid Hot-Glue is pushed towards the glass plate.
IMG_20130919_141736
Step 7: The Hot-Glue is still liquid for a few seconds, you can use the time to turn around the glass plate to see if the LED-PCB is properly aligned and if needed adjust its position.
IMG_20130919_141505
Step 8: Let the assembly cool down – if you are producing more then one unit, you can use this time to prepare the next one.
IMG_20130919_141756
Step 9: Remove the cooled down assembly gently – you shouldn’t need to much force – as the applied lubricant forms a layer between the HotGlue and the glass.  In any case be careful – you are handeling a glass plate which has the chance to break – The glass plate you see in the picture broke because we were trying to seperate the assembly from the glass plate using a screw driver.
IMG_20130919_141847
Step 10: Now you can start installing the push button and the potentiometer – We start with the push button first. Take care not to forget about the elastics ring that comes with the push button.
IMG_20130919_141931
Step 11: Insert the push button from the TOP side.
IMG_20130919_141954
Step 12: Mount the Pushbutton with plastic Nut – the force of your fingers is enough to mount the plastic nut securly in place
IMG_20130919_142011
Step 13: Insert the Potentiometer-PCB from the BOTTOM side.
IMG_20130919_142101
Step 14: Place the washer and the Nut for the Potentiometer from the TOP Side. And gently fix it with the flat wrench.
IMG_20130919_142117
Step 15: Press the prepared Potentiometer Knob on the the Potentiometer – You might need to use a drill (6mm) to prepare the Knob. Only push the Knob with gentle force.
IMG_20130919_142152
Step 16: Use the corner of a Table (or something similar) to support the Potentiometer from the backside and apply a bit more force so that the Potentiometer Knob is securely mounted to the Potentiometer.
IMG_20130919_142228
Step 17: Glue the cable of the push button according to the picture. (optional)
IMG_20130919_152849
The final result:
IMG_20130919_153106

Although this process works very well – you need to take into account that gluing the PCB in Place makes it a bit harder to repair or replace. You will need to use a Hot Air-Gun to separate the aluminum front-panel from the LED-PCB, further you will need a little patience to remove the glue residue. But it is definitvly doable.

#oggstreamer – Batch Assembling 40pcs.(2) – THT Soldering

We received our PCBs from the manufacturer with all SMT Parts presolderd, but we still had to solder the THT Parts – The following two videos shows this process. Warning: You will see some improvised soldering … 🙂

Part 1:

Part 2:

#oggstreamer – Batch Assembling 40pcs.(1) – LineOut Jack

Today we assembled around 40 front panels – like these ones:

SONY DSC

the assembly of the cable to the Jack has been done before. Today we did the following steps:

1. Removing the anodized aluminium at the corners so that the screws make a proper electrical connection to the main body

SONY DSC

2. Removing that anodized aluminium at the back of the front panel to ensure a proper grounding of the LineOut Jack

SONY DSC

3. Cutting a piece of copper tape (approx. 2,5cm)

SONY DSC

4. Making an additional cut to copper tape – this is where we will make the solder joint to the Jack

SONY DSC

5. Applying the copper tape to the back of the front panel (be careful with the orientation of the cut for the solider joint)

SONY DSC

6. Cutting the hole in the copper tape

SONY DSC

7. Inserting the Jack (once again check orientation)

SONY DSC

8. Place the plastic washer and the plastic nut on the Jack

SONY DSC

9. Mount gently the plastic nut

SONY DSC

10.Bend the cutout of the copper tape so it touches the first Pin (GND) of the Jack …

SONY DSC

11. … and solder it

SONY DSC

12. Solder the first capacitor (10nF 100V)

SONY DSC13. Solder the second capacitor (10nF 100V)

SONY DSC

The final result:

SONY DSC SONY DSC

Stay tuned for more Batch Assembling 40pcs. photo-series and videos … 🙂

#oggstreamer – Lasermarkings Designfiles

The Design of the Laser-Markings was done using Inkscape and GIMP – Many thanks to my sister this way, who made the OggStreamer look proper. The font used in all of the Files is called Xolonium which is licensed under GPL special thanks go to Severin Meyer who designed this great font.

You will notice that only FRONT,BACK and TOP are drawn in Inkscape – thats because of the great number of Logos it was easier to draw the BOTTOM directly with GIMP – and we already new at this moment, that the CorelDraw wouldn’t open our SVGs.

here are the PNG

DPI600_PIXELREWORK  - OggStreamer Graphik-Design BACK DPI600_PIXELREWORK - OggStreamer Graphik-Design FRONT
DPI600_PIXELREWORK - OggStreamer Graphik-Design TOP DPI600_PIXELREWORK - OggStreamer Graphik-Design BOTTOM

The whole process of Laser Marking was not really easy. One main reason for this was that Inkscape always exports Fonts Anti-Aliased … And opening the SVGs in CorelDraw directly didn’t work either. with Fonts Anti-Aliased exported we produced strange effects on the Laser, which apparently only uses Black and White as information … There was some trickery needed in order to get the Design done proper. We also tweaked the Bitmaps on Pixel-by-Pixel to get good results … So your millage may very if you want to use the PNGs from above.

Because the case was already anodized aluminum – and engraving already bright anodized aluminum results in poor contrasted, we needed to use special Transfer-Tape (CerMark LM6018) and Marking Paste (markSolid 904). The Transfer-Tape was used for the non-dense Designs (FRONT,BACK,TOP) – the Marking Paste was applied with an Airbrush for the denser populated BOTTOM.

the SVGs for FRONT, BACK, TOP can downloaded from the mcad-repository

#oggstreamer – PCB oddities

continuing the Murphey’s Law topic … I want to present to you an oddity i discovered one single LED PCB (I checked 20 boards and only found 1 with this error).

Here you have a working and a non working version of this PCB – can you figure out the 2 mistakes?

SONY DSC

Rather interesting what had happened here. Isn’t it? My guess is that the photo paint in the PCB production progress had some adhesion-problem . It slipped away and was “caught” by a nearby pad …

#oggstreamer – graphics design finished

I just tested the graphics, which will be laser engraved in the final oggstreamers. For the test I used a transparency sheet and laser printed the graphics with 600 dpi.

The result looks quite promising – here it is: (sorry for the bad photo quality)

IMG_20130226_130942

IMG_20130226_131008IMG_20130226_131000IMG_20130226_131032

#oggstreamer – A Digital Media Primer for Geeks

The guys from xiph.org – who also developed the nice ogg/vorbis algorithm the OggStreamer is using – explain in an amusing video the basics of digital Audio and Video.

thanks xiph.org for your great codecs and thanks for the following video:

#oggstreamer – restore system state after powerfail

Here are my thoughts on how to utilise the EEPROM for storing the system state. The main Idea behind the following “algorithm” is that we record the numbers of how often the button is pressed. Further we use a Power Cycle ID (short PCID) and a cyclic buffer to store the state.

The PCID is incremented (+1 mod 256) everytime the device is powered up. Due to the mod 256 The PCID ranges from 0 to 255 and after 255 starts again at 0.

The cyclic buffer holds 254 bytes and the buffer pointer is incremented (+1 mod 255) everytime when a byte is written.

What now happens it that everytime we press the button (remark this presented algorithm only works for devices with one button) we write the PCID at the pointer of the cyclic buffer. Additionally the PCID is also written everytime the device is powered up.

I will give now an example with an reduced 15 bytes buffer:

0,1,1,2,2,2,3,3,3,3,4,5,6,7,8

so what story does this buffer tells us, well
at first power up there was no button pressed – at 2nd the button was pressed one time, at 3rd two times, at 4th 3 times – then the device was powered up 5 times without a pressed button.

By reading the cyclic buffer we also find out what the last PCID was. In our case 8 was the last PCID, because 8 > 0 – we further have carefully choosen our cyclic buffer to be 254 bytes long – so even if we warp around from 256 to 0 we (at worst case) have possibility to obain the last PCID because the difference hast to be greater or equal to two.

PCID = x[i] where (x[i mod 255] – x[(i + 1) mod 255]) mod 256 >= 2

In this way we can determin our last PCID and we also know how often the button was pressed before the last power cycle and therefore we can restore our system state.

As our buffer holds 254 bytes and we have assured 300 000 writecycles in our EEPROM – this translates to apr. 76 Mio button activations. – way more than the mechanics of the button would be able to handle. UPDATE: looking in the STM8 Datasheet it shows that we have a stoarage granularity of 4 Bytes. – this needs to be taken into account when implementing the cyclic buffer (for example to blow up the buffer from 255 bytes up to 1020 bytes)

#oggstreamer – Project Status 2011

Hi everybody – finally i found time to write some code for the Oggstreamer and i put to work some of the basic functions of the device. I started with the StatusLEDs and the VU-Meter …

There are some news: I switched to the IAR Workbench Kickstarter Version for STM8 because i like the Idea of having an all in on package for Firmware development – And especially when it comes to debugging i find this Software package quite comfortable. The preliminary Sourcecode for the STM8 Firmware got new git-repository, which can be found here. The Kickstarter Version is limited to 8 KB Codesize, which should not be a problem – i expect the firmware to be around 4KB big – the remaining 24KB of flash can be used to store patchfile updateimages for the VS1063

The first thing i implemented on the firmware are the routines for LED – Muxing. We are using one complete PORT (GPIOB) and some controll Lines on GPIOA to drive the LEDs. Timer4 is used to generate a 450 Hz Inerrupt and because we are Muxing 3 different LED-Rows (VU-LEFT, VU-RIGHT and STATUS) – each row gets updated at a 150 Hz Refresh rate. The CPU usage for the muxing is around 0,2 % which is little enough in my eyes.

I also tried to get the VS1063 running – but measuring the Crystal it showed that it is not oscillating  – I also remembered that i had some shorts on the supply lines, because at first try the VS1063 was not proper soldered – maybe I killed the VS1063 and i have to replace it now – but this issue definitely needs further investigation.

My best wishes to all of you for the new year. 🙂