The pi day … aka The Feigenbaum constant day

Ok, so the pi-day is up and running (March 14, i.e., 3-14). At approximately half past three today, some kind of pi would be served around the globe.

In an older post I found some alternative pi days for those who don’t like the date-system (Month-Day):

https://mixedsignal.wordpress.com/2013/07/04/heads-upe_pi/

and we found July 19 and July 22 as more “accurate” days for the pi – at least for us in Europe. The latter internationally acknowledged as the “Pi approximation day”. (Americans might claim March 1 as an approximation according to the principle Month/Day.)

So what else do we have? Is this it? Are there no other fancy constants that we could appreciate throughout the year?

Of course there is… forza some python and loop over the most commonly  (according to Wikipedia) used constants. Standard integers aside. A euro-date below is “Day/Month” and a US-date is a “Month/Day”. I have found the best-matching date in a least-square sense.

Notice the possible benefits of celebrating some/most constants twice a year if using both Euro and US date formats! I’ve however given preference to as early dates as possible for constants approximating to the same value for several dates. For example the interesting Legendre’s constant (= 1) which could be celebrated quite a few times throughout the year, but let’s stick to January 1.

It is also worth noticing  that the Feigenbaum constant approximation day could be celebrated today instead of pi.

  • Btw – what else than celebrating the imaginary number i on February 30.
Euro US Value Constant
22/07 03/01 3.14159265359 The pi day
19/07 11/04 2.71828182846 Eulers day
17/12 07/05 1.41421356237 Pythagoras day
19/11 12/07 1.73205080757 Theodorus day
20/09 09/04 2.2360679775 sqrt5-day
04/07 11/19 0.577215664902 Euler-Mascheroni constant
13/08 08/05 1.61803398875 Golden ratio
03/11 06/23 0.261497212848 Meissel-Mertens constant
02/07 07/25 0.280169499024 Bernsteins constant
03/10 07/23 0.303663002899 Gauss-Kuzmin-Wirsing constant
04/11 06/17 0.353236371855 Hafner-Sarnak-McCurley constant
01/02 01/02 0.5 Landaus constant
04/07 04/07 0.56714329041 Omega constant
05/08 05/08 0.624329988544 Golomb-Dickman constant
07/11 09/14 0.6434105462 Cahens constant
02/03 02/03 0.660161815847 Twin prime constant
02/03 02/03 0.662743419349 Laplace limit
07/10 07/10 0.70258 Embree-Trefethen constant
07/09 10/13 0.764223653589 Landau-Ramanujan constant
09/11 09/11 0.8093940205 Alladi-Grinstead constant
07/08 07/08 0.87058838 Bruns constant for prime quadruplets
11/12 11/12 0.915965594177 Catalans constant
01/01 01/01 1 Legendres constant
11/10 11/10 1.0986858055 Lengyels constant
09/08 09/08 1.13198824 Viswanaths constant
06/05 06/05 1.20205690316 Aperys constant
13/10 09/07 1.30357726903 Conways constant
13/10 09/07 1.30637788386 Mills constant
04/03 04/03 1.32471795724 Plastic constant
16/11 10/07 1.45136923488 Ramanujan-Soldner constant
16/11 10/07 1.45607494858 Backhouses constant
16/11 03/02 1.4670780794 Porters constant
17/11 11/07 1.5396007178 Liebs squareice constant
08/05 08/05 1.60669515242 Erdos-Borwein constant
17/10 12/07 1.70521114011 Nivens constant
19/10 11/06 1.9021605831 Bruns constant for twin primes
23/10 07/03 2.29558714939 Universal parabolic constant
05/02 05/02 2.5029078751 Feigenbaum constant
31/12 08/03 2.58498175958 Sierpinskis constant
27/10 08/03 2.68545200107 Khinchins constant
14/05 11/04 2.80777024203 Fransen-Robinson constant
23/07 10/03 3.27582291872 Levys constant
27/08 10/03 3.35988566624 Reciprocal Fibonacci constant
14/03 09/02 4.6692016091 Feigenbaum constant
30/2 2/30 i, sqrt(-1) The imaginary day (30/2!)

Top ten sensors to further develop or add to the smart phone

I have touched upon this subject before: sensors in smart phones. In my opinion, the development towards implementing the all-round tricorder has somewhat halted. Phone manufacturers are focusing on improving speed, power consumption, standby-time, etc., which of course is good, but the driver is not that clear to me. Surf faster on your favorite news web portal? Watch youtube videos? Play in-app purchase games? Take photos with crap cameras? Ubiquitous computing?

So, where is all that useful stuff? The things that would make your phone a real companion in your back pocket. To be used in the kitchen, during the walk in the forest, when DIY-ing or mcgyvering, etc.

In this post, I list the Top Ten sensors (well, …) I would like to see implemented in a phone quite soon. As far as I can see, a lot of technology and hardware is already there, so why not start expanding and combining it?

With that said, some of the listed sensors already today exist as 2nd- and/or 3rd-party products that can be attached to, or wirelessly connect to your phone. But still, integration would be desired. Further on, some of the applications for the different listed sensors do overlap, I am aware of that, but they could also be complemeting each other and further strengthen the combination.

image01With the risk of missing some, but to the best of my understanding, the following sensors are available on the Samsung Galaxy S5:

  • Vision (Camera)
  • Sound (Microphone)
  • Location (GPS)
  • Accelerometer
  • Gyroscope
  • Gravity
  • Light (Diode)
  • Orientation (Compass)
  • Magnetic field
  • Atmospheric pressure
  • Proximity (diode)
  • (Notably missing: Thermometer and Humidity – available in Samsung S4, though)

which are perhaps more than one would first think is actually found in your phone. On Google Play some of these sensors are utilized for first-order versions of the sensors listed below. However, the accuracy is quite low and it calls for improvements. See the snapshot from one of the apps in the play store.

I have deliberately not put focus on health sensors, such as heartbeat, etc. There a lot of things are happening and would probably fill this list by themselves: spirometer, oxymeter, and so on. I have not listed mind-reading devices and polygraphs either, for that matter, and notably omitting the age detector.

(Doppler) Radar

image02Some week ago I had a visit by Prof. Dag T Wisland from Oslo University and Novelda AS in Norway. Novelda manufacturers a low-power ultra-wideband radar module, the Xethru. See their web page at https://www.xethru.com/ The device consumes 120mW and is comparatively compact. (This is the transceiver, additional computing is of course required by SoC and software in apps).

Novelda suggests more practical applications by utilizing the phase shift due to the doppler effect: presence detection, respiration detection, etc. Place your phone on the kitchen table and use it as an alarm. Wake-up detector for your sleeping children.

Or, why not become an expert in finding the beams and wiring and pipes behind the wall? That would impress your spouse (well, …) if you can assemble that IKEA wardrobes and fit to the wall without any mishaps. Bosch offers these kind of devices:

I want that integrated with my smart phone – and imagine what a cool app you could have.

Ultrasonic transceiver

Using an ultrasonic transceiver is quite a similar idea to the one above, I guess: a way to look inside objects. I admit, if it is used to see inside your body, the phone might become a bit gooey when you put that conductive gel on. But in fact, ultrasound can be used for other things: ranging, non-destructive inspection to look for cracks, and even communication.

Could the plummer use it to inspect the pipes after welding? Could the home-cook use it to check the bread – has it proved enough?

With ultrasonic microphones and speakers in e.g. a room, the phone can be used to quite accurately find out its own position and also the positions of other objects. The optimum sheng fui garage could finally become true:

Thermometer

I would like a more accurate thermometer (and in S5 I do not have one anyway). Now and then we need to take the  temperature and check for a fever or so (hard to push the phone into your ear though, but nevertheless). Also the ambience temperature is of interest. It could be a matter of logging the temperature in my  house to adjust the indoor temperature or opt for closing a window. This could be used to lower the energy consumption in my house (assuming that your already-installed heating system is not optimized). But also more practical things: what is the temperature of my christmas caramel? Or bakery in general.

Some apps are already available on Google Play and small ambient thermometers are for example sold by http://thermodo.com/ in Denmark. Similar devices are available for ear thermometers. Powered and read out through the audio interface.

The thermometer does not necessarily need to be a thermistor, but could also be supported by IR camera – if it would be portable enough. Products for smart phones are already sold by eg.

Photo- and laser diodes measuring longer distances and angles

Now and then I need to align some paintings or shelves to be mounted on a wall. Or find the center point on a wall, beneath a painting, or similar. This would be a way to complement the plane leveling-alignment laser, like for example Bosch sells too. There are apps measuring angles and distances given a couple of photos, gyro settings, etc.

image00

With more intelligent software (and hardware) to control the laser pointer we could have the device “paint” the target on the wall directly. Let the phone auto-orient by identifying points through the camera or ultrasonic localization. Angles, distances, etc., could be measured and stored. Cleverly combining the diode and the camera could offer you to measure distances of complex objects.

A square box could indicate the boundaries for the placement of your latest diploma. The laser could be used to paint the actual time in the roof above your bed. It could be used for games and entertainment of many kinds. (But that is on the other hand not the path we want to go down in this post).

Vibrations

Already today, vibrations can be picked up by the accelerometer of the phone, and there is academic work out there describing how the accelerometer can be used for the purpose. For example, measuring the vibrations of machinery can be used to monitor the structural health of the device.

For more domestic applications the vibration in the washing machine could be logged to determine when the machine is ready. Earthquakes or traffic vibration, or for the handyman to check vibrations in pipes and ventilation could be used.

Perhaps it could be used in the car to detect and report quality of the road and in general give feedback on your car’s health and guide you towards service of the car.

Moisture

The Samsung S4, for example, sports a humidity sensor. Use a phone to check the humidity health of your house or crowd-sense data and upload to the weather services. While sleeping at night or idling – let the phone collect information while still charging and doing nothing useful.

Those with sensitive skin are dependent on a healthy humidity level. With your phone you could more actively control a humidifier and let it adjust the level as per your presence in the house. Active humidification!

Metal detector

The phone does already today offer a magnetic sensor that can detect the field and disturbances in the force. The magnetic sensor in the phone will vary with presence of objects that alter the magnetic field. With the metal detector we can look for nails behind the wall, electrical wiring, pipes, “lost” wedding rings in the sand, etc.

Imagine you could finally get that superman power and see straight through objects. (Unless it is cryptonite, of course)! An xray could do the job for you, but I admit it would be hard to implement since you need to have a detector on the other side of the object or perhaps rely on microwaves and ultrasonic inspection. Then we’re back on list items 1 and 2 above.

Still though it would be practical to have right in the palm of your hand.

2016-02-29 11.10.24Scale

Weighing things has been integral for quite some time now. And wouldn’t it be good to be able to measure the correct amount of sugar for your cake? Pour up the sugar in a bowl and put it on the phone. Remove the bowl and the weight is displayed in the window.

In fact, a few phones (like my Samsung S5) does have a (air) pressure sensor and indirectly it could be used to measure the weight. In fact, there are (of course) apps out there that implement this – to a limited degree of success, perhaps. But who’s to blame, the handles are not really in place yet.

One would argue: why put an expensive phone in the kitchen and expose it to to water, fat, and grease? Good question, but consider this: the Sony Experia E4G, now cost approximately $70 dollars in Sweden. It is not water proof, but that’s semantics. The price is low and almost expendable.

Gas

Gas could be dangerous. Anyone who lives with (or works in the same cubicle as) someone that enjoys baked beans, onion, and lentils know that by now. Jokes aside. Mould, fungus, and moist could also be dangerous to your health (and to your house). A gas sensor in your phone would be able to sniff around the house and report any levels of strange gases.

To no surprise (?) there are third-party devices that can be connected to your smart phone to do the job. For example sensorcon, http://sensorcon.com/, does this. In fact, they have a sensor package that can do quite a few analysis in parallel.

At home, the gas sensor can also be used to detect smoke, checking if the cinnamon rolls are done or not, or indicating if you used too much perfume (or too little deodorant).

Spectroscopy

With a spectrometer you can measure the contents of a “foreign” object. See for example what Analog Devices currently is developing together with an Israeli startup :  a set of “market hand-held scanners that can be pointed at food or medicine to detect what’s inside.”

This is close to what the tricorder could do in the star trek movies. Just let the device scan the object and see what it is made of.  Other devices are suggested by commercial entities out there, such as the near infra-red spectrometer.

The transistor symbol

Together with Maple Martin I browsed through our group’s library and came across a couple of books by Prof. Kjell Jeppsson (from Chalmers University of Technology). One of the books, “Praktisk transistorteknik” (1965), triggered me – of course. Browsing through the pages, I realize that the transistor symbol he used in his figures looked unfamiliar to me. It was the 1965 version of the Swedish standard symbol for the junction transistor.

Where does the symbol come from? My short-story/interpretation.

So, in case you might be taking the course in analog electronics at the moment: this post aligns quite well with the topic we are currently reading. Take a quick glance at my impressionistic skills below. I have depicted the first point-contact transistor (to the left) and the “first” junction transistor (to the right). It is pretty obvious from where the – today, widely used – bipolar symbol comes. The symbol is found at the bottom left of the picture. Above that my redrawing of the famous Bell Labs photo. The v-shaped piece of plastic, on which the phosphor-bronze traces where applied, guides the emitter and collector to and from the germanium plate which is attached to the metal frame which the base in turn is connected to. The “housing” around the transistor is modeled by a circle around the lines.

To the right in the picture, we see a sketch of the junction transistor. A more homogeneous solution. From left to right we have the emitter, base, and collector. Here the currents go “through” the semiconductor whereas in the point contact transistor it goes on the surface (well, arguably, but true to a first degree …). Looking at the international symbol, it does not really make sense – if one has time to care about those kind of things. The Swedish standard institute (SSI) symbol, from 1965, is depicted below the junction transistor. It turns out to be a bit more of logic behind that one. The base “cuts” the emitter and collector and the current goes straight through the base. However, the symbol lost the battle.

Transistor symbols

Transistor symbols

I guess the thing was that the junction transistor was invented and patented quite soon after the delivery of the 1947 Christmas present in the shape of a point-contact transistor at Bell labs. Due to the more integrated nature of the junction transistor it was also a better choice for most users. In addition, the junction transistor has much higher gain (200 vs 20), was less noisy, and could take on higher power levels. (Not as high as for tubes which were even faster. In fact the point-contact transistor initially had a higher gain-bandwidth product.). Due to this rapid development, the old symbol made it into the books. There was no point in developing a new one (unless it was exported to another continent).

LiU in Qatar – travelling logo

I will let the logotype travel through this map. Anyone care to contribute? How fast can the logotype travel across the globe?

I will let the new logotype travel to South Africa too. This stop is in Qatar at the Hamad International Airport.

Artist: I don’t know. .. it’s 6-ish meters high though.

image

MOS vs BIP

This post is not supposed to be very comprehensive when comparing the MOS with the BIP (bipolar) transistor. However, I thought it could be nice to have it outlined on a single sheet here. MOS stands for metal oxide semiconductor.

Inte picture below we find Lilienfeld vs Shockley. (Yes, yes, yes, one can argue about who did what, etc., but I will let them represent the two transistors). Lilienfeld represents a more square symbol and a “simpler” expression of the current as function of input voltage (in its desired operating region): a polynomial – the square of the input voltage, ube. Shockley presents an exponential function instead – the diode equation. I have sketched the currents as functions of the input voltage and we see that even though the square (MOS) is stronger in the beginning, the exponential quickly comes up to pace and produces higher currents.

The MOS layout is more compact compared to the bipolar. The MOS offers an infinite input resistance (well). The bipolar does not. In fact it must have an input current to operate as desired.

Considering the small signal schematics, the parameters gm (transconductance), gds/go (output conductance) and gp (input conductance) can all be derived as dependent on the current through the transistor. The higher current, the higher everything, sort of. Arguably, this implies that the gain is more or less with current.
At the bottom of the figure, we find the intrinsic gain of the transistors.

For the MOS it is the Early voltage over the effektive input voltage, i.e., gate-source voltage minus the threshold voltage. For the bipolar it is the Early voltage over the thermal voltage (~26 mV). These two gain expressions actually tell us that it is quite likely that the gain is higher for the bipolar than the MOS! (This can also be seen from the MOS transistor operating in the subthreshold region).

Why larger? It is hard to push down the MOS effective voltage to the required 52 mV to match the bipolar relying on the thermal voltage.

transistors

Developing labs

We are facing quite a lot of challenges within the field of electronics at our university. In short: there are fewer and fewer students taking electronics courses and we should adapt to that situation.

There would be at least two ways to address the problem: either we scale down or we make the courses more interesting such that, in the end, more students will choose to study electronics. The “problem” however, might be that we are a bit late to offer this change at the university level. Most likely we have to be much more active and visible for children/pupils already in their early teens.

Anyways, while changing courses, why not study one of the perhaps most important elements of the course: the laboratory. This is in some sense the only occasion when the students can practice and try the theory in a context. That sounds easy – doesn’t it? Take a course in basic electrical circuits: It might contain course elements such as DC (Ohm’s law, KCL, KVL) and AC currents (jw, power), as well as something around frequency analysis (amplitude characteristics). Three main parts of the course. Easy as a pie: introduce three laboratories – one on each subject. Happy days. End of story. … Or?

A while ago I visited a seminar hosted by Anna-Karin Carstensen at the Norrköping Campus. A while ago they were intensly studying how the learning process takes place in the laboratory series. They monitored students, filmed them during the laboratory work (asking for permissions of course). Then they analyzed the results. It was for them then quite visible where there were flaws in the laboratories, regardless if theory had been taught in lectures or not. It did not matter if the lecturer thought that all material were there, at the students’ hands. There were simply not the required processes enabling the students to form the links connecting chunks of knowledge/wisdom to to move on in the laboratory series and grasp the knowledge.

It was part of Carstensens Ph.D. studies to monitor these laboratories and develop a method to create a new laboratory where students should more easily link between pieces of knowledge to understand the “whole” picture.

Yes, I know that nomenclature fails me, I am not trained in this field of research. I am trying to give my review in a straight-forward approach.

Consider the picture below, which at a first glance might look a bit simple. It depicts the learning processes, the links, in a laboratory, where the aim is to sort of “understand the Laplace transform”. How do you make the connection between time domain, frequency domain, poles and zeros, and the Laplace transform. The task of the lab is to curve-fit and find important parameters of the step response of an RLC circuit (resistor, inductor, capacitor). By doing this, a better understanding for how the location of poles and zeros, i.e., coefficients in the Laplace polynomial, affect the step response, should be developed.

aa
This picture is from Carstensen’s dissertation and I have got the permission to publish it here..

Now, the point is to sit down and actually look at the laboratory and its manual. What pieces of the puzzle do we have at hand? How will the students see these pieces? You want the students to bridge all links (verbs btw, actions), such that they move around freely and “understand”, “conceive”, in the graph above.

Let us start in the top left corner of the circle (you know what I mean…). Students are given a real circuit, including a schematic (at this stage of their training, they conceive the schematic as a “real circuit”). From that you derive the differential equation. From there on, through replacing operators with s or 1/s, you get to Mr. Laplace. Or you would get to Laplace from the real circuit by doing some KCL&KVL exercises and replacing C with 1/sC, etc. Through tables you would get from Laplace to the time-domain representation, you would be plotting it and you would be comparing it with the measured graph. The graph is measured on our real circuit. And we are back at stage one. That sounds pretty straight-forward right?

Well, yes, perhaps. But actually, you want the student to understand, not just walk around the circle and applying a standard set of rules. You want them to do the connections and not a) get stuck in smaller loops and not b) run the outer loop. They must be able to get from any point to any other. Those links, or enablers for them, must be in the lab too, otherwise it is just a fill-in-the-blank-boxes exercise.

Much more can be said, I just wanted to inspire to do some more reading at http://liu.diva-portal.org/smash/get/diva2:647562/FULLTEXT01.pdf before you plan your next lab and I will try to adapt this way of thinking for next year’s TSTE92 Electrical Circuits.

Solving an annoying java error in my DCS-930L

Once one encounters an annoying error/issue with the computer setup (or whatever electrical/electronic device) one tends to browse the internet for a solution. Unfortunately, quite often, the solutions to the problem are hidden deep down in the forum, and too often the forum is clogged down with intelligent comments like: “Did you turn on the device?” or “I have this problem too” … you know what I am talking about. Often you would also find a video to solve the problem, but I want a 10-second solution, not a 10-minute solution. Mostly they are also for the “wrong” platform.

So this is my own sort of post to be able to find the solution whenever I google for it 🙂

DCS-930L

Anyways, in order to cover a couple of more corners I purchased a DCS-930L from D-Link. A camera with mike in the lower-price region, but still quite potent

.

I want to live-stream the video to my computer, but encounter a java-error on my linux machines. See the picture below. The picture won’t display.

error1

Pressing the information tab, we get the following error:

Missing required Permissions manifest attribute in main jar:
http://your.cool.ip.address:portnumber/aplug.jar

How to solve?

Well, that’s where the googling starts and it turns out that it has to do with the security exceptions and the site from which I load the video has to be added to a certain list. This is for example documented here

However, those are for windows and not applicable for my linux machine. First, I am running a fairly new version of java:

java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

And the solution is to add a line of text containing the address to your camera to your local java folder. Cut-and-paste this into your terminal:

touch $HOME/.java/deployment/security/exception.sites ; \
echo "http://your.cool.ip.number:portnumber" >> $HOME/.java/deployment/security/exception.sites

and that’s it. Obviously, your.cool.ip.number:portnumber is your address to the camera. Reload the camera’s web page and voila.

Screenshot-D-Link Corporation. | WIRELESS INTERNET CAMERA | HOME | JAVA - Mozilla Firefox