Friday, October 06, 2017

Harry Potter and the Chamber of Secrets in Concert


I wonder if they intend performing concerts for all the Harry Potter movies. In April we attended the Philosopher's Stone, tonight it was The Chamber of Secrets. Next April, Prisoner of Azkaban, assuming that I can get tickets.

What do all three have in common? Well, apart from being Harry Potter movies, of course.

These were the three movies where the legendary John Williams composed the score.

Williams was rather busy during the production so his music was ably adapted and conducted by William Ross.

For this performance at the Sydney Opera House the Sydney Symphony Orchestra was conducted by the effervescent American Jeffrey Schindler. As with the previous concert he exhorted the audience to cheer at their favourite moments and actors, which they duly did.

The performance was great, though it was sometimes hard to concentrate on the music at times due to the distraction of the movie. Williams' action score really shines through during the live performances and this was no exception, though there was one point I wasn't sure if it was Quiddich or chasing Jango Fett on screen. Williams was busy at the time...

The Chamber of Secrets is Alex's favourite Harry Potter movie out of the first three (all he's seen) and he was rapt the entire time, despite the late hour.


Earlier he and I had caught the expensive lift up Sydney Tower. Though the views were good I've seen them a lot lately out the windows of planes and the large groups of tourists reminded me how much I hate being surrounded by tourists, even when I'm one myself.


I'm looking forward now to John Williams' best Harry Potter score in the Prisoner of Azkaban. Hope I can get good tickets!

Wednesday, October 04, 2017

Arduino ticket gate - part 1

Alex is obsessed with automatic ticket gates and desperately wants one to play with in the house. Don't ask me why.

The mechanisms in automatic paper ticket gates are extraordinarily complicated and not something I could hope or want to recreate at home. However, modern gates tend to use RFID stored value cards to trigger them.

Using parts from an Arduino education kit along with an RFID module I bought at Jaycar I was able to build a simple system that triggers a servo motor when an RFID card is tapped on the sensor. It also changes the red LED to the green and plays a sound. I put a delay in to "hold the gate open".




The cheap RFID module seems a bit dodgy and the system often requires a few reboots to work. This is the first time I've soldered and used a circuit board in years. I haven't used the Arduino much either, just following a few of the examples given in the book. Still, I'm pretty pleased with the result!

video

Using the Arduino is so much easier than the electronics I did at uni and as a kid.

The next step is to put it in some housing and attach a "gate" to the servo. Going to get Alex's help to do that.

Sketch


/**
 * Ticket gate model
 * Detect RFID chip and trigger a servo
 */

#include  
#include
#include

#define SS_PIN 10
#define RST_PIN 9
#define GREEN_PIN 6
#define RED_PIN 7
#define PIEZO_PIN 8
#define SERVO_PIN 5

Servo gateServo;
int openTime = 5000;

MFRC522 mfrc522(SS_PIN, RST_PIN);  // Create MFRC522 instance.

void setup() {
  Serial.begin(9600); // Initialize serial communications with the PC
  gateServo.attach(SERVO_PIN);
  gateServo.write(90);
  pinMode(GREEN_PIN, OUTPUT);
  pinMode(RED_PIN, OUTPUT);
  pinMode(PIEZO_PIN, OUTPUT);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(RED_PIN, HIGH);
  
  SPI.begin();      // Init SPI bus
  mfrc522.PCD_Init(); // Init MFRC522 card
}

void loop() {
  // Look for new cards
  if ( ! mfrc522.PICC_IsNewCardPresent()) {
    return;
  }

  // Select one of the cards
  if ( ! mfrc522.PICC_ReadCardSerial()) {
    return;
  }

  gateServo.write(180);
  digitalWrite(GREEN_PIN, HIGH);
  digitalWrite(RED_PIN, LOW);
  tone(PIEZO_PIN, 261, 100);
  delay(100);
  tone(PIEZO_PIN, 392, 200);
  delay(openTime);
  gateServo.write(90);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(RED_PIN, HIGH);
  mfrc522.PICC_HaltA();
}

Popular Posts