• Tag Archives youtube
  • Synthwave Shout-out

    Some time ago I discovered the magical music genre of synthwave. It is more or less based on 80’s movie soundtrack music and influenced by other factors such as retrofuturism, chiptunes and 80’s nostalgia. The genre displays a large variety in styles. It can be quite poppy, catchy and accessible, but also very dark and abrasive.

    Here are some artists I see as prime examples of this musical genre:

    Trevor Something makes use of heavy vocals processing, slow plodding beats and synth sounscapes that extend to the horizon (and further). He likes writing melancholic lyrics about love, summer and use of various narcotics.

    Miami Nights 1984 has the ability to immediately transfer you to 80’s Miami, palm trees whizzing by while the radio plays the perfect driving music.

    Com Truise takes a more minimalistic and traditional approach, resulting in hypnotic artificialness. Continue reading  Post ID 3672

  • Trinket powered geiger counter

    Lately I have been messing around a bit with microprocessor powered geiger counters. One smart guy came up with the idea of generating high voltage using PWM signals from the microprocessor itself. With some additional external parts a HV supply and negative going pulse suitable for microprocessors is easy to make. Here is a schematic I came up with:

    gm counter interface

    The circuit works as follows: A ~1 Khz squarewave turns the MPSA44 high voltage transistor on and off, generating high voltage when the  inductors current is shut off. The voltage depends on the pulse width of the square wave which can be tweaked in software. The 1N4007 diode rectifies this voltage, and the HV cap removes most of the ripple on this voltage. The resistor limits current to the GM tube. The current pulses from the tube generate a voltage drop over the 100K resistor which turns on the BC546. When this happens the voltage through the 10K resistor is pulled to ground, generating a negative going pulse each time the GM tube detects an ionizing ray or particle.

    To drive this circuit I used my new Adafruit Trinket, a small board with a Attiny85 microprocessor. Using the tutorials on the Adafruit website it is easy to work with from the Arduino environment. Here is the code:

    void setup() {
     analogWrite(0, 30); //starts PWM on pin 0, generates about 400V
     analogWrite(1, 255); // needed to get LED to full brightness
     attachInterrupt(0,countPulse,FALLING); // attach interrupt to pin 2
    void loop() {
     //nothing much really
    void countPulse(){
     //pulse led
     digitalWrite(1, HIGH);

    And here is a video of the setup in use:


    Of course it is rather wasteful to only use the microprocessor to generate PWM and flash a LED. I plan on implementing counting and serial output in software later. Unfortunately the Trinket does not have native serial USB capability but bit banging a serial signal on one of the pins should work fine according to several sites. Then it is just a matter of adding a cheap PL2303 serial to USB adapter.

    Update 18/4/2014

    Added serial logging capability. Using a tx only software serial library, the Trinket outputs the measurements in CPM each 10 seconds on pin 4. New code:

    // Trinket GM counter by Johan/dynode.nl
    //counting vars
    long count = 0;
    long countPerMinute = 0;
    // init softserial only tx on pin 4
    #include <SendOnlySoftwareSerial.h>
    SendOnlySoftwareSerial mySerial (4);
    void setup() {
      mySerial.begin(9600); // init serial 9k6
      analogWrite(0, 30); //starts PWM on pin 0, generates about 400V
      analogWrite(1, 255); // needed to get LED to full brightness
      attachInterrupt(0,countPulse,FALLING); // attach interrupt to pin 2
      mySerial.println ("Trinket GM counter starting..."); 
    void loop() {
      delay(10000); //the count is incrementing during this delay
      countPerMinute = 6 *count;
      mySerial.println (countPerMinute);
      count=0; //reset the count
    void countPulse(){
        //pulse led when count is increased
        digitalWrite(1, HIGH);

    Example serial output using cheap eBay USB<>TTL serial adapter:

    Trinket GM counter starting...
    402        <--- thorium bearing mantle held next to GM tube

    There still need to be some tweaking done, the circuit is quite susceptible to electromagnetic interference which causes erroneous counts.

  • Old Android phone = cheap IP cam

    So, I got me a new Samsung phone because my old phone, a HTC Wildfire is rather slow, especially when it comes to websurfing. It also has low crap resolution. I am much happier with the new phone. So, what to do with the old phone? It’s still a small computer with a camera and touchscreen that should be doing something instead of gathering dust in a drawer.

    One of the things I thought of was a webcam for my turtle tank. It currently houses two (I think female) red cheeked mud turtles, kinosternon cruentatum. I wanted to observe how often one of turtles gets out of the water to bask and what the general activity in the tank is.

    I rooted the phone since I thought it would be handy to have root anyway and installed Cyanogenmod V7, an alternative Android version. This custom ROM does not include the Google Play store to install stuff on Google Play so I had to manually flash it. I am quite unexperienced rooting Android phones and installing custom software but I got it working eventually.

    Next I installed IP Webcam, a nice free webcam app. Since it has a webinterface for remote access it is easily accessible with any computer. Being http-based it’s very easy to grab the images over the wireless LAN that the phone is on using a bash script:

    montage -geometry +0+0 -background white -label "$FILEDATE" ~/shot.jpg /var/www/meuk/schildpadcam.jpg
    mv ~/shot.jpg /storage/plaatjesenfotoos/schildpadcam_arch/"$(date +%d%m%y%H%M)".jpg

    This script uses wget to fetch the most recent video frame (the app is capturing video all the time), uses the imagemagick tool montage to visually timestamp the image and outputs a new picture in a publicly accessible folder on my server. Finally, the most recently downloaded picture is renamed with a timestamp in the filename and moved to a archive directory on the server. Continue reading  Post ID 3672