Saturday, 4 November 2017

Beginner DC motors

DC motor circuit - no Arduino yet
I finally have progressed far enough with my Arduino to be able to start setting up my car. In the starter kit you do eventually get to DC motors, but it's about lesson 9 out of 15. There is a bit to work through before you get there. I thought it would be easier to set up the motors than what it is, but there is all this stuff about inductance and back-emf and having to protect your circuitry. Also DC motors require more current than the Arduino can provide. Moving things takes a lot of energy, and when the DC motor starts it draws as much current as it can, the Arduino only provides 40 mA, which is not enough for the motor to start moving.

The basics of running a DC motor is that you would need a diode and a power source. This doesn't even require the Arduino. If you want to also use the Ardiuno then you will also need a transistor. The transister allows you to control the high voltage/high current power source with your low current Arduino. It is basically a digital switch, providing a voltage closes the transistors gate, and allows the higher voltage/current to flow through into the motor. The diode is necessary to protect your transistor from the DC motor.

DC motors are inductors, in that the electrical current being passed through the motor induces a magnetic field. When you turn off the electrical current, by opening the transistor gate, the magnetic field starts to collapse, but the energy stored in the motor will oppose this change in the magnetic field, and so try to generate a current to keep that magnetic field going. This means it's trying to arc over the opened gate in the transistor. This can damage the transistor because this arc can generate a lot of heat, think of lightning.

In order to prevent the damage you add the diode. The diode allows current to flow in one direction only, it's like a dam, water can only flow out of a dam, not up the dam wall. So if you add a diode you can create a circuit such that when the transistor gate is closed no current is flowing through the diode, only the motor, but when the gate opens, the diode allows the induced current to flow through it, rather than causing an arc across the transistor gate. There are still some limitations, if you had a massive motor and used a tiny little diode that wouldn't work well. For a start you could get current still flowing through the diode, as if you apply enough energy to water, you can get it to flow up the dam wall. Doing that to a dam might be ok, but a diode is going to be pretty unhappy.
Circuit diagram, when the switch is open, current
generated by DC motor flows through diode
The other thing with DC motors that threw me off to start was that there is no negative and positive marking. Up until that point everything with my Arduino was very clearly marked as positive and negative, there was always one way for components to go in your circuit, and suddenly you have this thing that can fry your components, but with no markings. This is because for a motor it doesn't matter, it can go forwards or backwards, you flow current one way, the motor turns, you flow it the other way, it turns the other way.



I'm using a motor similar to this DC Motor, since I kind of guessed at the type of motor I wanted to get when buying my Arduino, this one worked pretty well.

Sunday, 29 October 2017

Arduino

The Arduino starter kit - so much stuff!
I bought myself an Arduino microcontroller the other week. A microcontroller is part of a computer, but not a computer. You can't run an operating system on it, so it's not like a raspberry pi, but if you want to mess around with electronics then it is super simple to get started.

The Arduino project is pretty cool, it started in Italy, and they have decided to open source everything! All the libraries are available and people are contributing to them. They even open-sourced the hardware, which means there are now heaps of Arduino copies out there, making it really cheap to get into.

It being a microcontroller means you can upload a single program to it and it will run, and that's all it does. You download the IDE (the coding environment), write your program, plug in the Arduino, upload and it immediately starts running. So simple to get started, from unboxing to getting my first flashing light took 10 minutes. That is crazy streamlined.

A raspberry pi can obviously do a lot more, it being a proper computer, but with great power comes great responsibility, and it's a bit more arduous to get flashing lights from a raspberry pi. Though you use python on a raspberry, rather than the C/C++ of Aduino, which if you are a beginner can be an easier language.

I bought the Arduino starter kit, my ultimate goal is to build a robot car, I even have the chassis and some motors, but I'm not really sure how to wire everything up. I thought I would start simple and work my way up. The starter kit comes with so much stuff, I'm sure you could do this yourself, if you research all the components on line, and electronics seem pretty cheap if you are just buying resistors and stuff. But then all the wires I get in the kit are pre-cut and pre-stripped making it super easy to work with a breadboard - no soldering required!

The start of my chassis. I didn't realise you are meant to peel that brown stuff off
I think it's kind of aimed at kids, but I don't care, it is pretty fun building your own stuff. It's a funny feeling being able to build your own stuff. It means it's kind of impossible to break something, I mean sure you can burn out a component, but since you built everything yourself, you know how to replace it and keep going.

Sunday, 3 September 2017

Bratislava

The upside down table of the Slovak castle
We took an overnight train from Krakow to Bratislava, the trains are not what I am used to. In western Europe you would always take trains, they are much faster than driving and a lot less stressful. But in central Europe that is not the case, trains can be twice the time as driving. You can drive Krakow to Bratislava in 4 hours, the fastest train is 6 hours and the night train is 8 hours.

I was kind of keen to take the night train anyway, we took one in Egypt years ago and that was pretty fun, so I thought it would be similar. It was not quite the same though, a lot more juddery and noisy, with a lot of sharp braking and squealing. But our hotel in Bratislava was amazing, which more than made up for it. I think the best hotel we stayed at the whole trip, amazing breakfast, lovely rooms, and friendly staff.

Bratislava was an interesting little town, I wouldn't spend more than a day there. It is obviously not on the main tourist route. They don't get nearly as many people as Krakow or Budapest does. And it is all the better for it.

I really liked Bratislava, the old town is really pretty. There is a lot more of a contrast between the old town and the rest of the town in Bratislava. In Krakow it felt like there was some money there, outside of the old town, it was a bit more run down, but not majorly so, maybe a little worse than Paris. In Krakow the train station was super flash, full of shops and restaurants and all very new. And then you get off the train in Bratislava and it's like travelling back 50 years or something. A really dark, low ceilinged station, everything is really old and cramped, and driving into the old town the buildings were quite similar to that. Big, Soviet era style apartment blocks, a lot of graffiti and concrete. But then you walk into the old town and it's this lovely pedestrianised area, with the historical buildings and the castle on the hill. They are obviously putting all their money into the old town.
There were awesome statues everywhere
They have the obligatory castle on a hill which the locals think looks like an upside-down kitchen table. On the other side of the Danube from the old-town is the communist-era apartment blocks, which is a bit of a contrast with the picture-perfect old town. They are probably not making the most of the Danube. It seems to be something most towns with a river running through it struggle with. What to do with the river. I guess in the past the river was the main artery of the city, so now we all have cars instead of boats they build big roads running alongside the river. It means the river kind of gets isolated from the city, you can't reach it without crossing multi-lane roads, and you wouldn't really want to anyway, since once there you are surrounded by cars.
Communism and fashion - looks OK to me
Dave struggling with the passage

One surprising thing with Bratislava were the number of great art galleries and museums. I was not expecting that. None of them were very large, maybe an hour at most, but there was a big variety. The main gallery is the Slovak National gallery. That was interesting because they had this communism and fashion exhibition on at the time. You forget that all these countries were behind the iron curtain after World War II so this fashion exhibit was weird for someone from the west. Even the clothes everyone wore were part of their grand communism plan. They didn't want to encourage individualism. As well as the SNG we also saw tapestries in the town hall, Gothic art, modern art and the coolest conceptual installation I think I've ever seen. Called the passage, its a room with books for walls, the floor and ceiling is all mirrors and with a narrow walkway in the middle. Even though you know you are walking on the ground it feels like you are suspended in a room full of books.

Slovakia seemed like a cool little country, I don't think many people spend long here. Perhaps because it seems like kind of a peaceful country. The Czech Republic and Slovakia decided to peacefully dissolve Czechoslovakia on the same day to form the separate countries, that seems rare for country formation. It seemed that one of the important reasons why Slovakia ended up being it's own country is that they kept their language alive. Hungary was so massive and dominated a lot of regions, but it seemed you really needed the separate language to have a hope of forming your own country at some point. You wonder how many other regions in Hungary used to have their own language at some point, and if they had kept speaking it, would Hungary be a lot smaller now that it is.
The Danube and communist apartment blocks
One other cool thing about Bratislava that I didn't know is that it was the coronation town for Hungarian royalty for 300 years. Impressive for a town that is now another country's capital city.  I also didn't appreciate how close it is to Austria, from the castle hill you are basically looking straight into Austria.

Saturday, 1 July 2017

Wieliczka Salt Mine

Even the chandelier crystals are salt
After being let down at Auschwitz, we were blown away at Wieliczka. This is Polish Disney world, or a working medieval salt mine on the outskirts of Krakow. This place knew how to get a lot of people through small enclosed spaces, whilst never feeling claustrophobic or rushed by other tourists. The salt mine was opened in the 13th century and was working continuously until 2007. It was awesome!

You go down in this tiny little 3-level elevator, where as many people are crammed in as possible, and then a few more people are added. And I'm thinking, oh man, what have I got myself in for, is this going to be super uncomfortable and claustrophobic the whole time. But after the trip down, you get out into this large cavern and tunnels. No need to duck your head. You are surrounded by salt, but it's not just boring tunnels, the miners got really artistic and started carving statues and even a whole cathedral down there.

It's really quite amazing, and not at all what I was expecting. I was thinking some really small cave-like mine. All rough-hewn with rocks all over the place, and maybe a few glimpses of salt. But these are perfectly smooth tunnels, carved directly in the salt. And it's huge, 300m deep and 287 km long, when you visit you are walking along tunnels that were made in the 16th and 17th centuries. Which is crazy to think about. You definitely want to visit this place when you come to Krakow, it is for sure worth it.

The Last Supper - in salt
The amazing cathedral

They have gone full tourist with this experience too, there are shops and cafes and meeting rooms down there. You can even spend the night or get married down there. I did not expect there to be something like this in Krakow. I really should have done more research before visiting. I have really been remiss in my central European studies.

Saturday, 24 June 2017

Auschwitz

The barracks at Auschwitz
One of the main reasons I wanted to visit Krakow was to go to Auschwitz. I had been to Dachau before and that was overwhelming. Dachau was never a mass extermination camp the way Auschwitz was. I wanted to get a sense of how bad it really was.

Dachau seemed to be set up as a memorial to the people who died as well as making sure no-one forgot what had happened. I never got that same feeling in Auschwitz.

Barbed wire fences at Auschwitz
When you visit Auschwitz you have to go with a guide, they had 2 million people visit in 2016 and it seems they feel this is the only way to manage that many people coming through. It ended up feeling very different from Dachau. There I remembered a very solemn atmosphere with time to look around and feel what had happened. In Auschwitz you are forced into a group of 50 people, given earphones to hear the guide, and then follow on the heels of another 50 person tour group. With yet another massive group right behind you.

There was never any time to contemplate things, you were forced on the move the whole time. And even though Auschwitz is quite large, all the tour groups go to the same buildings. So you are constantly squeezing past people or waiting for other people to clear the rooms ahead of you. It feels like they have made the decision that everyone who wants to see Auschwitz should be allowed the opportunity, which is an admirable decision. I worry that in making sure everyone can visit that they are destroying what they should be preserving.

Chimneys at Birkenau
The end of the tracks at Birkenau

I would not go with an organised tour if you can help it. We went because it seemed the easiest and I thought a guide would help understand what is around you. Auschwitz is 60km outside Krakow and is not super simple to get there independently. If you arrive before 10am you don't have to join a tour, I would definitely do that if you can. That way you can take as long as you want, I think there are audio guides and there are also information boards all around the place. It wasn't as if the guide added anything in terms of information or emotion, so don't feel like you are missing anything. That way you can avoid the crowds of people and actually remember what should be preserved.

Inside the barracks at Birkenau
Even though the atmosphere wasn't what I was expecting you still leave blown away at what happened. Another of those overwhelming moments.

Auschwitz ended up being too small for the Nazis and they progressively built more and more camps around the town. That was another thing I didn't realise, Auschwitz used to be an army barracks and it's in a town, Oswiecim. I always imagined these places being in the middle of nowhere.

We visited Birkenau at the same time, it's about a kilometre from Auschwitz, and it's an almost empty field, it's massive, but most of the sheds where people used to be kept have been destroyed. Because the original barracks at Auschwitz were too small for the Nazi's extermination plans, they built Birkenau. Birkenau was really something else, just this train line ending in the middle of this field. When the prisoners arrived, after being locked in train carriages with no food or water whilst they travelled from wherever they lived, they would then be sorted, the old, infirm and children immediately murdered. The inside of the barracks here were horrible, the bare minimum to be considered a shelter. I can't imagine this place during winter, it must have been freezing.
The Nazis destroyed the gas chambers before they abandoned Birkenau
I think it definitely needs visiting, but don't use it as a learning experience, do your learning before you come. And go early in the day, by yourself, if you can.

Saturday, 17 June 2017

Tring Circular - Day Walk

Cool forest at the start of the walk
I think this is one of the better walks around London. It's a circular walk from Tring, north west of London. We did this walk back over Christmas, there was still some frost on the ground in the morning. But otherwise it was a glorious day, beautiful blue skies the whole day, though still pretty chilly.

From the train station you follow the ridgeway to Ivinghoe Beacon, the ridgeway is one of Britain's oldest roads. It links Avebury (near Stonehenge) with Ivinghoe Beacon and people have been using it for 5000 years. I was thinking Ivinghoe Beacon might be some ancient Roman ruin on a hill, but it's not, you do have to kind of climb up to it at least, at a mighty 233m high. It did have a good view, and there was some memorial on it.

Once you are at Ivinghoe Beacon you then start the Icknield Way, a great name for a walking trail. This is a modern route that tries to follow, as closely as possible, another ancient road. Along this whole first section you are walking along this chalk ridge, which is kind of cool. You are getting great views for this whole morning.
View from the Beacon
The Bridgewater Monument

Along this section there is also meant to be one of the best bluebells woods in the country, that's a big claim in Britain. But since it was December we thought we may as well give it a miss. A reason to come back in spring!

For most of the day we were in lovely sunshine, but there was one weird point, where we entered this dense pine forest, the trees were so close together that it was really dark in there. Quite spooky!

After the spooky forest it was on to Bridgewater monument, this is in the Ashridge Estate. The most famous owner of this estate was the "Canal Duke", Francis the 3rd Duke of Bridgewater. He was apparently the builder of the first "true" canal in Britain. He built it to transport his coal from his mines to Manchester. Apparently this canal was such a success it kicked off a mania for canal building. In remembrance of this first canal this monument was built in 1832, it was a pretty massive monument for just the first canal.

How haunted does this forest look?

Saturday, 10 June 2017

Krakow

The market square with huge church on right
We have just got back from an 18 day adventure through central Europe. I would have said Eastern Europe, but when we were there all the locals were very clear we were in central, not eastern, Europe. I don't know if it's an Australian thing, but I never really knew there was a centre in Europe, it was either east or west. I think they don't like to say they are eastern, because that was the countries behind the iron curtain. And I guess those countries now bare little resemblance to what they were like back then. Perhaps it's also because those countries want to be closer to western Europe, and central is closer than eastern.

Anyway it's things like this that made the whole 18 days a massive learning experience. Everyday it was another new thing. I thought I had kind of a handle on history, but then I visited central Europe. There have been a loooot of wars through this region, it feels like almost constantly, so that has really added to the history.

Awesome old street - with great facades
We were in Krakow over Easter, which turned out to be super cold. And also everyone seemed surprisingly religious. I don't think many places would be shut in London just because it was Easter. We are a much less religious society I think. On good Friday, which I would have thought was the more holy day, everything seemed to still be open. But then Saturday, Sunday and Monday most things were closed. On Saturday everyone was walking around with little baskets full of food. It seemed they went to church to get their food blessed and then they ate the food on Sunday. I'd never heard of that Easter tradition. There didn't seem to be as many chocolate easter eggs around either. I don't think you could avoid them in London, but I hardly saw any in Krakow.

I'm not sure if people are actually more religious in Krakow, or if it was because it was Easter, but all the churches were full. No matter what time we visited. Not only that, if Polish people entered they would always kneel down and cross themselves. I never knew what genuflecting was before I saw it in action. I've never seen that in any English church, granted they are always completely empty when I visit, so maybe some people here still genuflect. And it's not as if it was only old people in the churches, it was young people too. English priests would kill to get those demographics.

Another church in Krakow
There were also a lot of churches, it's as if every tourist site was a church. I've never seen so many. It was like if you replaced all the pubs in London with churches that would be Krakow. And there were very few pubs in Krakow. It's almost as if the English worship a different type of God. There would be churches right next door to each other, and they all seemed to be the same faith. It wasn't as if there was a Catholic church next to an Orthodox church, they are pretty much all Catholic. It's hard to describe just how many churches they have.

As a tourist Krakow is a pretty cool city to visit. It has a really big old town, with wonderful facades and cobblestoned streets (and a lot of churches), there is also a castle on a hill. They have done a great job with maintaining the town, and I guess joining the EU has really helped them. Outside the old town is a bit different again, more gritty, but they still have an old Jewish quarter as well as the Jewish ghetto. Polish Jews didn't do so well during the war. It feels a bit like Berlin, if Berlin ever gets too expensive for the artists I feel like Krakow would be a good fit. I'm not too sure about the current government though, maybe they would have to be a bit less right-wing.

Last gate remaining from old walls
Circling the old town is a strip of park, called the Planty, great name! And it does a good job of separating the old town from traffic, you do feel isolated from the modern world once you are passed the Planty.

The market square is really something to see, it is massive, with 3 churches, of course. It dates back to the 1200's and there is this super old church kind of in the middle. This church is 1000 years old, and you actually have to go down steps to get inside, since the ground around it has risen from when it was built. It's a tiny little church inside, though from the outside it looks much bigger. The churches here all seem to have massively thick walls.

The main church is St Mary's, every hour a trumpeter plays from all four corners of the main tower. Each time they play the tune is cut off mid note. This is to commemorate a 13th century trumpeter who was shot in the throat whilst warning of the Mongol invasion. I never knew Mongols made it this far East, crazy!


Monument to the battle against Teutonic knights
There also used to be a commonwealth of Poland and Lithuania, again I never knew this. And the combined army took on and defeated the Teutonic knights in one of the largest battles in medieval Europe. Again I knew nothing about this.  The history you get living in London is so skewed to western Europe (meaning England and France) that you wouldn't think there were any other nations of note, and certainly nothing important happening anywhere else in Europe. This trip really opened my eyes to how western Europe centred my focus has been. The Teutonic knights had the largest castle in the world, which still exists in Malbork in Poland. This sort of stuff was why the trip was kind of overwhelming. Every day you are learning this mind-blowing stuff, you can never "do" Europe, the depth of history and stuff here is just crazy.