Other

Prime numbers database

From 2 to 2^32.

Search a number  

Or  

3 comments


Wireless electricity by resonant magnetic coupling

Work abandonned -- Last modification: Sep 22 2009

This page aims to gather all relevant information that can be found on the Web in order to explain how wireless power transfer using magnetic resonance can be created easily.

History

Nikola Tesla's works, more than a century ago, proved that it was possible to have a wireless transmission of electricity. He came out with a huge emitting tower, but it was destroyed before he could realize his plans of providing free electricity anywhere in the world (which was not good for money profit).

In 2006, MIT researchers and Intel worked again on this topic and realized a few mid-range prototypes. Intel's is called WREL, for Wireless resonant energy link (video). MIT research is led Marin Soljacic and was called WiTricity. His webpage contains research papers, for theory and experiments. MIT project has now created the WiTricity Corp., and wireless power market products are announced for 2011.

It's very hard to find (I did not find any actually) information on the Web about how to build a wireless power transmission system and calculate values of electronics components and properties for the system you want to build, in a non-complicated-equations form. In this article, we will study the theory paper in order to design easily wireless transmission systems based on resonant magnetic coupling.

Three kinds of wireless power transmission can be identified: short-range, based on induction coupling, mid-range, based on resonant magnetic coupling, which is an enhanced induction coupling, and long-range transmission, based on electromagnetic waves, such as microwaves. To understand the difference between those three kinds, you can read that introduction to wireless power and that one for details on induction wireless power.

Resonant magnetic coupling

By using magnetic resonance between coils, the transmission efficiency is highly raised over simple induction coupling. Higher frequencies are used, and all objects that are resonant to the same frequency and in the field are able to be powered wirelessly. It does not require a direct line-of-sight between two coupled devices, and they don't have to be aligned in parallel.

In august 2009, 95% efficiency transfer over 40cm and 90% over 60cm have been demonstrated.

Designing a RMC system

1. The oscillator

MIT project used a Colpitts oscillator.

2. The resonant coils

How to build identical coils and determine their resonant frequency, or how build coils for a specific resonant frequency when you already have the oscillator circuit? Resonant frequency is given by 1/2.pi.sqrt(LC) (see also other formulas).

Open questions

Is it safe regarding magnetic storage devices, like hard disk drives?

External resources

Commented article on WiTricity, with good information on the design of Soljacic's device.

wapedia articles on resonant energy transfer and quantum tunnelling.

MIT teachings videos. Very interesting and easy to understand. Here is the lecture on LRC circuits.

1 comment


Mirror Wikipedia on your own computer

No future - Last modification: Nov 30, 2020

With the end of the world coming up, it'll be handy to have a local mirror of wikipedia. The whole database is a bit big to manage, but keeping only the current version of the pages from a snapshot makes it manageable. For example, in October 2019, the English Wikipedia pages (text only, no media) are dumped in 70GB of XML, for about 6 million articles. Using the pages-articles dump, which feature all articles with no history and talk pages, there are in fact more than 19.6 million pages to import (with templates, redirects, media descriptions...). After 7 months of importing on a raspberry pi 4, the database weights 290GB on the disk, without caching, and the pages are at least 7 months old and cannot be updated automatically.

Some software can use these XML dumps and present them in a tailored browser, see the offline wikipedia readers section. It's certainly easier to install, and also come with the pages media for some of them, but it's not as fun as having a real editable wiki. It's also not easy to find a software that works on ARM processor, because it would be nice to have this running on the low power Raspberry Pi 4 computer. It seems kiwix can make a wifi hotspot that offers a static version of wikipedia: see the doc.

It's not really easy to mirror Wikipedia: there's not much recent documentation on this, and having a website similar to what Wikipedia looks like requires using the same version of mediawiki and all its extensions (more than 100). The size of the data makes it hard to complete and it's also complicated to get the media (images and films in pages). Here's a recent update on what works and what doesn't.

  1. Download the XML dumps here: https://dumps.wikimedia.org/backup-index.html.
  2. Install mediawiki from git: https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries.
  3. Import the XML dumps in your database. The documentation about that (https://www.mediawiki.org/wiki/Manual:Importing_XML_dumps) is quite old, and the only method that seems to be working in 2019 is the one that is not recommended for this task of importing a lot of data, the maintenance/importDump.php script.
  4. Setup a web server, like nginx mariadb and php-fpm and put the mediawiki online.
  5. Next step: install extensions. Wikipedia uses a lot of mediawiki extensions. Some are required during the import, but most of them only for pages rendering. I suggest you get all extensions at the same time as the mediawiki code, because several months later it will be harder to get the versions of all extensions known to work with the database dump you imported.

I should add that my cheap SSD died a few months after the import completed, so I never could finish putting it online and lost the 7 months of import because I couldn't copy the 290GB elsewhere. Also, having a 7 months old version and counting of wikipedia is not as fun as the idea sounded at the beginning, and there is no incremental update system, or it would be slower than wikipedia change rate anyway. If only the import methods that work much faster were still available, a bimonthly import could be done, but not with this bad XML importer.

Have fun!

0 comment


Programming the Mio Robo3

Last modification: Aug 24, 2022

I found a small, funny looking, modular, wheeled robot with a few sensors that can make it avoid obstacles or follow a line: the Mio Robo3 (was available on Reichelt for 82 euros with the LED matrix not shown on picture). It's very similar to the mBot robot by Makeblock (was also on Reichelt, 88 euros). They are both made by Chinese companies, with the same Arduino Uno-based main board, with makeblock connectors and modules, except that the mBot robot is much more sold and documented. They are supposed to be programmable by Arduino code, graphical programming blocks (scratch or mBlocks) or even python and Android applications.

Unfortunately, the original Robo3 company has long died, the only resource found for mio is the spanish website miorobot.es. In the FormaciĆ³n page, Recursos section, there are links to software, but this was developed with an old version of mBlocks and I wasn't able to make it work on modern linux OS. The Arduino library works however, provided in the linux software page (mirrored here). Just add the zip from the Arduino IDE libraries menu and you'll be able to access the many examples and build your code. One dependency is required: the Servo library, installable from the IDE too. Note that on Ubuntu 22.4, you will need to uninstall brltty in order to have the USB serial port detected. I started to improve the files of the zip to make them easier to read, see the git repo on codeberg.

The robot can be expanded with many modules made for the mio robot or for makeblock (example site). The mio arduino library provides access to all mio modules and examples, but not to makeblock modules, but it shouldn't be too hard to make them work too. The code can be quite simple, for example to make the LED matrix display the distance to an obstacle as measured by the ultrasonic sensor requires one line: leds.showNumber(ultrasonic.read(),4);. Here's a one page program that will make the robot flash its LEDS when we get too close to it, make some noise, go back, and flash again: flee.ino.

Note that reprogramming the robot with Arduino will erase the original demo program that uses all sensors.

About graphical programming

The miorobot.es website explains how to install the mBlock software made by makeblock on top of Scratch 3.0 and they still provide an extension to mBlock 3.4 in Spanish that gives access to Mio Robo3 functions in visual blocks. The extension is currently not found in the list of the program, but is available from the Arduino library zip file (the .s2e file).

There are two ways to use mBlock: the online mode, in which the robot is connected to the computer and the blocks are executed when the run button (green flag) is pressed; the offline/Arduino mode, in which the blocks are converted to Arduino code that has to be uploaded as a new firmware. In the latter, the robot doesn't need the computer to execute its new behaviour (I haven't tried it, only with Arduino IDE directly).

The Mio Robo3 blocks appear in the Robotics section of mBlock, next to the mBot blocks. The source code is available. It seems to be Arduino code with a Scratch front-end. I don't know yet how the Mio blocks differ from the mBot blocks, except that they are in Spanish.

The old version of mBlock is available on Mac and Debian too, but I was unable to connect to the robot on Ubuntu with it. The Mio can be connected either with the USB cable or with the provided USB Bluetooth module (serial service). In both cases, reset the Mio after connection of the cable to the computer and a serial port should appear on Windows, look at the Device Manager. I'm not sure when/how it finally appeared, but after that I was able to connect from mBlock and avrdude using the COM3 that was created. mBlock will show if it's connected to the robot in the Robots section, above the blocks there will be a red or green light. I made a backup of the software on the robot in case using mBlock with it will erase the original behaviour, but with online mode it didn't.

From there, the online mode can be used to prototype a program with visual blocks and have fun. Add the starting block, the one that is triggered by the pressing of the green flag. Everything that can be done with the hardware can be done: displaying numbers or text on the LED matrix, changing the 5 LED colours and intensity independently, use the sensors (brightness, ultrasonic, line follower photodiodes), use the actuators and all kinds of funny logic.

Have fun! Feel free to comment below.

0 comment