Taking my Tesla to the mountains and back

I’ve been driving around in the car of my dreams since November now, a beautiful red Tesla Model S. But driving electric presents some challenges, at least until the infrastructure gets to a point where you don’t have to think about where to charge anymore. One of the ultimate tests for us was if we could use the car to get to our cabin in the mountains, at Skramstadsætra, and back, without any major problems. Last weekend we finally put the car to the test!

So, why was this a challenge? Well, first of all, the distance from our house to where we park the car in the mountain near our cabin is 187km. That doesn’t sound so bad, does it? The stated range of the Model S is 480km, although we all know that’s under pretty optimal conditions. But so far, it doesn’t sound like much of a challenge at all. But then consider this: we have no way to charge the car up there. The parking lot does not have any electrical power. Our cabin does not have electrical power (and is also about a 30min trip on skis from the parking lot during winter). Actually, there are no available chargers anywhere in the area. Ok, so, fine, that just means we have to make the roundtrip on a single charge. 187*2 = 374, which is still well within the stated range, so all should be fine, right? Next detail: we’re in Norway. Norway isn’t exactly flat. So it’s not just the last part of going up the hill to the parking lot that is going to put a strain on the battery, it’s the entire trip of basically going up and down mostly all the time.

Well, challenge set! So we charged up the battery to 100%. The typical range when we started our trip was 396km (which was, kind of disappointingly, lower than we had expected, but this range calculation might be influenced by our daily driving, I’m not sure). We put the car in range mode to save some energy on the climate control (although the car still kept a good climate) and set off. Luckily, our skis fit inside the car, so no range would be lost to having to mount a roof rack :)

On our way there, we didn’t really think all that much about economizing energy. We felt pretty confident that we would be able to get far enough back towards Oslo that we would be able to reach a charger if need be. But we still drove far more economically than usual, not pushing the car’s limits on the highway, and trying to flow with the terrain and not speed past slow going cars. The last bit up the hill of course sucked a lot of range from the battery, but we figured we might recover some of that going back down again. The verdict when we parked the car: 198km of range left. Ok, so we had used pretty much exactly half of it. Confident that it would not be a problem getting back, we put the car in energy saving mode (hoping it wouldn’t consume much energy just standing there), took our skis and went up to the cabin.

There was quite a lot of snow up there!

Two days later, before heading back to the car, we checked the app and were disappointed to see that two days parked in not very cold, but still sub zero temperatures at night had decreased the range to 175km. We debated pre-heating the car to get the battery warmed up and thus be able to regenerate more on the way down, but we weren’t sure if it would be worth it overall, so we didn’t. Instead we noted the address of the nearest chargers compatible with the Model S, one 142km away, and one 166km away (yes, we really were in a charger desert. There is one closer, at 43km away, but that is Chademo, which there isn’t an adapter for yet). As we started going down the hill, with almost no regenerative capabilities, we were lacking 9km of range to get home. However, we decided to make it a challenge and try to get home without having to recharge. We set the navigation to our home address so we could keep track of the distance left and compare that to the estimated range left, and started slowly going down the hill in order to regenerate as much as possible with a cold battery. To our surprise, as we were nearing the bottom of the hill, the range had actually gone up to 180km, possibly due to a warmer battery recuperating some energy. So in a very short time, the range and the distance left to travel was getting closer to each other. Once on the main road we just kept to the speed limit, which was going to be between 60km/h and 80km/h for the most part until we reached the highway nearer to Oslo. We had tried the cruise control for a bit going the other way, but quickly decided that I was doing a better job at conserving energy ;)

We took great pleasure in seeing that the difference between the range left and the distance left kept increasing, and started to really believe we wouldn’t have to stop to recharge. But we also knew that once we reached the highway, we would have to go below the speed limit of 100km/h to be sure to reach all the way. Since we also live on a hill in Oslo, we needed some slack to get all the way there too ;)

On the highway we found a truck that was doing an average speed of about 90km/h and decided to just stick behind it (at a safe distance of course). It was a bit painful to be in a sports car and not zip by trucks and other slow-going cars, and even more painful to be passed by another Model S, but it was also fun to see that we were succeeding in our challenge.

The result? We parked the car with 44km of range left! The roundtrip on one charge was a success. The car passed the test :) We never felt any of this infamous range anxiety, we only felt more and more confidence that the car was up to the challenge, and it wasn’t like we had to drive super slowly either. Just a little bit under the speed limit on the highway. We also never turned off the heating, or the internet radio or anything else. In overall lost time on a 2 hour trip, it was probably 10 minutes, much less than we would have had to stop for a charge if we had been going faster. Average energy used for the entire trip was 167 Wh/km, although it was significantly less for the return trip only. The average for the last 50km said 140 Wh/km when we parked. Plus, the car is such a breeze to drive, whether I’m treating it as a sports car, or an electrical car in need of range conserving gentle handling. I love my car :D

Posted in Gizmos | Tagged | Leave a comment

Super Mario ambience for my Jolla

My latest phone is the Jolla phone that runs the new Sailfish OS, and it’s a very good successor to the now dead Nokia N9 Meego OS. I preordered mine as soon as it was possible, and have been happily using it since December :)

One particular feature of Sailfish is the use of ambiences. Now, the thing about these ambiences is that they have rather peculiar dimensions, compared to what you’d normally set as a wallpaper on your phone. In fact, the ambience has to be 540×1600 pixels. Not a lot of wallpapers out there with that dimension now, are there? The factory ambiences that were insmario_ambiencetalled on the phone are nice, but kind of boring. I haven’t found anything else interesting out there either, it’s all mostly abstract pictures/art. Time for something more geeky! :D

So here it is, my home-made Super Mario ambience for Jolla. I just downloaded an almost empty background image from New Super Mario Bros (I think it’s from the Wii version…), stretched the sky a bit and added some underground (to reach the 1600 pixels high, and make the main image be visible on the lock screen). Then I found some other elements (beanstalk, Mario, enemies, coins) to put in there and placed them around to create a nice little scene.  What I like most about this now is that you can only see the Star coin when pulling down the top menu. If you like Mario and want a fun ambience for your Jolla, feel free to download this one. Enjoy!

Disclaimer: I’m in no way a photoshop guru (actually, it’s made with Gimp). And yes, there may be some scaling of certain elements that is off. Still, it looks good on the phone :)

Posted in Gizmos | Tagged , , , , , | Leave a comment

Getting started with Python on EV3

So I’ve been diving head first into LEGO’s newest Mindstorms generation, called EV3. But seeing as I’m a Linux geek and a programmer, using LEGO’s own graphical drag-and-drop programming language from their windows/mac software was completely out of the question! Now, the EV3 runs Linux out of the box, which is very cool, but it comes with some limitations, so to get going with a proper programming language, installing another Linux version was necessary. Luckily, the EV3 makes that so much simpler than the NXT did. Just pop a bootable OS on a micro SD card, stuff in the EV3, and voila, it will boot from the SD card! Pop the card back out, and the EV3 still has it’s factory firmware. No flashing needed! Neat!

So what programming language to use? Well, turns out some guy who calls himself Topikachu has already made a ready Linux image with Python installed, and even made Python libraries to interface with the EV3 sensors and motors. Does it get any better than that? He’s made a quick howto on how to install it, which you can read on his github. If you have a USB Wifi dongle too (currently only one is supported, but I’m sure more will be added in time), it was very easy to get it hooked up on wifi too. I just had to log in over usb as described, update the wpa_supplicant.conf and I was good to go without a cable. You may want to check out what IP your brick received before unplugging the usb cable though ;)

The Python API is really great, but I couldn’t find much documentation of it, so I had to read his code and look at his tests to figure out how to use it. Wasn’t too hard though, and here’s a little program I wrote just to test out that things were working (it doesn’t do much, basically just tries to crash :P)

#!/usr/bin/python

import time

from ev3.rawdevice import motordevice
from ev3.rawdevice import analogdevice
from ev3.rawdevice import uartdevice

from ev3 import lego

motordevice.open_device()
analogdevice.open_device()
uartdevice.open_device() 

A = 0x01
B = 0x02
C = 0x04
D = 0x08

right = A
left = D
both = A+D

touch = lego.EV3TouchSensor(0)
ir = lego.EV3IRSensor(3)
ir.set_prox_mode()

motordevice.speed(both,20)

distance = 101

while True:
  time.sleep(1)
  if touch.is_pressed() == 1:
    motordevice.stop(both, brake=1)
    print "stopping\n"
    break

  cur_distance = ir.get_distance()
  if cur_distance > distance:
    print "searching\n"
    motordevice.stop(both, brake=1)
    motordevice.speed(A, 20)
    time.sleep(1)
    motordevice.stop(A, brake=1)
    motordevice.speed(both,20)

  distance = cur_distance

motordevice.stop(both, brake=1)

That doesn’t look so hard, does it? Here’s some additional notes I made for myself to remember what the different functions do and how to use them.

Motors:
A = 0x01
B = 0x02
C = 0x04
D = 0x08
PORTS = A+B # Access both A and B at the same time
from ev3.rawdevice import motordevice
motordevice.open_device()

motordevice.speed(PORTS,20)
motordevice.stop(B,brake=1) # brake makes it actually brake the motor, not just stop turning it

from ev3.rawdevice import analogdevice
analogdevice.open_device()
touch = lego.EV3TouchSensor(0) # Note, the port numbering is 0-3, so the port marked 1 is 0, etc.
touch.is_pressed()

from ev3.rawdevice import uartdevice
uartdevice.open_device()
color = lego.EV3ColorSensor(3)
color.set_color_mode()
color.color_to_string() # This only works for color_mode
color.set_ref_raw_mode() # raw values, -127 -> 127
color.get_value() # raw value from sensor sensor

ir = lego.EV3IRSensor(2)
ir.set_prox_mode() # proximity mode
ir.get_distance() # for prox mode
ir.set_remote_mode() # for using the remote control
ir.get_remote_command() # get remote control command
ir.set_seek_mode() # follow remote control when button pressed
ir.get_all_direction_and_distance #  for seek mode
ir.get_direction_and_distance(chan) #  for seek mode

# This is how I managed to read info from a Hitechnic accelerometer sensor (originally made for the NXT)
from ev3 import robot
from ev3 import sensor
robot.open_all_devices()
iicsensor = IICSensor()
iicsensor = sensor.IICSensor(1, 0x02)
iicsensor.read(0x42)
Posted in LEGO, Linux, Scripts | Tagged , , , | 16 Comments

Winter mountain: finishing up

I can see that the hard work on my mountain killed my blogging. I had planned to keep this updated with my progression, but I ended up spending all my free time building on it instead. The deadline was approaching too fast, so the stress caught me. So here’s all the further progress shots I took:

The village has taken form

Building upwards on the mountain side

 

Ski slope is taking shape

Closing the loop, now it’s a volcano! :P

Ski jump in place, and ski slopes and tracks in place.

 

Building up the steep side

 

Details on the mountain side, trees and cabins.

At this point I was so panicky about finishing up in last few days, I didn’t take any more progress shots. A couple of days later, the mountain was to be moved and set up at the exhibition in Telenor Arena. More on that later :)

Yes, I’ll be getting back into blogging now, and I’ll be doing some catch-up posts on what I’ve been busy with lately.

Posted in LEGO | 1 Comment

Winter mountain: Placing the village, and finding the form

My mountain is slowly starting to find it’s form, and I’ve figured out a lot about how to build it, and where it will slope how steeply. I’ve also started to place the buildings in the village part of this layout, and landscape around them. So far, my biggest concern is if I have enough bricks. That may sound weird when I’ve ordered 30.000 bricks for this project, but they get used pretty quickly… It’s probably a bit like estimating an IT project, I should have multiplied by pi :P Too bad it would have been very expensive to do so…

Posted in LEGO | Tagged | Leave a comment

My biggest project yet: a mountain

I’ve finally gotten started on what is definitely my biggest project yet: a winter mountain for my winter village. I already have a lot of the houses that  I will use for it, so most of the work is on the landscaping. I have a acquired a massive amount of white bricks in different shapes, and have finally started to build with them. I have take over the kitchen table (with even an extra plate added on the side), and have layed out the size it will be in baseplates. There isn’t much to see yet, but here’s an overview picture to show he scale of it…

Posted in LEGO | Tagged | Leave a comment

A trip to the hospital

While photographing my hospital, I also had some fun taking shots from a minifig’s point of view with my phone. I tried to get good lighting inside, and I think the pictures turned out pretty OK, so here’s a little story told through those pictures.

“Whoah, that guy does not look good. I better keep my distance, in case what he has is contagious. I hope I don’t they don’t make me sit here and wait next to him…”

“Hello Sir, how may I help you?”
“Uhm, hi, I’m here to visit my daughter who was brought in earlier to give birth to my grandchild.”
“Ok, then you need to take the elevator up to the first floor…”
“Eh, sorry what, first floor? Isn’t this the first floor?”
“Well, yes, in Norway it is, but we’re speaking English now, so this is the ground floor, and you need to take the elevator up to the first floor, so that would be second floor in Norwegian then.”
“Uh, yeah, uhm, ok… and then?”
“Then you just follow the corridor, past the toilets, and walk to the end, there’s the maternity ward.”
“Ok, what room is she in?”
“You didn’t tell me her name…”
“Oh, right, it’s Johanna Hansen”
“One moment please… She’s in room 103″
“Ok, so second floor, 103, got it, thank you!”
“I thought I said first floor, I hope he presses the right button in the elevator…”

“Oh, the doctor’s office’s door is open. I wonder if he has a patient in there… No, don’t look, there could be more contagious people in there! Or maybe he’s just bracing himself to call in the sick dude in the waiting room. I bet doctor’s are afraid to catch all the diseases coming in here too…”
“Pling!”
“Ah, there’s the elevator. Now let’s see… Second floor, was it? No, first floor, no, eh… Shit… Ok, I’ll try the 2-button.”

*elevator music*

“Hum di dum….”

“Pling!”

“Ok, here we go…”

 

“Oh, this looks like the cafeteria. Did the receptionist mention that in any way? No, I thought he only said something about toilets… Maybe it wasn’t this floor after all. Hm, I could have a look around on this floor first, just to be sure. But maybe I’ll grab something to eat first, I am sort of hungry, and that croissant looks delicious.”
“Hello, can I get you anything?”
“Yes, I’ll have a croissant please.”
“Here you are Sir, that’ll be 10 bucks.”
“Let’s see… Here!”
“Thank you.”
“Btw, is the maternity ward on this floor?”
“No, it’s one floor down.”
“Ah, ok, thank you.”

“Maybe I’ll just sit over here and eat my croissant before I go down. Wouldn’t want them to think I prioritized getting some food before coming to visit. Oh man, I’m going to be such a lousy grandfather. Mmmm, this croissant is quite good. I wonder what that guy over there is here for. He’s so nicely dressed. Oh, what if he’s the hospital administrator? Nah, I doubt that.”

“Munch munch”

“Ok, that’s the end of the croissant, better head down a floor then. Time to go see my grandchild!”

“Pling!”

“Ok, so, button 1 this time.”

“Pling!”

“Ok, here are some toilets! So just follow this corridor then… Oh! babies! Oh, hey Dan! How is Johanna? Why aren’t you in there with her?”
“I fainted, so they threw me out…”
“She’s still in labour?”
“Yes, apparently, we’re having twins!”
“You are? Oh dear… congratulations then!”
“Yes, well, I’m a bit overwhelmed… If you want to see the first twin, it’s her right inside the window here. They don’t trust me to hold her right now because I fainted earlier, but I’m sure they’ll let you go inside and see her. I hope Johanna is ok in there though, apparently, the second twin was a bit reluctant to come out…”
“Oh my, yes, I hope she’s ok. I don’t think I should go in, I’d probably faint too! I did when Johanna was born… I’ll just go in and see the first born then. Does she have a name yet?”
“No, when we were told it was twins, we wanted to reevaluate the name we had in mind, since we now need two names.”
“I see…”

“There’s my little girl! Oh, why are you screaming? Is grandpa scary? I’m sorry I didn’t bring you anything. I doubt your parents would have wanted me to let you eat croissants anyway! Oh, there’s a water cooler out there, why didn’t I see that earlier? Hey, look Dan, your daughter is so cute! I’m sure they’ll let you come in and hold her now, have a cup of water, and you’ll be fine!”
“Is the old man saying something to me from in there? I can’t tell through the sound proof glass. I’ll just smile and nod… Maybe I’ll have a glass of water. Oh, he smiles… He must be happy to see his granddaughter.”
“That’s the spirit! He’s going to make a fine father…”

Posted in LEGO | Tagged | Leave a comment

Mini hospital

Contests really make me build lots of crazy things, and the one I built the hospital for had a category for a mini building as well, so I figured  I would make a mini version of my hospital :) I think it looks a bit weird, but it’s definitately recognizable.

It even has a mini ambulance ;)

It’s not easy to see from this angle, but I even tried to emulate the bench on the back. I didn’t want to take any shots at an angle, because the sides look really crappy because of the headlight bricks :P

 

Posted in LEGO | Tagged | Leave a comment

Kids playground

The contest for which I made the modular hospital also had a category for making a parks and recreation area that would fit into the modular standard. I chose to make a kids playground, heavily inspired by how I remember playgrounds from my own childhood.

The stripes on the pavement is an attempt at making a hopscotch court, which was not easy to emulate in this way. The icecream seller has found a good spot for selling his icecream though ;)

The yellow rocking animal thingy is attached to a flexible tube that actually makes it able to move in the way the real thing does (I do not know what those things are called, but I remember them fondly from when I was a little kid).

One of my favourite things of this playground is the swing. I was testing out a different use for that tyre, but seeing how it looked with the chain through it made me realize I had to use at as a swing attached to a tree in this way :) Also notice the kid burying his legs in the sandbox ;)

Posted in LEGO | Tagged | Leave a comment

Norwegian ambulance

I mentioned it when talking about my modular hospital, because that’s what I made it for, but I think it deserves it’s own post :) For the first time, I have created a car in LEGO I am pleased with. I have made a few feeble attempts previously, but nothing I have really wanted to show off. This time, since I was making the modular hospital for a contest, I wanted the ambulance to look good. I got some expert tips from a friend who loves to build cars, and got going.

I wanted it to look like a Mercedes Rescueline as used in Norway when I grew up in the 80s/90s, and I think I achieved the look fairly well at this scale. One of the things I would never have thought of without the help of my car loving friend is the use of those wheels. They’re actually a smaller type wheels from the tiny cars Lego make that are way smaller than minifig scale, with a motorcycle tyre on top of the original tyre. It fits perfectly, and looks great :)

The back door opens to reveal space for a stretcher, an intravenous line, a seat for a paramedic, and a defibrillitor.

See how it just fits in the gate to it’s garage in the hospital :D

Posted in LEGO | Tagged | 3 Comments