An update.


Its been a while.

My wonderful time at uni is coming to a close. The things I have learnt, the memories I've made and the people I've met are all fantastic. Now that I face my final semester, the remaining 6 months are colored with a tinge of finality and nostalgia. I'm going to miss it.

Career wise, things are going well too. While I am studying I.T, I have always had a keen interest in electronics and engineering. While interning at a software company, I saw an opportunity to move into a team developing new products - working on both the software and hardware sides. As this is something that interests me greatly, I took it. It is immensely challenging, but the work is very interesting and I am learning so much. Even better, I was offered a very flexible casual contract to continue my work following the internship, so I will continue working at this company. Exciting times.

I have long held the idea of moving out to be important next stage in my personal development. Working two days a week over an hour from home, AND juggling full time uni is no easy feat, so I am considering renting an apartment/studio somewhere in the city to reduce the complexity of some things. This is by no means a small mental barrier - but it would be a big step forward for me.

In terms of keeping myself organised, I have a number of things on my event horizon. As usual, this consists of a combination of self-development/organisational/work-related and personal projects:

  • Recycle old shirts that no longer fit me to reduce clutter in the amount of clothing I have
  • Throw out old socks / jackets
  • Find a rental property for the next 6 months - either on my own or with a flatmate (M.M)
  • Clean/consolidate my room, preferably putting the things worth keeping into boxes
  • Get all important toolchains working on my laptop - so I can work anywhere

Projects:

  • Panel creator cad program - for creating DXFs for laser cutting
  • PIC Web IDE - to make programming PIC micro controllers as easy as arduino
  • 145MHz Oscillator circuit and custom PCB - my first entry into the world of RF electronics
  • ESP8266 mesh network node - Building a mesh network using the popular wifi SoC. Each node will have a large battery and a solar panel.
  • Access Control System (ACS) for the BioFoundry bio-hackerspace - built using ESP8266s, electric door strikes, and relays.

Project wish list:

  • Generalised communications system (probably based off IRC) for a chat network or signalling in a distributed system.

  • Generalised plugin architecture for running code and gathering data in the field - for general infosec research.

  • RTL-SDR tool for finding and decoding data bursts in the 433Mhz range (for finding and decoding transmissions from arbitrary devices automatically).

As always, stay frosty.

-Tom


Pizzawise - Never run out of meat lovers again


How many times have you found yourself in an incredibly large group with the insatiable desire for fresh pizza? But before you can satisfy your watering tastebuds, you must work out the most optimum selection of pizza types so that everyone gets what they want for the lowest price!

A friend of mine came up with the solution - to build a web system that allows all your friends to effortlessly vote for their desired pizza, and display how many of each pizza to order at the end.

While I worked on the backend, two other mates worked on the front end. 10 hours later, PizzaWise was live.

Take a look for yourself here.


Building an IR beacon


Infrared is an incredibly underrated communication medium, used almost exclusively in television remotes these days. Despite its poor range (<10m) it is incredibly useful for short range communication (particularly in robots), and its extremely low component cost, energy usage, and complexity make it a candidate for inclusion in any makers arsenal.

Knowing this, and wanting to develop my circuit board design skills, I resolved to create a circuit that could continuously send out a continuous IR signal, a beacon if you will. This has a number of applications:

  • It can be used as a beacon for robots (or appropriately-tooled humans!) to geolocate or otherwise orient themselves.
  • It can be used to transmit the state of a mechanism (such as a traffic light) for a robot to understand (ie: stop before you get run over, or the door is locked)
  • It can be used for short range communication between a fixed and a mobile peripheral.

Board Layout Board Schematic

I settled on using a PIC microprocessor (a 12F683) as the core of the beacon, due to its extremely low power consumption, low cost and simple pinout. I also used a BC548 general purpose NPN transistor to drive the IR emitter (which was a high power IR LED I picked up from element14), as the IR needed to be driven with several hundred mA when the PIC can only provide 20mA.

I did all my calcuations for max current at 3.3V, and hence choose current-limiting resistors at that value. As such, the board can run at 3-3.5V no problem, though anything over 4V you run the risk of killing the indicator LED or reducing the life of the IR LED. The PIC itself will burn out at 5.5V.

After waiting 4 weeks for the boards to arrive fabricated from china, I put together 5 of them. They work a charm, with ranges of up to 10m or so, and run for about a week on 2 AA batteries. All in all, I'm really happy with this project.

PIC Code PCB Ordering link

A fully assembled IRBeacon

Now to put it to actual use ...


Making the ESP8266 sane


When it first came out, the ESP8266 chip was a game changer. For $5, any electronics hobbyist could get a functional WiFi chip to integrate into their next internet-of-things project. There were only a few problems. Well, a fair few problems.

  • All the documentation is in Chinese. Translated by the community! Yay!
  • All logic is 3.3V, whilst the arduino and other popular platforms use 5V.
  • Peak current consumption at 240mA, far greater than the capacity of most built-in regulators on an arduino or similar board.
  • CH_PD pin needs to be pulled high for the device to function (It took me forever to work this out - most of the tutorials I read seemed to omit this detail)
  • Firmware bugs - occasionally the chip stops responding completely and needs a power cycle.

So I set out to build a circuit that would solve some of these issues - particularly the ones that plagued me. I built a circuit that would translate the voltage level on the receive side, would regulate the current, and provide a jumper for the CH_PD pin.

After a fair few hours fiddling with KiCad, I think I've done it.

Schematic

The circuit uses only cheap components. A AMS1117 (you can get a pack of 10 for $1 on ebay) is used as the regulator, and it supports up to 1A of current so no worries there. The resistors used in the voltage divider are 0805 SMDs, so no worries there. The LED is once again an 0805 and can be omitted if you don't like color.

render

I eventually figured out how to add text to the silkscreen, at which point I promptly went overboard and labelled everything relevant, even the direction the ESP8266-01 should be inserted.

render

Yay! Now to wait a few weeks for the boards to ship from DirtyPCBs so I can assemble and test them. Very suspense, especially since this is only the second ever PCB I have designed (hopefully it works).

If your interested, you can order your own set at dirtyPCBs.

Design files are available here.


Project ideas


Floating around in my head are a heap of project ideas that I want to do at some stage. I'm going to write them down now so I don't forget them.

TCPforward - This is a small program that listens for connections on a certain port, then, when it recieves a connection, it opens a connection to a remote host and forwards all traffic between them, essentially acting as a proxy. This is intended for medium-sized networks that only have a DMZ, to forward data away from the DMZ to a server. I could also make this into a primitive load balancer by allowing multiple destinations.

UPDATE: DONE

Backuptrans - This is a simple command-line utility that takes in a file, then opens an SSH connection to another machine in order to upload the file there. Then, it will verify the integrity of the transfer with hashes. Unlike 'ssh', this utility is non-interactive, allowing even the SSH password to be passed in to the utility, hence allowing automated transfers. Additionally, I could make it generate a folder structure and naming system for backups on the remote host.

UPDATE: DONE

Twitch - This project is about 60%. complete at time of writing. Twitch is a minimalist instruction set, virtual CPU, and assembler. It is intended to allow untrusted parties to write code that is executed under very controlled conditions, with the minimum of resources used. The state of a running twitch binary can be frozen at any time and sent over the wire.

UPDATE: 99% done, but havent written the code to serialize it's state.

p2p - This is a simple p2p. networking library written in go, that is about 70%. complete at the time of writing. This library is designed to allow the creation of secure, large-world packet-switched networks.

android-ex - This is an idea to build an assembler for the dalvik cpu, along with a packager for .apk. Ideally, I would like to produce an alternative to using the Android SDK for building apps, and this library would allow anyone to make a compiler targeting that platform. That said, its a massive project, and I will probably never do it.

LinSum - This utility will connect to a linux host via SSH and generate a summary of its configuration. It is intended to simplify management of linux systems. Such a project could be expanded with an interactive summary, which includes the ability to change the configuration.

Securityd - In the deployment of an IPS, IDS, or universal security policy, there remains issues for getting network/security policies across machines in real time; effectively meaning any action from an IPS or IDS is limited to a specific machine. Securityd not only acts as an IPS, but remains in contact with other instances of the daemon in your network, meaning that security policies are implemented across an entire network in real time.

3Projection - A library to render 3d. objects to a 2d. image file. Written in go, conceptually designed but not yet implemented.

UPDATE: Attempted, however I failed due to the unforseen complexity in projecting objects from 2d to 3d.

go-phys - Basical particle physics engine for Go. Implementing euler integration, gravity, collisions, (rigid) particle objects, (rigid) plane objects.