Installing Apache and PHP on an Intel Edison with Yocto Poky 3.5

I got the chance to play with an Intel Edison board a couple of months ago, and I just got my own board today, so I spent a bit of my afternoon settings things up, and playing with it.

One thing I noticed, is that most tutorials and guides for the Edison were written for the version of the system that was popular during the “golden age” of these boards (the “2015-05-25” image), which is no longer the latest version. Now that I’ve upgraded mine to the most recent image (2016-06-06) it was clear that a lot of packages were upgraded, removed or changed, which means that a lot of tutorials, guides and info online no longer apply (I actually experienced this first-hand when trying to find config files that were nowhere to be found, or disable services that no longer existed).

But among the differences, the worst offense (to me) is that Apache is missing (It was apparently replaced by nodeJS as their “web” technology of choice). A lot of fun things you can do with an Edison (and other linux boards) require Apache or PHP, so this might be a problem for a lof of you, not only myself.

But anyway, upgrading is usually good (as long as the new software runs well), so I decided to give the new version a chance.

Read More

Arduino’s broken Random()

If you are using your Arduino’s PRNG (Pseudo-Random Number Generator) for anything more serious than flashing random lights for your Christmas decorations, there’s a chance you might run into some unexpected issues, as the random() function in Arduino seems to be somewhat broken.

Why? Let me explain.

Background

Most basic random number generators in programming libraries and platforms are based on what is called a “Linear Congruential Generator” (LCG), and I have discussed them before here in my blog. As with any PRNG, the output of the algorithm ends up being a sequence of numbers “seemingly” selected at random, starting from a “seed”.

Given the basic structure of an LCG, after you have drawn X numbers from the generator, you’ll start getting the same sequence again. This is called the “period” of the LCG, and is one of the things you should know about the PRNG you are using (again, if you are serious about your random numbers, or you need a controlled, predictable and stable behavior).

Arguably, you should always know the weakness and strengths of the PRNG you are going to use, before even using it, as to avoid any potential pitfall and/or limitation (and that’s why it’s normally not a good idea to use the default implementation of a random generator in any language; For the most of it you don’t know what you are getting).

Read More

Enclosure for a D3806 Buck-Boost Switching Power Supply

I kinda like the end result.

Not long ago I purchased this neat and compact DC to DC Buck Boost converter that performs reasonably well. It has a maximum output of 38V, 6A and has more than enough flexibility and features to be a secondary power supply in my lab.  I recently found a review of this product by Julian Ilett on his channel (which I’ve been following for a while) and the way it works is quite clever. The problem for me, however, is that it was a bit messy to have the bare circuit board laying around unprotected on my bench. The top-mounted panel wasn’t too practical either, and it was becoming increasingly clear that it was meant as an adjustable power converter module rather than a supply. Read More

post

Making a dedicated Logic Analyzer, Part 1

For a few months now (and after successfully using a cheap USB analyzer with my Pocket C.H.I.P) I’ve wanted to make a sort of standalone Logic Analyzer  / mini linux machine that I could have on my bench. I originally wanted to use one of my C.H.I.P boards, but I soon stumbled upon a bit of a difficulty: It’s not that easy to use readily-available touch-screen / LCDs with the C.H.I.P.

Because of this I decided to switch to an old RaspberryPi1 Model B that I had laying around instead.  I don’t need anything faster than that, and finding TFT/LCD screens for Raspberry Pi is ridiculously easy. As a matter of fact, I already had a small 480×320 LCD that I tested before and worked really well. I may eventually switch to a small HDMI screen, but for the time being I’ll use this one:

*SPOILERS* The RPI with the LCD after everything was configured.

Read More

Developing on a Pocket CHIP with “Motor”, a Text-based IDE

Nothing like a Text-based UI

A recent discussion on the Pocket C.H.I.P forums made me dig up memories of my time with DJGPP (a wonderful DOS port of GCC), and its quite functional text-based IDE; RHIDE.

I thought that it would be great to have RHIDE running on my Pocket CHIP for doing simple C/C++ development on the go, as TUIs (Text-based User Interfaces) were pretty simple and could work in really low resolutions, but unfortunately CHIP’s ARM architecture was completely foreign to RHIDE’s build scripts, and it refused to compile.

I’m definitely no Linux guru, but I reckoned that adding the architecture to the build script wasn’t going to be easy, especially since it apparently had several architecture-dependent libraries, modules, etc, so I embarked on a quest to find another text-based IDE for Linux, and that’s how I found Motor.

Sure, the project is 12 years old (last “build” is 3.4.0 from February 2005, and still more recent than RHIDE), but I thought that perhaps it could still work on a relatively modern Linux distribution, and to my surprise, it did (with a few gotchas, though).

Read More

BT Audio Module with Aux Input

I have a very simple “audio/video” setup in my room. My main computer display doubles as my “TV” for playing videogames and watching movies. Technically speaking is just a 22″ HDTV with a bunch of input options, which I have connected to all of my devices, mostly through an HDMI hub, so I use the same screen for my computer, and my various consoles and audio/video devices.

Now, I’m not an audiophile, but as you normally get to expect, its integrated speakers are kinda too terrible to actually listen to anything through them for more than 10 seconds, so I have a couple of entry-level PC speakers connected to the TV audio output, which give relatively decent sound, or at least, better than with the monitor alone. Now, as all my gaming consoles and A/V devices go to the same TV, this is a pretty centralized setup, which is great for most of what I do, and has worked really well for years, but stops being great when I want to listen to something not physically connected to my system, like my phone, laptop, tablet, or whatever. So I thought of adding a bluetooth receiver somewhere in between.

After an online search I ended up buying this nice little module, which is essentially a BT 4.0 receiver that works with 5V. By default it will redirect whatever it receives through its physical “AUX IN” port to the output connector, but when a device connects to it over BT, it will ignore the physical input and play the audio it receives wirelessly instead.

The BT Audio module. As seen on most popular auction/e-commerce sites.

Read More

UV Exposure Box Project – Part 2

I disabled the safety feature just for this shot. You are welcome.

This is the second part of my adventure building a UV Exposure box, in which as you can see, I actually finished the build. In the first part I made the structure and planned the electronics. This part covers a whole lot more, distributed over many weeks doing small things here and there. Read More

An update to my desk clock

I like to call this revision “Please believe me, I’m not a bomb”

Like a year ago I made myself a nice little desk clock that has worked fine since then. But recently I revisited the project to do certain improvements.

For starters I wanted a smaller board so I could fit it inside an enclosure.  I also wanted to power the clock from a rechargeable 18650 battery and add the charging circuitry to the design. I was also willing to give up with the ultra low power consumption and use a DC-DC booster that would of course draw more current but would ensure the clock gets a nice and stable 5V at all times. This has two advantages: It keeps a constant brightness for the display, and, more importantly, will give me reliable 5V in the aux port so I can easily interface the clock with other devices or external circuitry if I so desire. Read More

Power supply for a DIY function generator kit

I love DIY/soldering kits, and thanks to online marketplaces like eBay I’ve been able to purchase and assemble a number of them for the past few months.

One of the last ones I got was a very basic but useful function/signal generator, whose only problem was that it required a power supply with +12V/+5V/-12V rails (it also arrived already assembled despite being sold as a DIY kit, which was disappointing in a way).

My firsts tests of the kit were with a PC power supply (the only source of -12V I had in my lab) until I got a “proper” alternative in the form of another kit, which is sometimes advertised as a “Hiland USB Dual Power Multiple Output Supply”. I will call it HL supply during this post (Mine says “Hyland” on the PCB, so assuming an original version exists mine is probably a cheap clone). This one actually required assembly (yay!) and worked fine in my limited tests, but it was still a hassle to have the two boards dangling around connected whenever I wanted to use the signal generator, so after some time I decided to make a (temporary) enclosure for the whole thing.

Read More

UV Exposure Box Project – Part 1

In my neverending quest of improving my homemade PCBs, I discovered that adding a soldermask to my boards is actually not a hard task, thanks to a relatively simple process that involves UV-curable paint. Now, while using the sunlight as a UV source should work just fine, I decided that it was time to build a proper UV exposure box. Winter is quickly approaching and I’m not too fond of the idea of having a variable-intensity light source (the sun) that would make the process (and end result) completely dependent on how good was my estimation of the time required to properly cure the paint given the weather of that particular day.

A UV Box would also allow me to experiment with UV-based transfer methods for the PCB etching process as well, so it was definitely time to build one.

UV Exposure Box. Closed.

Read More