LEAP#414 7-Digit Decade Resistor Box

Finding some neat pushwheel/thumbwheel decade switches seemed like all the excuse I needed to build a 7-digit decade box/decade programmable resistor .. an old-fashioned bit of test equipment, allowing an arbitrary resistance to be dialed up to order. As always, all notes, schematics and code are in the Little Electronics & Arduino Projects repo on GitHub hero_image

EXECUTE IMMEDIATE MySQL

Unlike Maria DB, MySQL does not currently support the command EXECUTE IMMEDIATE. Essentially EXECUTE IMMEDIATE is shorthand for perparing a statement, executing a statement and then finally deallocating the prepaired statement. To get round this limitation in MySQL you can create a stored procedure that wraps up the commands required to execute a statement into a

LEAP#413 Rotary Encoder Digital Logic

Incremental Rotary encoders typically provide quadrature output on two pins:

Quadrature_Diagram CW

LEAP#118 RotaryEncoderMethods demonstrates various ways of using a rotary encoder with an Arduino, but I’m inspired to throw away the microcontroller for a more basic demonstration after reading Experiment 101: Rotary Encoders from ARRL Hands-on Radio (Vol 2).

This project demonstrates a forward/reverse LED indicator using simple digital logic and a mini rotary encoder.

As always, all notes, schematics and code are in the Little (more...)

LEAP#412 BJT Comparator

Analog comparators throw an output high or low based on the comparison of two voltages. Normally you’d use an OpAmp or Comparator IC for this, but here I’m testing the essential concept realised with discrete transistors.

As always, all notes, schematics and code are in the Little Electronics & Arduino Projects repo on GitHub

hero_image

Here’s a trace of the output (red) resulting from the comparison of input (yellow) and reference (blue) voltages..

scope_example_1

LEAP#411 Cordwood III Archway Trigger Mod

This is the third Boldport Club project in the Cordwood series, and I’ve gone off-road with a true 3D archway layout. One thing lead to another, and soon I had a completely pointless LED blinking machine spring-loaded LED trigger machanism.

As always, all notes, schematics and code are in the Little Electronics & Arduino Projects repo on GitHub

LEAP#410 Rube-Goldberg LED Blinking Machine

Here’s a marriage of Homopolar motor and Joule thief that results in a truly impractical Rube-Goldberg mechanism for blinking an LED with a AAA battery. It may be inefficient, but I like it .. mainly because I haven’t seen any quite like this before!

As always, all notes, schematics and code are in the Little Electronics & Arduino Projects repo on GitHub

hero_image

LEAP#409 Boldport Bugs: The Conehead

Conocephalus is a genus of bush-crickets, known as coneheads. Now I have one beautifully rendered in a 3D kit from Boldport. It even has a pretty convincing FM-synthesised chirp that varies in response to lighting conditions.

Boldport projects never fail to inspire some new learning. In the case it introduced me to Pure Data - a nifty open source visual programming language for multimedia. I reproduced the Pure Data chirp model and added a few (more...)

LEAP#407 AC-powered DPS3005 Bench Supply

The DPS3005 is one of a range of popular DC power supply modules; this one is designed for up to 32V/5A DC output. For this project, I am mounting the module in a project case, and adding a rectified step-down transformer so the unit is powered from mains AC.

As always, all notes, schematics and code are in the Little Electronics & Arduino Projects repo on GitHub hero_image

LEAP#406 CH340G USB to Serial on a Breadboard

The CH340G is a USB to UART Interface chip. It is often used as a cheap alternative to more established brands. I have some CH340G chips, and with only a few extra components one can build a perfectly serviceable USB to TTL-level serial on a breadboard. I test it out by using it to program an ATmega328 on a breadboard over the serial link.

As always, all notes, schematics and code are in the Little (more...)

mV Meter Battery and Protection Mod

The ATmega328-based millivolt meter based on a design by Scullcom Hobby Electronics has been serving well on my bench. But time for a couple of mods:

  • adding a 9V internal battery that can be used when not connected to external supply - great for when the bench is crowded
  • simple reverse-polarity protection (inline rectifier), particularly to avoid any confusion over centre-negative/centre-positive power connectors

As always, all notes, schematics and code are in the Little Electronics (more...)

LEAP#405 Bootloaders and Arduino Serial Programming

The Arduino IDE makes programming AVR-based microcontrollers so easy that many quite simple concepts get lost in the fog. I confess to having been hazy for the longest time concerning the role of the bootloader and what exactly was going on when you click the “Upload Sketch” button. There are actually some great resources around the net and on YouTube, but they can also mislead a little because they might focus on just one aspect, (more...)

Run Multiple Bash Commands In Parallel

Bash, whilst great for simple things, can be tricky to use more advanced programming techniques that are easily exposed in things like Java, or Go. Multithreading is one such problem. I often find myself with a series of tasks to perform that I’d like to run in parallel up to a predefined concurrency threshold. My

Oracle ORA-02287: sequence number not allowed here

I’ve recently hit an issue when trying to include a sequence.nextval in an Oracle database view. the database throws the following error: [crayon-5aba534de1f38771671729/] I can see why that might not be allowed – each time you select from the view you’ll get a new sequence number making it a bit daft for most circumstances. I

Oracle View Sequence Test

[crayon-5aba534de29e0881227783/]  

Move Proxmox Container to Different Storage (Updated for LXC)

The Proxmox Web GUI does not give us the ability to migrate a container from one storage device to another directly. To move a container onto different storage we have to take a backup of the container and restore it to the same ID with a different storage device specified. This can be time laborious when working

Generating Diceware Passwords in Python

Today I’m going back to a theme from a post last year and looking at generating passwords with my favourite programming language. A tweet from Simon Brunning pointed me to Micah Lee’s article at The Intercept and my first thought was to write a function to do this in Python. So here it is;

def generate_diceware_password(word_count=6):
    import random
    word_dict = {}
    passphrase = []
    with open('diceware.wordlist.andy.txt') as f:
        for line in f. (more...)

Teaching an old dog to Fish

Inspired by the recent furore around Shellshock I decided that it was time to try an alternative to bash. By the very grown up process of shutting my eyes and poking my finger at the results of a search for “shell” I ended up at fish shell, described by the project as “a command line shell for the 90s”. I’m presuming that this means the 1990s and is not a minimum age requirement.

I’m (more...)

Generating Reasonable Passwords with Python

Thanks to a certain recent Open SSL bug there’s been a lot of attention paid to passwords in the media. I’ve been using KeePassX to manage my passwords for the last few years so it’s easy for me to find accounts that I should update. It’s also a good opportunity to use stronger passwords than ‘banana’.

My problem is that I have always resisted the generation function in KeePassX because the resulting strings are very (more...)

My Career

The next time anyone asks me what I do for a living I’m just going to point them to this YouTube video.

Found on the twitters thanks to Nick Hodge and Jess Dodson.

Howto debug Mendix java actions

To debug Java Actions used in a Mendix Microflow you need to make some configuration changes to the way you start the Mendix runtime.

Add the following in your project settings, in server configuration add the following to Extra JVM parameters:

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

Mendix Project Settings

Start your application in Mendix.

In your Java IDE you need to configure remote debugging. The following screenshot shows my configuration in IntelliJ

Mendix Intellij remote debugging

Start the debugger, put some breakpoints in your (more...)