Blog : STEM

The Loop

In my previous article I described how one can use a differential equation to calculate the trajectory of the Earth around the Sun. But at the end it was quite tedious so I decided to use a computer instead. Because they are good at repeating things. One way to make a computer do the same things again and again is to use a loop. In the program below we will show how a for loop works:

What the program does is to draw a planet 18 times using a for loop.

In each iteration of the loop first of all you calculate the distance from the sun to the planet, after you need to calculate the acceleration then you should find the speed of the planet at the end you can find the position of the planet.

 

This video explains about the code above:

The Structure

In a not too distant future, humankind has started constructing a gigantic platform orbiting {the Moon, Earth, the Sun…}.

Building blocks are mined on the Moon and sent into space using an electromagnetic railgun.

On Earth, gravity effectively limits the size of anything we want to build.

In space however, there are no such limitations.

Over the years the construction has grown into the largest thing ever built by mankind: The Structure.

Project

Describe:

  • What does The Structure look like?
  • What materials is it built of?
  • What is it used for?

You can use either text (novel, report, …), pictures/drawings, build a model…

Imagine limitlessly!

Blender project (License: CC0)

Differentialligninger

Det handler om at udregne svære problemer ved at tage det i små bidder ad gangen. Lad mig illustrere det med et eksempel. Forestil dig, at du gerne vil udregne jordens bane rundt om solen. Den her tegning den viser hvordan jorden roterer rundt om solen. Nu vil jeg gerne forklare hvordan det virker. Afstanden fra solen til jorden kalder man “d”, så når man har ganget “d” med sig selv bliver det til “d2“, så skal man dividere 100000 med “d2” hvilket giver accelerationen “a”.

Så først skal man tegne solen midt i papiret. I dette eksempel tegner vi jorden d= 100 mm væk fra solen. Og derudover tegner du jordens hastighed, for eksempel med en blå pil. I dette eksempel er den 30 mm lang og er vinkelret på retningen ind mod solen. Så nu skal  du udregne “a” som beskrevet ovenfor. Her giver det for eksempel a = 100000 ÷ 10000 = 10 mm. Accelerationen tegnes med for eksempel en rød pil ind mod solen. Hvis man tegner den røde pil ude for enden af den blå pil får man jordens nye position og dens nye hastighed.

Jordens bane rundt om solen

Og dette skal man gentage nogle gange og til sidst får man jordens bane :D

I næste artikel vil vi se hvordan dette kan gøres meget lettere ved hjælp af for loops.

 

Alix, 11 år

 

Differential Equations – A Child’s Play

“Differential equations”… To most people who went to high-school, these words will bring back blurred memories of something complicated and tedious. Some will recall that they involved “functions” and “derivatives” and that they were solved using opaque techniques that one had to learn by heart. Most people have since then personally experienced that they never turned out to be useful anyways and happily forgotten all about them.

But:

  1. Differential equations are useful, and
  2. understanding them is, literally, a child’s play.

Here’s why.

Ever wondered how to make weather forecasts? Or how to design sky-scrapers that will last a century, or resist earthquakes? How to model the complex electronic circuits inside cell phones and computers? If you are considering buying a house, it might be relevant for you to know how the estate market will react to an increase in the interest rate… and so on.

As it happens, differential equations turn out to be key here. Let’s elaborate on the first example above, the weather forecast, to illustrate how they work in real life. Imagine that we start out with two satellite images, one taken a few seconds ago and one taken now. From the difference between the images, we can tell which way the winds are blowing. We can also see where the ground is being heated by the sun, where the clouds are being formed etc. Since meteorologists have a good understanding of how all these factors play together, they can now calculate how the weather system will change over the next few seconds. Adding this change to the current state tells what the weather will be like a few seconds from now, in turn allowing to calculate the next change and so on. Doing this over and over again will eventually give us a good estimate of the weather several minutes, hours and even days from now.

In the essence, we are solving a complex problem by engaging it from one end and working our way through it, integrating one small piece (difference) at the time into the eventually complete solution. And this reasoning, this practical necessity, is probably what led Newton, Leibniz and the like to invent differential calculus over 300 years ago.

The Equation Group on the July 2nd ’17 hackathon. Prototypical hacking and playing with differential equations.

But something they didn’t have back in the 17th century was… computers. The equations had to be solved using pen and paper, perseverance, skill and imagination – dark wizardry reserved for the select few.

That has changed. During the last decades, computers have grown in speed and power and what used to be a super-computer is now available to literally anyone. In the meantime, the level of entry into the world of programming has reduced drastically, and it is not uncommon to meet children proficient in half a dozen programming languages. What computers are good at is doing the same thing over and over again – exactly what is needed for solving the differential equations. So, with the advent of computers, it became much easier.

As an example, let’s consider a particularly captivating problem, that of gravity.

In less than 20 lines of simple code (see below), the programmer will get a hands-on experience of

  • what planetary trajectories look like (they’re elliptic)
  • what is meant by “sling shooting” satellites in the solar system
  • what the “escape velocity” is all about
  • and so on…

The result looks like this (the code can be copy+pasted into Khan Academy’s Javascript/ProcessingJS framework )

 

What the code expresses is:

  • line 2-5: set the initial position and velocity of the planet
  • line 6: set the time step for each iteration. The smaller the step, the more precise the calculation will be, and the longer it will take
  • line 7: the draw() function. In the framework we are using – called ProcessingJS – this function will be called over and over again.
  • lines 8-10: these lines are central to the program as they fully govern the behavior of the planetary motion. The variables xpp and ypp are the accelerations in the x- and y-directions respectively. According to Newton’s law of universal gravitation, the gravity-induced acceleration is directed towards the attracting body (in this example the origin), is proportional to the mass of the body and drops with the square of the distance to the body.
  • lines 11-14: given the newly updated acceleration, update the velocity and then the position.
  • lines 16-19: redraw the planet given its new position.

As we will see in a more detailed sequel to this article, a number of collateral learnings typically arise from this type of exercise, such as

  • learning about arrays, lists and objects,
  • refactoring code into functions,
  • experiencing the limitations of models and numerical instability,
  • Pythagoras’s theorem,
  • scientific notation…

From a didactical and pedagogical perspective this is quite interesting, as what we have here is a constructivist entry point to the full math curricula from primary to high school, and beyond. In other words, within inquiry-based approaches to teaching, the combination of differential equations and programming offers an engaging math environment to immerse the learners in, something that otherwise tends to be a challenge for these pedagogies.

On a side note and regarding the programming aspects, implementing simple “puzzles” such as the one described above is a low-barrier-of-entry way to get introduced to programming, or to explore new programming languages. They provide an advanced “hello world” program, allowing to rapidly assess the basic features of a new language.

Differential equations in themselves, as well as the techniques used for solving them are interesting per se, in the sense that they form the foundations of most scientific research.

What is of even more general interest, is the reasoning behind differential equations, the idea of decomposing a problem into manageable parts and working your way through.  They allow to reason about functions, these constructs that essentially associate an output with an input, the “Swiss army knife of abstract thinking”, providing a general scheme to improve one’s ability to understand.

And that is relevant for everyone.

Want to dig in further? – see our evolving collection of puzzles.

Hacking a ton

Within the hacker communities, a so-called hackathon (the contraction of hacking and marathon) is a well-known concept which consists of meeting up and getting some intensive programming done, typically during a day or so.

The hackaton or hackatonne (/hæk.ə.tʌn/) however is a less known concept (to be fair, actually a completely unknown concept at the time of writing). It consists of hacking an actual metric ton of devices.

While the hackathon is supposed to be a relatively short and intense event during which you are supposed to get something useful done, there are no such constraints on the hackaton. Reaching the full metric ton of hacks can take weeks, months or even years. Also, the definition of a hack is quite broad and diffuse, but can essentially be summarized to “any modification or use of an object that was not originally intended”, leaving a lot of freedom in the choice of activities.

So for our first hackaton session on May 22nd, we went to Guldminen to disassemble toys. Guldminen is physically a hangar situated in a recycling station, a sort of laboratory in which the Guldminers collect discarded materials in order to develop new ways to reuse, upcycle, repair, redesign and redistribute them.

 

Aha-experience as Supergirl sees through the appearances.

As a part of our STEM-for-girls experiment the location was perfect to train the children in disassembling devices, the objective being to strengthen the habit of investigating what lies behind the surface. Also, practicing simple motor skills such as screwing (clock-wise) and unscrewing (counter-clock-wise) is quite relevant for children of that age.

Guldminers Monica and Henrique took us for a walk around the recycling station and presented Guldminen’s facilities – a lot of machines including a lathe, a CNC milling machine / laser cutter a planer and more.

In preparation of the session, Guldminen had collected items for us during the week-end. These included a vinyl disk player, a large amount of plastic cars / cranes / tractors / bulldozers / trucks, an electrical trike, a cash register, kitchen toys, just to name some.

Frenetic unboxing of the week-end’s harvest of trashed toys.

The hacking took place around two tables that Monica had prepared for us, with groups forming dynamically depending on which objects the children found interesting. We had brought additional screwdrivers and pliers, batteries, a couple of microcontrollers and a glue gun. Eight volunteers, mainly parents, assisted the groups when necessary. The session turned out to be well suited for a multi-aged group, as the smaller children (3y) followed along and entertained themselves with all the “new” toys.

 

 

 

The purpose of the session was mainly disassembly, but on the reassembly side we did manage to activate a piezoelectric speaker from a walkie-talkie using the Arduino controller.

During the final evaluation, the children expressed that they had had a lot of fun and that we should definitely do similar sessions again.

Some of the learnings of the day are:

  • remember to bring a lot of screwdrivers, in particular with PH and PZ heads
  • in case you want to also do reassembly, have some projects ready beforehand
  • all disassemblable toys  have an interest, but electronic toys are easier to use in a STEM-teaching context

Some ideas for next steps:

  • organize a more repair- and reassembly-oriented workshop
  • set up a gaming arcade – would require monitors and game controllers, and preferably also some computers
  • give old computers new life by installing Linux on them
  • build a giant cinema-like screen by juxtaposing discarded monitors

 

Catch of the day: this fast little devil earned us 4.2 kg for the hackaton. Total session score: 8.1 kg.

 

 

On the subtle connection between girls and STEM

It was back in the late ’90s, we were attending DTU’s course on digital electronics. Given the “historical” context – the upcoming dot.com bubble and digital revolution – it would turn out to be an important course. It gave us insights into the inner workings of computers, the foundations of the Internet-based society. In the subsequent decades, this type of heavy-weight development skills would give access to the highest yielding jobs, be determining in whether tech start-ups would make or break it  and provide a ticket to the gold rush of IT entrepreneurship. We were around a hundred guys in the auditorium. And a girl. One. On the advanced course the following semester, it was guys-only.

Fast-forward to 2017. IT is everywhere. IT has changed almost everything. Everyone is exposed to it, almost everyone depends on it. In even the least developed corners of the planet people are connected by mobile devices. The largest and fastest growing corporations are very young, only a few decades old, and were built on the IT-revolution by entrepreneurs in their twenties.

More than nine out of ten of the new-age entrepreneurs are men. The digital divide is (also) an extreme gender gap.

In order to understand what was going on on the gender parameter, we in January started a STEM course at the Danish-French School targeted primarily at girls. The objective was to build an interest for electronics, programming, physics and science in general through a playful, constructivist curriculum centered around drones and robotics. The age range of the initial 12 participants was 5-13, split equally between genders (6-6). After a few sessions, three of the boys and one of the girls had left the course and five new girls had joined, giving a final gender split of 10-3. Having boys on the course would turn out to be essential in explaining the subtle relationship between girls and STEM.

Fun at the 3D printer

“You might spur scientific interest for subjects such as chemistry and biology. But the hard core subjects like physics and electronics… forget it.”, one female researcher warned. And so we began.

The course was comprised of 15 two-hour sessions, each consisting of an introduction (~15 min), free activities / free flight (~45 min), intermezzo (~15 min), free activities / free flight (~30 min), conclusion (~15 min). The sessions were framed by 2-5 volunteers depending on the days.

The free activities largely consisted of piloting the drones, but also disassembling/reassembling them, painting them with an air-brush, building obstacle courses, building a radio-controlled Arduino-based rover, programming the rover…

Training Mission: Save the baby-bear on the top of the mountain.

During the intermezzi we showed short videos (for instance FPV recordings), explained scientific principles (for instance how the GPS works, distances in the solar system, time dilation), tasted “astronaut” food…

From the start, all the children reacted very positively to the course. The training missions we had planned for the first day turned out to be too difficult, so from the second session we adjusted the missions to be “one-dimensional”, that is fly up/down, slide forward/back on the ground, left/right. One of the girls started building her own obstacle course and most of the others joined the trend.

 

The training area, the school’s gym, was split into four sections – three flight zones and a workshop table. The workshop table consisted of four stations: soldering, airbrush, Arduino programming, glue pistol.

 

The workshop table with four stations: Arduino programming, airbrush, soldering station and glue gun.

 

First FPV flight.

Each of the three flight zones had a drone that had to be shared between a number of children (~3) and an instructor. The roles of the instructor  (typically an older child) was to demonstrate the exercises, coach the children and, perhaps most importantly, to ensure that the children respected the turns. On several occasions we observed (and prevented) that the boys physically pulled the remote control out of the girls’ hands, with an enthusiastic “Let me show you!”. On one occasion an older brother almost tore off his sister’s FPV goggles.

Generally speaking, the enthusiasm of the boys had a tendency to shadow the participation of the girls. But more importantly, when the instructor explicitly shielded the girls, for instance by requiring the children to raise their hand before speaking, they seemed to bloom and started participating very actively.

Airbrush workshop.

One workshop that the girls found particularly interesting was the airbrush painting of the drones. When asked, the girls unanimously found it important that things look beautiful and the boys unanimously did not.

The participating children were slightly too young to do actual Arduino programming (the older ones were acting as flight instructors). However, one of the adult volunteers had built a radio-controlled rover, which could be programmed from the computer. A sequence of letters (w,s,a or d) were sent wirelessly to the robot which would then execute the corresponding commands (move forward, backwards, left, right). That type of programming spurred a lot of interest, for both boys and girls.

End-of-session evaluation. Fun: 5/5

Time will tell if these girls will eventually break the STEM gender stereotypes. What can be concluded as of now is that:

  • the interest in robotics is gender neutral in the sense that both boys and girls demonstrated a genuine fascination for the field
  • if not channeled, the boys tend to impede the girls from engaging and learning
  • during the 3½ months of exposure to the subject, the interest and engagement has increased for both genders

Our a priori expectation is that the continued exposure to the STEM subjects will nurture the interest as suggested in this experiment and will make the girls more receptive once we start addressing deeper technical aspects.

Bricolage & robotique, projets et liens

Voici quelques idées de projets et liens utiles suite à la session d’aujourd’hui. Tranche d’âge visée: 6-99 ans.

Les drones que nous utilisons sont les X5C-1 (Syma ou Bayang) et des Syma X11. Il sont légers (=inoffensifs), robustes, assez grands pour être stables et précis, utilisables en intérieur et surtout, nous pourrons nous reservir de leurs composantes pour en faire d’autres jouets, par exemple pour les reprogrammer et faire d’autres robots téléguidés.

Ils sont disponibles par exemple sur amazon.co.uk, banggood.com, alibaba.com, dx.com, ebay.com et coûtent généralement 250-500 dkk.

Suite à l’évaluation de notre session précédente, nous avons décidé de simplifier les missions et avons aujourd’hui travaillé sur des vols en une dimension à la fois (haut-bas, vol au ras du sol avant-arrière, gauche-droite).

Une nouveauté introduite à la journée francophone hier (dimanche 26/02/17) était la table de bricolage. Elle est constituée de quatre ateliers (aérographe, soudure, pistolets à colle, électronique).

Le rover sur lequel nous avons travaillé est le Mini Tank Robot de Keyestudio et le code se trouve sur https://github.com/raisoman/arduino-efd. Le code de véhicule autonome souffre aujourd’hui de l’inexactitude du senseur ultrasonique et il faudra donc rendre le processus de mesure plus robuste. Aussi, les enfants aimeraient pouvoir téléguider le rover, soit par ordinateur, soit par la télécommande (nRF24).

 

Le rover de chez http://www.olimex.com est basé sur le chassis ROBOT-2WD-KIT2, un driver de moteur BB-L298 et un nRF24L01+. Le rover est téléguidable avec une télécommande Syma, mais les moteurs des roues (ou le driver) a un problème d’assymétrie dans la puissance.

Le matériel FPV utilisé aujourd’hui est le Eachine VR007 avec une caméra tout-en-un, également Eachine (le tout à ~70 $), très bon rapport qualité-prix.

Nous attendons actuellement un module pour enregistrer le signal envoyé au casque de VR – petit projet de soudage/bricolage à l’horizon.

Également à l’horizon (les chiffres difficulté/durée indiquent la difficulté et la durée estimée de chaque projet) :

  • configurer Devo/Taranis pour pouvoir lancer l’enregistrement de films (Syma et Bayang) 2/3
  • mesurer degré d’humidité du sol des plantes de l’école (Arduino) 4/2
    • envoyer email à Stefan quand le sol est trop sec 4/2
  • finir rover Octanis 4/4
    • concevoir et imprimer roues avec axe intégré 4/2
    • concevoir/imprimer boitier principal 4/2
  • bras robotique (à imprimer + servos + arduino) 5/5
  • réparer voiture téléguidée cassée (imprimer nouvel axe hexagonal pour roues arrières)
  • configurer drone APM pour vol GPS 4/4
  • configurer encore un Devo 7E avec deviationtx (soudage, firmware flashing) 2/3
  • souder un fantôme OSHW 1/1
  • trouver pourquoi le fantôme OSHW de Stefan ne marche pas (besoin de reprogrammer?) 3/1
  • peindre les hélices (aérographe) 1/1
  • peindre les fuselages (aérographe) 1/3
  • construire un 250 en kit 3/3
  • construire un 250 à partir de pièces détachées 4/3
  • transformer un X5C en moteurs brushless (+ESC et flight controller) 4/4

Drôles de drones

Chers tous

Le programme de STEM de cette saison est à présent prêt: nous allons construire, piloter, démonter, reprogrammer, imprimer (en 3D), customizer, recombiner… des robots.

       

Le programme a été conçu pour faire particulièrement appel au filles, entre autre en concevant les sessions autour d’histoires pertinentes.

Les sessions auront lieu les lundis de 16-18h, commençant le 20/02, voir programme préliminaire ci-dessous:

Date

2017-02-20    Intro + Vol

2017-02-27    Peinture & décoration

2017-03-06    Vol

2017-03-13    Impression 3D et construction

2017-03-20    Vol

2017-03-27    Vol

2017-04-03    Rover

2017-04-10    Vacances de Pâques

2017-04-17    Vacances de Pâques

2017-04-24    APM Planner & Librepilot

2017-05-01    Vol

2017-05-08    Racing / FPV

2017-05-15    Station de recyclage

2017-05-22    Vol

2017-05-29    Air show

Âge: environ 6+.

Prix: gratuit pour les enfants de l’école. Participants externes: 750,-. Prix spécial membres des Journées Francophones: 350,-

Prévoir l’achat de matériel (drones, rover, moteurs, circuits électroniques…), achetable à l’école dans la mesure où nous avons des stocks (a priori entre 200 et 800,- en fonction du choix de projet).

Inscription avant le 05/02.

 

D3 uden data binding

Man plejer som regel at bruge D3 data binding for at lave koden afkoblet.

Data binding er vigtig fordi:

  1. Det gør koden mindre. For eksempel som der blev vist i forrige artikel kan man lave en cirkel men en ligne. Uden data binding bruger man 4 ligner for en cirkel(Se eksempel nedenfor)
  2. Når man han data ligende et sted dkal man kun ændre et sted, i stedet for alle mulige steder i koden
  3. Hvis man har al funktionalitet liggende i et program har fejl støre sansynlighed for at trække det hele ned.

Uden data binding behøves man ikke at starte en python server.