Posts

Mini Lidar for £11

Image
Well to be honest, a VL53L0X time of flight chip mounted on a small circuit board and then attached to a pan and tilt set-up positioned by 9g servos.



The data sheet for the VL53L0X chip is here.
Adafruit do a very nice little VL53L0Xboard although they can also be easily sourced from a number of suppliers. I downloaded the AdaFruit Arduino wrapper for the device library to get me started. Communication is over an I2C serial interface which keeps things straightforward. 
Connections from an Arduino are just to SDA and SCL as well as 5v and ground.
The tiny VL53L0X chip includes a 940nm VCSEL laser (Vertical Cavity Surface-Emitting Laser) fitted with infra-red filters giving reasonable immunity to ambient light interference. The laser is safe and will not damage eyesight. The device sends out a short laser pulse and measures the time taken for the light to be reflected back. The measurement range is up to 2 metres although the device is normally operated in one of 4 modes. There is a …

Sonar Scanner Part 2

Image
The second iteration of the sonar scanner (part 1 is here) has seen a switch to an Arduino Nano as the target board. This required soldering some pins to a piece of strip-board to allow multiple devices to take power from the limited 5v output available on the Nano. This allowed some simplification to the “rats nest” and the set-up as a “chip on the old block” as a precursor to any installation. The current layout made testing the revised software somewhat easier.


Here is a rather thrown together diagram of the connections. Not up to publication standards but hopefully clear enough for anyone interested.
The Arduino sonar scanner support software is now transformed into a state machine where each “task” set by a controlling processor over an I2C serial connection switches between states. The controlling (master) board can also request data from the Nano with the data returned being dependent upon the current state.
The idea is that it should be straightforward to introduce new option…

Sonar Scanner

Image
As part of an ongoing project I sourced a mounting bracket for an HC-SR04 ultrasonic sensor sitting on top of a 9g servo motor that can be used to rotate the sensor through a 180 degree arc. I also wanted to include a DHT11 temperature sensor to help determine a more accurate speed of sound.

The final setup will probably be run from an Arduino Nano but before planning that I wanted to run some tests on a handy Uno as that has more power supply pins immediately available. The actual rats nest is shown.



Here are how the components are wired up to the Arduino.

The DHT11 I have is mounted on a little board that includes a pull-up resister between Vcc and the data pin and in fact only exposes Vcc, Ground and data out pins. This is the most common format around as far as I can see and adds up to a nice package that has reasonable accuracy (within 2C in the range 0C to 50C). I downloaded and installed the DHT library from Adafruit to read the sensor although there are others around.

The tes…

Visual Studio and Arduino

Image
Following on from my little excursion into the Raspberry Pi world I thought I should make amends by mentioning the support that you can get from Visual Studio for Arduino development.

The Arduino IDE is pretty good in the main. It has a few clunky bits but it is fine for quickly getting some code running but issues do arise when the code base grows. I have tried the option to use an “external editor” with Notepad++ (which is a tool I use a lot in general code development) but it is still not an optimal experience. Some Arduino developers use Eclipse and I got a lot of experience with that tool when I first started programming for the Android platform before Android Studio became the norm. There is also Visual Studio Code which is another great tool and has a confirmed place on my Apple mac. For me though, the Visual Studio IDE is the “stand out” developer’s tool.

If you fancy the lighter weight Visual Studio Code then there is a great extension for that IDE in the Visual Studio Marke…

Visual Studio and Raspberry Pi

Image
As this blog is mostly about using the Arduino platform this might seem slightly "off topic" but I am working on a robot project that will include a Raspberry Pi along with (at least one) Arduino.

Background is that I have been working on a project that means writing a lot of C and (inevitably) C++ code often building the same code base on an Arduino board and on Microsft Windows using Visual Studio.

I had seen the recent post called “Visual Studio Can Do That?” which covers handy “add in” items and lesser known features to illustrate the broad scope of this brilliant and free IDE. The last item “Deployment” got me wondering about just how easy it might be to write and debug code directly on a device. Looked like the Raspberry Pi is very much doable as the OS running on the board can support SSH (and Virtual Network Computing VNC) to make this straightforward.

To give this a whirl, I soldered a set of headers to a Raspberry Pi Zero W board. 40 pins of hell later… In fact I …

Caenorhabditis Elegans (C. Elegans) Nematode Project

Image
This project started with a couple of less than perfect hardware experiments but ended with some software fun.
Without easy access to a 3D printer or even a laser cutter I am usually confined to using “off the shelf” boxes or serendipitous finds to house or support my projects. I can manage a bit of woodwork but this is usually at a “macro” scale (as examples, I reroofed our house and built a lapstrake canoe) and this makes me wary of attempting fine detail. I know I thought, “I will try Perspex”. A bit of online shopping took me to acetate sheet and I quickly ordered a sample.
I had a couple of continuous servo motors sitting in my “bit box” and had in mind to use as the basis for a lightweight robot chassis. Then addition of a couple of wheels and a small ball castor looked likely to make a good trial for an acetate sheet platform base.
A laser cutter would be great for acetate sheet as I quickly found out. It can be cut by scoring with a Stanley knife and snapping over an edge in a si…