Formula Student Baltic Open 2014

Sensommaren och hösten kunde ha blivit utan praktiskt ingenjörsjobb om det inte vore för att jag blev övertalad att bygga räserbil. Målet var Baltic Open i Estland och dit skulle vi ta CFS13 och CFS13e (alltså både den bensin- och eldrivna bilen).

Taggad med: ,

Selfbalancing Lego robot

As a part of the Embedded Control Systems course we( Brian Bonafelia, Nicklas Gustafsson, Per Nyman och jag) got a task of programming a self balancing robot in Lego Mindstorms (NXT). The benefit of using Lego from a control theoretical point of view is that it has quite bad mechanics, and there demonstrates the strengths of control theory; to compensate bad mechanics with sophisticated software. Focus in the course if mainly not on Lego building but more on creating the mathematical model and programming control theory algorithms corresponding to said model. Now the result with a short video:

Video with more talk and more details:

Downlosad the report "Self-balancing two-wheeled robot"


Vehicle electronics Chalmers Formula Student 2013

The project where I spend most of my time right now is Chalmers formula student where I am Project engineer in the Vehicle electronics subgroup. This post is a summary of the design of the over-all wiring. If I find the time I will also post some more information about other subsystems.

2.1.Technical Background

The overall wiring provides electrical power to the components and transfers signal data from sensors to the processing nodes. The overall schematics refer to the design of this electrical system. The schematics are necessary when connecting the electrical system on the car. It is also very useful for troubleshooting and repair of the system.

2.2.The over-all wiring

2.2.1.Design choice/ selection

Our target goals are presented in the table below:

Adjustability Value Comment

Time to disconnect electronics from engine

15 min

Time to check and change fuses

2 minutes

1 min to check. 1 min to change.

Time to check and change relay

2 minutes

Time to check battery and change battery

11 minutes

1 min to check battery with multimeter. 10 minutes to change it.

Time to reprogram ECU 5 minutes

The ECU should be easy accessible. As long as the software is working it should be quick.

Time to download data from DAQ

5 minutes

Memory card out from DAQ, into computer, download data and memory card back to DAQ


Mean minimum distance between major electronics failure (after debugging and testing)

150 km

Reliable enough to do at least five competitions

Water and dust protection level


The approach when designing the over-all wiring was to start with a low complexity model where the most important subsystems were represented. Understanding the interactions between subsystems is important to get efficient and minimal wiring and therefore the solution model is a good starting point. Designing the vehicle schematics is an iterative process where information is added for most of the new design decisions. The schematics include component specification, choice of connector, pin configurations, connections to the processing nodes, sensors, engine control unit with wiring, generator, fuel pump and power supply.

2.2.2.Packaging of circuit boards, connectors and cables

Protection level IP45 is chosen from pre-study to get sufficient protection from water, dirt and dust. Our assumption when choosing the protection level was that water is a bigger issue than dust since water implies a greater risk for electric failure. IP45 will give protection from dust and dirt above 1mm and protection from ingress of water from a water jet. Going for IP65 increases the protection to be completely protected from dust and protection from water up to more powerful water yet.1 Upgrading the protection level to IP65 to get a safety factor was not too difficult since boxes from Multicomp together with Buccaneer connectors satisfy this specification.

To avoid disturbances cables carrying signals are separated from cables carrying high currents and shielded cables are used in high disturbance zones near the engine.

Connectors for sensors have to have a high water and dust protection level since they will be unprotected by any other component. To get a low maintenance time when dismounting a subsystem from the electronics they have to be easy to connect and disconnect. They should also not be too expensive. TE connectivity Superseal 1.5 series (Figure ) with IP67 will meet this requirement.2

Figure : TE Connectivity Superseal 1.5 Series3

Connectors for the processing nodes was set to have the same requirements as for the sensor connectors but with a constraint that the female connector has to be mounted at the side of the box containing the processing nodes. Circular connectors were chosen since they make the manufacturing of the processing nodes easier compared to using rectangular connectors. It is also much easier to find circular connectors with sufficient water and dust protection. Buccaneer 400 series (Figure ) which have IP68 classification are chosen.

Figure : Buccaneer 400 series4

A hole on each side in the monocoque is used for wiring the sensors near the front wheels to the front processing node. Delron Inserts 102 series (thru-bolt) will be inserted into the hole for water and dust protection.


2.2.3.Discussion of design selection/ Limitations

Alternative solutions for the overall wiring were discussed and benchmarked. The main reasons for rejected design alternatives were reduced reliability or increased complexity. connection between sensors and inside monocoque

Instead of drilling a hole at each side of the monocoque to transfer a cable for the sensors at the wheels a connector could have been used. We had discussions about using connectors from Deutsch which would be lightweight and robust. The main disadvantage was the wiring inside the monocoque. With a connector the bend of the wires connected to the connector must not get in the way of the driver’s legs. The driver department should be as clean as possible to avoid the driver hitting any protruding parts. Adding a connector would increase this risk and therefore the solution was rejected. nodes and the alternatives

The reason for choosing a two node system was to reduce wiring and divide logging and processing on two processors. A two node system with a CAN bus is much easier to expand than a single node system. Adding more sensors can be done by connecting them to free inputs on either of the two nodes or by adding a new node since a CAN bus is used. One design alternative that was considered was to have small nodes by each wheel with a CAN bus connecting them. This could decrease wiring even further since the distance from each sensor to a close by node would be smaller. The main reason for not choosing this design was to limit the number of developed components. Our recommendation though to next year’s CFS would be to consider this approach. connection of the ECU

An alternative to the current solution of connecting the ECU to the rear node via RS232 would be to connect it to the CAN bus5. Since the rear node in this case would not need to handle the communication to the ECU and instead get the data from the already implemented CAN bus communication the processing would be reduced. The same would be true reducing the programming code when using CAN instead of RS232 since the CAN code has to be implemented either way. The disadvantages are added components since the ECU does not have a CAN interface but a RS232 interface. A purchase of a CAN adapter would be needed with increased cost as result. The programming code for communication to the ECU was implemented last year and will hopefully reduce the development time this year which makes the advantages of the CAN interface less important. 1 for connecting the DASH3

Using a serial adapter between the DASH3 and the DAQ would make the dashboard able to read sensor values from the data logger. This solution was most importantly not chosen since it would increase the number of components and the complexity of writing to the dashboard did not seem too great to overcome since the dashboard protocol is open6. Even though Race Technology in an email wrote that the logging capacity would not be decreased by much since the update frequency to the dashboard does not have to be more than a couple of times per second, we were not sure if it would be a limiting factor or not. The safe option was to not use the serial adapter and instead send the data from the front node. The disadvantage of this solution is more development time since routines needs to be programmed for communication between the node and the dashboard. With the serial adapter this is already done by Race Technology. 2 for connecting the DASH3

Connecting the DASH3 to the CAN bus would be done with a CAN adapter. The distance from the DASH3 to the front node is so close that any weight saving due to wiring would not be a factor. The main advantage would be an assumed reduced development time since the sensor data to display on the dashboard would already be present on the CAN bus. Only configuration of the DASH3 would be necessary. to the circular connectors in the processing nodes

An alternative to the circular connectors in the processing nodes would be rectangular connectors. If the processing nodes are better protected from water and dust this would be a good option since it makes connecting sensors somewhat easier. A disadvantage with circular connectors is that they require soldering or the use of clamp tool. Adding sensors to a rectangular terminal block would be a matter of just connecting wires to the connector block. This connector is for example used on the DAQ (Figure ) which we use for data logging.

Figure : Race Technology DL1 MK3 DAQ driver interaction design by combining switches

To minimize the amount of switches on the dashboard it is possible to combine the switches for ignition, fuel pump and start engine into a switch with multiple states; Off, Ignition, ignition+fuel pump and start engine (with momentary action). The main disadvantage is lost control of forcing the fuel pump to be either on or off. The states of this switch would be:

  1. Off

  2. Ignition

  3. Ignition and fuel pump

  4. Starter motor. This state would be momentary stable and return to state 3 when released.

The reason this solution was neglected was loss of control of the fuel pump. With a dedicated switch for fuel pump three states can be selected:

  1. No fuel pump

  2. Fuel pump controlled by ECU

  3. Fuel pump forced on

2.2.4.Simulations/ Tests/ Experiments

The first approach for the schematic design was to do it by hand on paper (Figure ) and then convert this to 2D CAD software. For developing the vehicle schematics a comparison between alternative software was done. A brief summary of the software comparison test:

  1. ExpressSCH seemed quite good at first but adding components was a hassle.

  2. FastEl did simple tasks complex and lacked user friendliness.

  3. Eagle CAD has two main features: board design and schematics design. Designed for manufacturing PCBs and therefore a lot of features would be left unused when only designing schematics

  4. TinyCAD is a simple and fast program without any advanced features.

TinyCAD was chosen since it got the job done and was fast to work with compared to the other alternatives.

Figure : Iteration 2 of schematics on paper

2.2.5.Over-all schematics

Click on the image and then download it as a png. The schematics file is very big and the image below is just a thumbnail.

Direct link to schematics image

Taggad med: ,

LaTeX-mall till word

Många saknar en bra mall för att skriva akademiska labbrapporter. Jag lägger därför upp min LaTeX-liknande mall till Word. LaTeX är ett typsättningsspråk som främst används i akademiska miljöer. Kännetecken för en LaTeX-rapport är ofta numrerade rubriker, ett speciellt typsnitt (computer modern) och breda marginaler. Fördelarna med LaTeX är många men ibland kan det vara mer tidseffektivt att skriva rapporten i Word.

LaTex-mall till Word (eller gå in på Github-projektet)

Typsnitt Computer Modern


Exempel på rapport skriven med denna mall

Instruktioner för att snabbt skriva ekvationer i Word


Kalman filter to estimate position

I recently had a course in Applied signal processing where one of our tasks was to estimate the postion of an object from noisy measurements. A Kalman filter was used.

Figure 1: Original data and measurement with noise plotted together with the measured signal. The noise level is Gaussian with mean 0 and standard distribution 0.1.


Figure 2: Kalman filter with different R applied to observed data (blue line) and the signal without noise (green line).

The Kalman filter is quite impressive!

Matlab code


Taggad med: ,

Öppettider för matställen nära Chalmers

Mat är viktigt, speciellt när under tentaperioden.

Öppettider Alpa livs

Mån-fre: 08-19
Lördag: 09-17
Söndag: 10-17

Öppettider och meny Gibraltar pizzeria

Mån-fre: 11-22
Lör-sön: 12-22

Gibraltar pizzeria Meny

Miss Fajitas


Mån-fre 11-20

Lör-sön 11-17

Sushi me

Måndag - Fredag 11-19

Lördag 12-19

Söndag Stängt

Ansluta till Eduroam på Chalmers

Eftersom många har problem med att ansluta till eduroam på Chalmers skriver jag här hur man gör.

Nätverket på Chalmers heter eduroam.
Använd cid@chalmers.se som användarnnamn.
Lösenordet är samma som ditt cid-lösenord.


SSID (nätverksnamn): eduroam
Nätverksautentisering: WPA2
Datakryptering: AES
Autentisering: MSCHAP v2
Användarnamn: CID@chalmers.se (även som student)
Lösenord: CID-lösenord
TCP/IP inställningar för kortet (inkl DNS): DHCP
Certifikat: eduroam.chalmers.se
Utfärdare: Thawte

Ansluta på iPhone

Läs https://student.portal.chalmers.se/sv/kontaktochservice/it-passerkort-kopiering/egenadministrerad/mobiltelefoner/tradlastnatvark/Sidor/iOS-(iPhone).aspx

Ansluta på Android

Läs https://student.portal.chalmers.se/sv/kontaktochservice/it-passerkort-kopiering/egenadministrerad/mobiltelefoner/tradlastnatvark/Sidor/Android.aspx

"Det fungerar inte"

Testa att logga in på https://student.portal.chalmers.se/sv/Sidor/default.aspx. Fungerar det inte med ditt cid så är felet där.

Om det fungerar att logga in med ditt cid testa att följa instruktionerna på dessa sidor:

Nyquistkriteriet och hur man använder det

Används för stabilitetsanalys av återkopplade system då kretsöverföringen innehåller dödtider.

Nedan är ett försök att samla det viktigaste om det förenklade Nyquistkriteriet och även det fullständiga Nyquistkriteriet.

Räkneexempel på det förenklade- och fullständiga Nyquistkriteriet

Mer matematik, mer förklaring, och kanske bättre steg-för-steg-exempel


Taggad med: ,

Synka Google Calendar mot Timeedit (med Ical)

[Uppdaterad 2011-08-31]

Såhär får du in schemat från Chalmers Timeedit till Google Calendar. När du väl har kalendern där ska det inte vara några större problem att synka mellan Google Calendar och Iphone eller Android.

En ny version av timeedit ersätter den gamla. Här kommer därför en ny guide:

  1. https://web.timeedit.se/chalmers_se/db1/public/#1001
  2. Tryck dig fram till det schema du vill ha. Sök efter klass. Tryck på det sökresultat du vill skapa kalender av.
  3. Tryck på Välj tid och välj en så lång tidsperiod som möjligt.
  4. Visa schema
  5. Ditt schema ska nu visas i webbläsaren. Till höger uppe i hörnet finns en liten ikon som heter Inställningar (ett dokument med ett kugghjul).
  6. Exportera
  7. Länk för prenumeration. Kopiera länkadressen som kommer upp.
  8. Logga in på din Google Calendar.
  9. Vid Andra kalendrar välj Lägg till och därefter Lägg till webbadress.
  10. Kopiera in länkadresen till Ical-filen. (länken från steg 7).

Denna metod borde fungera även på andra skolar så länge de använder Timeedit för att hantera schema. Det kanske är möjligt att ta iCal-filen direkt och importera den till Android eller Iphone. Men fördelen med ovan nämnda metod är att den inte kräven någon app och att schemat blir mer lätttillgängligt.

Om det inte fungerar

  • Google calendar gillar inte långa länkar. Testa att köra länken genom en url-förkortare (ex http://goo.gl/) och se om det hjälper.
  • Skriv en kommentar nedanför. Med lite tur har någon annan fått samma problem som du och hittat en lösning.

Till iPhone

För att få in kalendern till iPhone kan man behöva besöka den här adressen (från telefonen):

Välj därefter de kalendrar som ska synkroniseras med din iPhone.

Till andra telefoner

Gå till http://www.google.com/mobile/sync/. Där står det en del hjälp om hur man synkar google calendar med telefonen.

Gamla timeedit

Om din skola använder den gamla versionen av timeedit så kanske den gamla guiden fungerar.

  1. http://timeedit.ita.chalmers.se/4DACTION/WebShowSearch/1/1-0
  2. Ta fram schemat du vill ha. Välj ett långt datumintervall. Grafiskt eller textformat spelar ingen roll. Url till min kalender blev: http://timeedit.ita.chalmers.se/4DACTION/WebShowSearch/1/1-0?wv_type=11&wv_ts=20110115T234201X3888&wv_search=tkaut&wv_startWeek=1102&wv_stopWeek=1124&wv_first=0&wv_addObj=&wv_delObj=&wv_obj1=5641000&wv_text=Textformat
  3. Längs ner på sidan finns det en länk för att ladda ner i Ical. Högerklicka och välj Kopiera länkadress, (eller motsvarande beroende på webbläsare). Detta blir den url jag kopierade:
    (lang=1 blir svenska och id1 är ett id som är unikt för varje klass)
  4. Logga in på din Google Calendar.
  5. Vid Andra kalendrar välj Lägg till och därefter Lägg till webbadress.
  6. Kopiera in länkadresen till Ical-filen. (länken från steg 3).

Fjäderpendel i Matlab

Projektuppgiften utgör en obligatorisk del av kursen TME010 Mekanik Z, I, TD, och ger 1,5 högskolepoäng. Uppgiften består i att lösa ett mer avancerat mekaniskt problem (massa-fjäder-system) med hjälp av Matlab.

Rapporten 1.71 Mb
All kod 3.34 Kb

Innehåller även term för dämpning 🙂

% parametrar
m = 1; % massan kg
k = 10; % fjäderkonstanten N/m
g = 9.81; % tyngdkraftfältet m/s^2
b = 2; % fjäderns ospända längd
zetax = 0; % dämpning i x
zetay = 0; % dämpning i y

% begynnelsevärden
alfa = 1;% vinkeln alfa i radianer
delta = 1.962; % fjäderförlängningen
xvel = 2; % hastighet i x
yvel = -2; % hastighet i y