[Lambgx02] got tired of his Android device getting bogged down and decided to dig down to the cause of the issue. His investigation led him to believe that entropy is causing the slowdown. He believes that his workaround reduces 90% of the lag on the average Android device.
So how is it possible that entropy is causing the problem? It seems there is a bottleneck when an app requests a random number from the Linux kernel running at the lowest level of the device. Android is set up to use /dev/random for all random number requests, but [Lambgx02] says that location has a very shallow pool of numbers available. When they run out the kernel has to reload with a new seed and this is blocking the app that requested the data from continuing.
His solution was to write his own app that seeds /dev/random once every second using a number from /dev/urandom. He mentions that this might cause a security vulnerability as seeding the random data in this way is not quite as random. There may also be issues with battery life, so make sure to monitor performance if you give it a try.
Most toolchains for embedded system include support for random number generation. But if you’ve read the manual you’ll know that this is really just pseudo random number generation (PRNG). When calling this function the same numbers will always return in the same order unless a different random number seed is supplied in advance. [Gardner] put together a simple and cheap solution for deriving better random number seeds. He reads a voltage from a 555 timer using the ADC on the microcontroller. At first glance it may not seem like a great source of randomness, but he performed some testing and the results look quite promising.
The project is aimed at Arduino-based circuits, but any chip with an ADC will work. The 555 timer is used as a free running oscillator. We know that this not be very stable when compared to even the worst of crystal oscillators, but that’s what makes it work so well as a random seed source. Add to this the low parts count and small size of the additional circuitry and you’ve got a winning combination. So keep this in mind when you need a random number but don’t necessarily need rock solid entropy.
[via Reddit and Freetronics]
Starting your garden indoors helps to ensure large yields. This is because the plants get a head start before it’s warm enough for them to be put in the ground. But the process involves a fair amount of labor, ensuring that the lights are turned on and off at the right times each day, and that the temperature for germination and growth, as well as humidity, hit a certain target. It’s obvious that a bit of automation would be nice, and this Arduino-based garden nursery does just that. One of the things that sets this project apart is that it shows you how to go from an empty room to the bounty of plant starters seen here.
For the most part the equipment is what you’d expect, seed trays and covers, tray warming mats, and fluorescent light fixtures. the whole thing is given a small footprint thanks to an adjustable shelving unit. The Arduino is used in conjunction with a Sprout Board to add connectivity for switching the lights and warming mats. This is just a matter of driving a relay to switch mains voltage and can take any number of forms, including this home automation project we saw the other day.