Skip to main content

Posts

Electronic Signatures - Snake Oil

Electronic signatures are commonly used in the more advanced enterprises to sign documents - PDF files mostly.  Unfortunately, the implementation is broken and it doesn't work.  The broken implementation reduces it to snake oil. A typical IT system is set up and managed by one or two overworked computer geeks who clicked through a setup wizard to configure a key server on the company LAN.  The public and private keys are distributed on the company workstations and laptop PCs by Active Directory and GPG and once it looks like it is working and some users can sign a document, the whole universe shakes, angels and birds sing, flowers fall down from heaven and all is well... or is it? I wanted to be able to sign documents on my engineering laptop PC which runs Linux, not just my office PC, which runs Windows (and which usually has some problem or another).  So I asked IT for a copy of my Private key.  After a few months, they emailed me my Public key.  ...

Grajcar Slovak Folk Band Does Metallica

Well, evidently good artists can play anything on any instrument.  Here is the Slovak folk dancing band Grajcar, playing Metallica on three violins, a double base, clarinet and cymbal. I recorded a minute or so of Nothing Else Matters , at Sheik Maktoum's Majles at the Emirates Golf Club in Dubai, during a Czech and Slovak party. (The horrid video quality is due to Google, not me!). Here is more of them in what looks like Bratislava: https://www.youtube.com/watch?v=126IpgNmA48 

Rover2: Serial Motor Controller

My new rover is supposed to be simpler than the first one and something that irked me with the first design was the motor controllers.  They worked, but they are ridiculously complicated.  So I bought a Sparkfun Monster Moto Controller and hooked it up - much simpler. The only hassles with it is that if you would plug another board on top of it, then it could short to the tops of the capacitors and the VIN connector could short to the Arduino ICS pins underneath it.  I stuck a rectangle of clear plastic cut from some screws packaging between the boards and snipped the ICS pins off - done. Serial Control Controlling a DC motor is straight forward, using two pins to switch the H bridge direction (INA1, INB1) and one for speed PWM (PWM1).  There is also a current sense input (CS1) that you can set to turn the motors off if they get stuck and the current increases too much.  You'll have to set the sense level with trial and terror. Here is an example for a...

DSP on an Embedded Processor

Doing digital signal processing on a teeny weeny Arduino processor requires some trade-offs, since it is slow and doesn't have much memory.  However, bear in mind that today's embedded processors are faster than yesteryear's DSPs, so all you need to do, is use yesteryear's methods! What it mostly amounts to, is careful use of integers and shifts, instead of floating point numbers and multiplies.  If you can, limit multiplies, divides and buffer sizes to powers of 2.  That affords enormous speed optimizations. Circular Buffers For example, let's filter input from an 8 or 10 bit A/D on a little 16 bit embedded processor.  This usually requires a low pass filter.  A simple low pass filter is a moving average and to do that, you need to keep a buffer of old data values. If you are smart, then you will set up a circular buffer with 10 values, but if you are smarter, then you will use a buffer with 8 or 16 values instead - why? If the buffer size ...

Pleasant Random Jingle Generator

Beeping Computer Way back during the time of the dinosaurs, circa 1975, when one turned on a desktop computer, it would go Beep!   That fell out of favour once Microsoft figured out how to make a computer take 3 minutes to boot up, before finally being able to emit a simple beep.   However, it is still common practice to test a new little embedded controller by flashing a LED. Music vs Noise Now for those tinkerers who are a little more adventurous: How about pleasant sounding random noise?  There are two things that help to make noise sound acceptable: Use a tonal scale that everyone is used to. Avoid obvious dissonance. Scales We could use a Pythagorian scale with 7 notes per octave and perfect harmony, but then it will sound weird - like a Scottish bag-pipe and I don't have enough Scottish genes in my ears to prevent them from bleeding. The equal tempered (logarithmic) scale of Johan Bach ( Das Wohltemperirte Clavier, 1722) ), with concert pitch (19...

Arduino Rover #2

My second rover is coming together.  The advantage of a ground rover is that it cannot fall out of the sky, so one tends to get rather more hours of amusement out of it than from a helicopter or fixed wing toy aircraft. The first rover worked, but it was too complicated.  The problem with all toy projects is that I tend to forget what I was doing with it and I like to 'work' on multiple things at the same time.  My shop currently has a glider, a valve guitar amplifier, a VU meter, multiple radio transceivers and this rover all in various stages of incompletion.  Therefore any project needs to be modular and simple, so that I can see what is going on at a glance.  Otherwise, it ends up in a corner, gathering dust, rather sooner than later. Rover #2 uses the Sparkfun Arduino Redboard for its brains and it is meant to be completely autonomous.  Addition of RC makes it too complicated and hard to maintain, so I ripped all that out (and it can now go ba...

Arduino LCD Button Shield

The Sparkfun LCD shield works very well.  It has five buttons wired to a single analogue input, which is a neat pin saver.  However, the example code is much too complex to my liking.  Granted, it can handle multiple simultaneous button clicks, but who on earth will ever do that?  So I made something simpler: #include <LiquidCrystal.h> // LCD uses D4 to D9 and A0 for buttons LiquidCrystal lcd( 8, 9, 4, 5, 6, 7 ); void setup() {   lcd.begin(16, 2);   lcd.setCursor(0, 0);   lcd.print("C'mon click it!"); } void loop() {   unsigned char key;   unsigned int sensorValue;     sensorValue = analogRead(A0);     if(sensorValue < 1000)   {      sensorValue = analogRead(A0);           lcd.setCursor(0, 1);      lcd.print("                ");    ...