Wednesday, 9 December 2015

Ghetto DJI Matrice + Manifold (experiment)

Hi, today I would like to share with you my experiments using the Nvidia Jetson TK1, used for automated vehicle computing and various other advanced small embedded computing systems. It's a more ghetto - but advanced ghetto - experiment.

The reason why I wanted to get involved with the Jetson TK1 board was to see how it compared with other small embedded devices. The obvious one is the Raspberry Pi 2, but there are others out there such as Beaglebone, Odroid and so on.

(size comparision between a Jetson TK1 & Raspberry pi 2)

They all are trying to open the door to general users and hobbyists somehow, to allow us into the world of advanced computing in a small form factor which is a perfect combination when you are attempting to attach it to a small flying object and send it up into the sky to perform various tasks. The smaller the better, the lighter the better. Powerful is also good, however cost begins to creep into the equation and for experimental drone hobbyists, cost - crash - repair factors come into play and unless we are equipped with an unlimited academic bursary fund, or sizeable parental trustfund, then you and me are going to be super careful how we invest our 60 hour -week minimum wage.

Even low entry requirement, poor research funding universities like MIT are onto the 'place a TK1 onto a drone' game:

(Look it's shiny and I'm from MIT. Fund me. Or that's how I think it goes.)


So, when I got the opportunity to take up the offer of a TK1 at the super special offer rate,
I figured that the invite is just too much of an offer to turn down. The spec sheet and observed capabilities roped me in, and I soon discovered that it is indeed the super computer of a hobbyists dreams. It has good I/O, good peripheral support and much faster general performance.

Frist time software setup was quick to perform:
1)Plug in power
2)command: cd NVIDIA-INSTALLER
3)command: sudo ./installer.sh //(installs the desktop environment)
4)command: sudo reboot
/---------------------------------------/
Ubuntu is pre-installed to the TK1's onboard 16GB fast eMMC (i think)

Some of the first things I wanted to setup included:
1)3d print a case
2)look at the mini pcie options: wifi + bt 4.0
3)look into the db9-uart port, see if it's possible to have mavproxy run through this into the APM board
4)hardware button shutdown?
5)look into an ssh app + remote keyboard/mouse app to control using my android tablet. (I would like to do away with keyboard & mouse)
/------------------------------------------------------------------------------------------------------------------------/
And a little later:
1) look at available vision systems. I had a few rejection emails for dev kits, and too costly ($$$$) for me to buy as a diy tech developer, so in true DIY style it might be some kinda hack of a laser range finder, or a kinect-mod with a brighter ir-led installed. see how that goes.
2) the sata power port looks like a neat option for +5v & +12v outlet for devices. time will tell.
3)look into gpio for servo control/sweep
Dji Matrice 100 = £2799/$4200
Dji Manifold computer = £600/$800
Dji A2 Flight controller = £915/$1376
Total = £4314/$6376
Bargain?




After a day or so figuring out the TK1 over coffee, I learned:
1) Soft power button brings up Ubuntu shutdown options menu.
2) There's an Android app which enables ssh control, and also acts as a mouse & keyboard for Ubuntu. There is a guide to making it work here, however i'm currently having issues after executing 'sudo apt-get install xdotool'. console says 'unable to locate xdotool', so I have to fix that.
3)There is a way to modify the power button to shutdown on press. Here's a demonstration of an added switch and power button mod:



Here's the Pin-out:


I decided to get myself a mini pcie wifi & bt 4.0 module (Atheros AR5B225 WLAN Bluetooth 4.0 Mini PCIE WiFi Card > eBay > $2)
I also required a pair of antenna (which strangely cost more than the pcie card):

Unfortunately (or fortunately if you are a developer wanting to start from scratch) the TK1 does not have a vast array of driver handling as it arrives in the box.
So I had to install the Grinch kernel:
My board: Jetson TK1 R19 Rev 2.0 (important to check using: "sudo head -n 1 /etc/nv_tegra_release")
Therefore for my R19 version: Grinch Kernel version: 19.3.6
 -install guide worked first time: (https://gist.github.com/jetsonhacks/928d84f159e1c7c2eacb)
Result:
Amazingly, everything compiled and installed smoothly and without issue first time. Coming from an Arduino background, it is pretty similar to using a host computer with Arduino IDE > connecting the Arduino to the computer > compiling > uploading.
In the case of the TK1, it requires a host computer running linux (to use terminal commands), I used the latest Ubuntu on a (ghetto) laptop. Compiling, then installing to the TK1 is all done using USB cable & Terminal window.

It took about an hour and a half to compile and upload the Grinch code. The Grinch works well. I have my Mini Pcie WIFI + Bt 4.0 adapter working straight away. As a test, I connected & played some youtube using audio over bluetooth A2DP to a small speaker.
Future:
Anyway, I just wanted a pcie wifi device to allow me to setup and use ssh with my android device. it cost me very little, and works without issues. It was a gamble on which devices are compatible with the TK1.
Eventually I learned how to setup an SSH terminal with an android app:
For the record, I got an Android ssh + mouse + keyboard app working with the TK1. The android app is called 'Home Remote Control'.
Negative points:
 - It has a nag screen to upgrade to a pro version which I.....blah.
 - It seems that when TK1 is started, without a keyboard or mouse initially connected, I'm not getting the mouse cursor on screen showing up, even though I can move around, forcing me to guess, or replug/unplug the mouse which brings up the cursor and fixes the issue. Bit of a pain. Maybe fixable somehow? SSH works well.
Maybe try a different remote app in future....There's lots of them.
To use a remote app on the TK1 you have to install SSHserver & XDOtool:
sudo apt-get install openssh-server
sudo apt-get install openssh-client
sudo service ssh restart
ssh localhost
sudo apt-get install xdotool
That is all.
Later on, I'll be upgrading again to L4T 21.3 (Grinch), but for now some discovery and exploring.
- I have a good idea to create a 3d-printed case/drone mount for the TK1 which i'll get around to making this next week or so. I hope to integrate a decent LED-Ring switch to allow me to boot/shutdown with a little bit of $swag$.
I would really like it if there are some device developers out there who would offer me test devices, right now, i'm looking at Kinect & Webcam + OpenCV, but would be pleased to get involved with Zed/Lidarlite. Any offers just get in touch. Thanks
F450 Mounting
So, then I decided to see if I could mount this on one of my F450 drone frames. With a little bit of careful planning and measurement, some 3D printing and cardboard I got something acceptable for my experiment



I mean, how much is the DJI Matrice 100 + Manifold again?

I have belief that the tk1/tx1 module is going to create a next generation of drones that are complete packages > I can see why DJI added it to their system. The TK1, i'm certain, is capable of flight control + 4g telemetry + vision system + on-the-fly image processing + more. All in one package. - a downward facing webcam to manage optical flow & precision landing, a depth camera such as zed/or a DIY 360 lidar controlling obstacle avoidance & point cloud mapping.


Some people are asking "What's the point of this?", and I guess you can say that sentence about anything and everything. The question ususally comes up by people who just don't understand or are confused about ideas. From a ghetto DIY or maker environment, imagine using the TK1 with a Kinect camera attached and mounting it onto a drone, then flying the drone around a building to collect damage and repair assessment data. Having this data in 3D without having to hire expensive cranes or time consuming and costly surveying, this would mean an advancement. Here's an example of this setup collecting 3D data:
I think 3DR would be wise to create a standalone IMU unit for the TK1, an install script for Ardupilot + 4gmetry, and the vision systems will arrive and develop separately.

My raspberry pi 2 is still waiting in the corner, booting, and refusing to load/power 4G dongle drivers. With the TK1 it is so much more trouble free, everything loads, everything installs, it has voltage power, and processing power. There are no SD card bottle necks.


Building the cover:


So now that I have got the physical model planned and organised, it is time to think about data communications and devices.

I contacted Ericsson & Huawei to help me find a Half-mini pcie 4g lte board so I can make better use of proxy communication to control APM. Fingers crossed I get some good support form these guys. 

Alas, there does not appear to be any half-mini pcie 4g LTE boards on the market yet which I find unusual considering here we are in an age of being able to mount a supercomputer onto a drone in my spare room using small amounts of money. I do hope the big mobile manufacturers sort things soon.

In the meantime, I dug out my old 3.5g HSDPA+ dongle which I picked up for under $5/£3 when I was at Imbi Plaza next to Plaza Low Yat in Kuala Lumpur a few years past. I really love Imbi Plaza, it is like the dirty, rough market for poor geeks. Anything repaired, anything old-tech can be bought. Compared to the gloss and shiny-pristine gleam of Low Yat and it's high price tags, it's really a great market. I mean, here we are, in the west, getting super excited about 4G data using our phones, and back in 2011 most of Malaysia was hocking their 4G dongles on flea markets and getting ready for 5G. Anyway.

(Green for Go)

The good news is, that my 3.5G HSDPA+ dongle works with Grinch Kernel without having to install anything (wvdial, ppp, qt) to Ubuntu. It already has a neat setup wizard.

Now, I need to read up on enabling UDP over 3G/3.5G/4G, sending webcam video to the New Droidplanner app via gstreamer, installing and configuring mavproxy.
It's all really interesting anyhow.
Next up is to connect a camera.

Most people let's face it, don't get this far. To mount a companion computer onto a drone that you made yourself is a stretch. We generally are happy to pootle around the sky, content in our minds.

However, if you have any interest in mounting a companion computer, in this case the Nvidia Jetson TK1, Then here I would like to show to you how to get it up and running untethered and wire-free on your f450 drone.



First up we have to scrape through our scrap box for an old webcam; 720p or higher is a good idea. I have a Microsoft Lifecam Studio that I am happy with, I use it for my blog photos. What we have to do is cut all the excess wire from the usb cable to make it nice and short and light for mounting on our companion-computered-drone. I don't wish to cut the wires on my Lifecam Studio, so I took my older webcam which is an HP 720p camera that is no longer used and is just in a drawer. To trim it down we just choose a suitable length and cut with some nice sharp scissors.


We can then use some dupont connectors to join the 4 wires (Red/Vcc, Black/GND, Green & White/TX/RX). I crimped the connectors using a pair of crimping pliers that I also have. Shop around and you can find them for $10.



We also have to make a power connector for a drone lipo battery. I used an XT60 connector and connected a 3s lipo (12.6v) but you can also use a 4s if you wish because the Jetson TK1 has a voltage tolerance of 9.5-16v (16v if you are not using sata drives too, else it is 13.5v to avoid damaging the drive). The outer barrel of  the power plug is the ground (GND/Black wire), the inner hole is Power (Vcc/Red wire). Confusing the two can screw up things if the TK1 does not have reverse polarity protection. I don't recommend trying to find out.


It's then a matter of sticking/fixing the camera module in a location you want and plugging it all in and booting up the Ubuntu OS. Et Voila. You have a camera-ready companion computer connected using a lipo battery, all free from ground tethers, ready to fly in the air. 


You can check/view that the webcam picture is sending to the Jetson by running 'cheese' application. It should be installed already to ubuntu on the jetson if I remember correctly. There are many options to view your webcam - VLC does it too.

What next? Well, we want to set up something to run something useful for the big & powerful Jetson board don't we. So I guess using a cheap webcam, we could experiment using OpenCV for object detection


Or Caffe for 'deep learning' object identification (although the results are somewhat comical)


The algorithms are improving day-by-day and improvements are progressing, but be prepared to not have your dream results for your 'crime-policing drone' right now. We are safe from big brother for now.

For my tests, I am using a cheap webcam that didn't cost me much. You can also find a used Xbox Kinect camera these days in junk stores for under $20 (Version 1, or for better resolution Version 2 but more $$). With the Kinect we can fly around and generate 3D imaging in real-time, mapping the flight area, or creating an image to allow the drone to avoid objects upon repeat flights. Real-time will take time, as they say. 
For connecting the Kinect you have to again trim the wires short using the dupont connectors, also the kinect v1 requires 12v input which you can get from the TK1's Molex port.
From these two options, the only way is up (in price). Some cameras I have seen include:

-Asus XTion webcam (not sure if in production anymore)
-Intel Realsense Dev Kit ($99) (Greater depth range (40m) than Kinect cameras)

There are others out there such as Lidar modules (Lidar Lite/Velodyne), and other depth cameras with prices over $400. The velodyne Lidar has a huge price. Keep reaching for that rainbow:


(Velodyne VLP-16 --- RRP $7999)

There are suggestions that long-range (100m) Lidar modules can be made using a decent home DIY laser rangefinder, removing the module and connecting to an Arduino or Teensy board. The DIY method can be done for $20 if you buy a decent used laser rangefinder such as a bosch unit on ebay. Why use a board? It's suggested that it is better to process the range in metres using an arduino/teensy before connecting to a companion computer which will do the mapping/imaging. There is a 360-degree rotating Lidar module tutorial here.

If you want to download the 3D files I used to make the F450 mount, you can do so here:

Google Drive


Or View it on Thingiverse




Monday, 19 October 2015

Ghetto DIY DJI Osmo



Hi there, this week we have seen the release of the DJI Osmo handheld gimbal camera, which, as most people in the hobby will know, enables the camera handler to record super smooth and steady video footage even as you swing your arm or rotate/pivot. The RRP for this slick-tech is a smooth £549/$850. Throw in a selfie stick extension for another £43/$67 and it's quickly approaching almost £600/$1000!

Can we build this ourselves for ghetto cheap?

Behold! The Gh-osmo!

I built this about 6-8 months ago as an experiment to see if I could extened the usefulness of my DIY 3-axis drone camera gimbal that I have had for a couple of years. It works really really well, and I'm far and away pleased with the footage I get. Here's an example of footage:

(recorded at 1080p 60fps speeded up using Xiaomi Yi)

The quick list of features include:

- Xiaomi Yi Action Camera (Super-cheap sub-£50 2.5k camera)
      - Upgraded to 3-axis using:
          -2212 DYD gimbal motor
          -3rd axis extension board (depending on the version of Alexmos board you get)
-Sony PSP thumbstick (tilt control)

Extra DIY parts: Small scrap wood dowel pieces, old pcb board cut for 3rd axis mounting, I designed a 3d printed xiaomi bluetooth remote holder, and also a CP Filter mount for slicker camera footage. 

I can live view, pause, record, snap and adjust with my smartphone, I can stop & record with the bluetooth remote, I can tilt using the PSP thumstick, I can extend the selfie stick for height footage, the gimbal is setup to follow-mode so that it, well, look that one up. Put it all together and you get something like this:

Costs were about 1/7th the cost (about £90/$140), but I already had most of the parts, and I just 3d printed the things I needed so I didn't actually pay anything more.

Happy Ghetto filming kids. Keep off the pipe. 


Wednesday, 14 October 2015

Turnigy/Flysky i6 Secret Menu

*For updates to firmware flashing please read updates at the bottom of article*

New Github:  https://github.com/benb0jangles/FlySky-i6-Mod-


New Update (05/12/2015): 10ch Firmware beta firmware


I recently discovered that the Turnigy/Flysky i6 transmitter has a secret hidden menu.



By holding both sticks down-left then powering on the transmitter, we then get a new menu with the following display:


And the menu tree is thus:






Looking at the code for the i6 updater file today, it's clear that there are two files uploaded to the i6 transmitter each file is 55kb and almost identical in code (I have not figured out the exact differences yet). A good guess would be to assume that one file is for the user menu that users experience, the second file is a backup for factory reset. *It might not be possible it is this way because the MCU is supposed to be 64kb storage so 55kb + 55kb = 110kb too large so I must look more why the updater has two files*




What does this mean? Potentially, it means there is more data for the user to use, more menus can be added (double the amount), and potential for er9x to be ported to this transmitter.

It seems that this transmitter is capable of PPM signal & Telemetry data between transmitter (Tx) and receiver (RX) using the ia6b receiver (is not included as a standard receiver upon purchase yet, but probably eventually), it is also feasible to assume that the transmitter can be hacked to allow full telemetry and more than 6 channels (potentially 16 channels for controlling all the switches, knobs, sticks, and not forgetting trainer port/headtracking channel on this remote.

Some progress is being made on modification of channel numbers here. there is also a need to experiment with the ia6b telemetry data - is it standard ibus or pwm or whatever being sent from tx to rx. Once this is understood it can be used to determine if the code needs to be encoded using an arduino mini in between the ardupilot and the receiver or can it just be sent 'as it is'.


It is potentially possible to not have to just hope for i6/Ardupilot telemetry displayed on the i6 transmitter menu. It is also potentially possible to add a HC-06 bluetooth module to the i6 (tx & rx) and send telemetry to a Droidplanner phone or tablet like it has been done with OrangeRX openLRS radios here.

Also what is the potential for replacing the i6 MCU with a Teensy? More RAM, better processor.

Update (telemetry possible):

Update: How to unbrick your i6.

ftdi diy connection




Update:

a straightforward Mod_i6_Programmer.exe has been created. Some testing to perform, but fingers crossed.


Update:

Hello, I have tested the Rclogger transmitter update on my flysky i6 and it installs just fine.

To perform this experiment you need to (how I did it):
1) use an ftdi adapter connected to the i6 transmitter:

2) Download the Rclogger updater here

3) Turn on the i6 transmitter using firmware mode:

4) Open app, Connect and press update, wait for update:


Result:



Please note that I am using my own ftdi adapter and not the official flysky/turnigy update adapter.

Please also let me know your update experiences.

You perform this at your own risk I am not responsible for your mistakes (However, I had no problems, you can also use the standard flysky updater exe to revert back to standard if you wish to)

Update:

I am now able to use a 18650 lion battery. I am using the Panasonic 3400mah NCR18650B cell, in a 1-cell holder, then soldered to the i6 +ive & -ive terminals. I can adjust the i6 power voltage reading to offset the cell alarm by using the secret menu. The aim is to set the voltage reading so that it triggers the alarm when the 18650 cell reaches 3.2v


Not a perfect solution, but means that the lithium cell won't be damaged. I figure that the flysky i10 uses a li-ion battery so it might be worthwhile searching for one of those cells to fit more easily. Maybe even a flat cell phone or camera lion cell, huawei lion + charger sets are available cheap on ebay

Update:

I designed and 3D Printed a battery holder for a cheap phone battery. A little rectangle hole must be cut to let the wire pass inside the i6 transmitter.
3D Printer File can be found & downloaded here

Update 23/12/2015:

It appears that flysky have responded with a conceptual updated model - "Flysky i6s"

It seems that it is generally similar to the standard i6. The differences include:
- Phone mount
- capacitive touchscreen? (Why?)
- button and potentiometer repositioning
-added usb (inbuilt ftdi/uart?)
-added ps2 port (same trainer port?)

More details: HERE + HERE

Receivers are still ia6/ia6b/ia10

It's just a restyling in my eyes. What model users want is open software utilities to allow us to customise things, which we are doing here.

Also Flysky updated their product page for the i6:
They now describe "Firmware upgrades are now available to expand the channel"

Which makes me think they are referring to my Github page for the Mod-i6 project which is a nice indicator that they are reading. It would be nice though, if they just released a developer code instead of just palming off updates to the community without releasing their programming code files, or even responding to my email requests for code. Protecting but not advancing?
Time will tell.


Saturday, 10 October 2015

Updating the APM mini 3.1

It is thought that the APM (2.5/2.6/2.7/2.8/mini 3.1) board is now retired in favour of Pixhawk 32-bit flight controllers. However there are still many lovers of this flight controller still and many who still feel there are some small improvements to be made using the existing code and board schematic. An advancement on this board, for me, would be to remove the MPU-6050 invensense gyro + accelerometer sensor, and simply include the sensor as a separate board using micro/SMT - FPC & Molex connectors with a flex cable (usually seen in smartphones).

Why?

Internal Vibration Dampening. All in one box. Just like the Naza flight controller boards. In this day it astonishes me that nobody has implemented this. Well, actually, when you look at it from a western investment point of view, it makes sense in respect to how western PCB innovation has ground to a standstill (almost) because we expect china to copy and sell a cheaper version within 6 months of production, western investment is therefore ruined. So we are often relying on a few eager hobbyists to order a small production run on a small number of boards. Which is where I come in with my APM 3.2 mini board. Possible? Would you buy it? Please let me know your interest.

Thursday, 1 October 2015

Ghetto 3D printer





I finally got a 3D printer this month. The prices have come way down for the Fused deposition modeling (FDM) - type printers. I picked mine up for just short of around $200 usd. Now, don't get me wrong it was not a good piece of equipment out of the box. The power supply broke after just a few turns so I had to use an old 600w PC PSU which I charge my lipo batteries with.




The heating element (hotend?) also wasn't up to much to begin with as it seemed to leak, or clog up and require stripping, cleaning burning with a blow torch, and reassembling then recalibrating every fricking time it decided to break. in the first two weeks it had a serious clogging problem roughly 2 out of three print jobs. But eventually, I learned to adapt the hotend, stop the clogs, stop the leaks, and optimise the printer settings. Things such as layer height, infill density, print speed, retraction, hotend temperature, fan speed, all these things I have learned can affect the print quality or success/failure. 


I'm still sticking with PLA material because I do not have a heated bed yet, so I'm not using ABS just now. There are new materials appearing all the time now too. Materials such as a flexible ninjaflex, or a wood mix such as bamboofillwoodfill , and corkfill, there are many types of material described here & here if you have more interest in what they are and what they do.





I have been learning to use Repetier Host software to create printable files from 3d model files. I'm altogether happy with how it performs and it feels like a good all-in-one solution for hobby printers.


I am also using a free version of Sketchup to make 3d designs quickly and *fairly accurately*. It has its own imperfections and several frustrations, however the learning curve was not as steep as I have experienced with 3d design software in the past (such as Blender & Lightwave eesh). I feel sketchup allows me to make simple geometric designs suitable for my simple FDM printer. I want practical objects that I either cannot buy in the shops, or that I can make more cheaply and more quickly.




I am limited to a small print diameter of 180mm, but I can print as high as 300mm depending on the model.



I have been designing things like I said earlier, for those objects that I can't buy in the stores yet, or which I could make more cheaply and quickly; and I have been posting these objects on my user page at Thingiverse. I'm not affiliating with any of these services or products by the way, it's just what I have used to get me printing. My designs are free to use for all, and not for commercial use or profit which I feel is a fair notion as we can now see on the internet, Chinese vendors who are now selling other people's designs ready made. I figure that once you put something onto the internet it is not secure and it becomes a wild west environment hey-ho.


I'm altogether happy with the printer now. It has taken work and has been frustrating at times but from general knowledge and practice it has worked and I'm producing new designs from the thoughts in my head, every few days, and that can't be a bad thing at all, in fact I'm quite taken by how the mind changes with regard to product and our understanding of it. We can so easily just think of an idea and create it, and it will be unique to your thoughts and requirements.

I whole heartedly recommend investing in a pair of measuring callipers


That is all right now.
Please feel free to ask me any questions or advice, and also please offer your tips.

Wednesday, 29 July 2015

Arduino Geiger Counter

Hello, this summer has been a mixture of activities for me so far. I have been trying my best to not get too involved in my drone development projects by taking more time out to relax and enjoy new activities. I recently acquired a garden allotment which I must admit is a new direction.

I recommend anyone who has an interest in open code projects to try their best to get involved in gardening as a way to break up the workflow and provide timeout. We often feel that in order to be successful, we have to set our goals to that of silicon valley employees - punctual, perpetual machines, with an aura of privilege.
The reality is more often different. And also we have to be different with our approaches to tackling ideas and projects in different ways. I also got chickens and built a chicken shack! That was a rewarding thing, my hens lay some pretty good sized eggs.


Whereas my garden neighbours are all for healthy harvests and gathering, some of my experiments have included seed cultivation. One thing I have learned from this is that even just allowing a couple of your plants to 'go to seed' will reap you hundreds of seeds for next years crop (I don't think I will be buying turnip seeds for a while).








Anyhow, that's my garden. I get some neat foods, got some chickens, all is good. I hope to do a couple of DIY & tech projects for this place which include:

3D printed Chicken water dispenser


I also hope to gather from skips and waste, enough materials to build an eco-shed. Something like this, but less cool:

Anyway, this week I was up late with time to spare, and decided to give a go an arduino geiger counter project. I have always had an interest in sensor data acquisition and how to do it; it's usually out of most people's reach to have all these expensive and fancy environment monitor devices that are considered specialist items which usually hold a specialist expensive price tag. Where better to start DIY data collecting than good old background radiation levels? I'm joking. Most people start with temperature & humidity using a DHT-22 sensor. It's more straightforward. 

I have had fun with the DHT-22 sensor, and also the MQ-7 gas sensor in the past, and feel I need more challenges like that to feel better with my coding abilities.

(mq7 sensor)


One of the more interesting and exclusive environment variables is that of background radiation. It's not something most of us consider or understand or even care about really. And why should we? Isn't it hard enough just trying to understand the weather?

Two things I learned about global background radiation levels are that the standard measure of radiation dosage seems to be the microsievert per hour (Usv/hr), and that all around the world there are different background levels depending on several factors. Kerala in India, being quite a strange place to lay on the beach and soak up some thorium sand, for instance. Here's Some information on background radiation & global location:

"the average exposure from all radiation sources for a member of the public is around 0.26 uSv/hr (one quarter of one millionth of a sievert)." Source

I believe regular normal background radiation to be between 0.11uSv/hr and 0.25uSv/hr depending upon where you live in the world. Here in the north of the UK, it seems to be about 0.15uSv/hr, in London 0.25uSv/hr.

Here is some more information on background radiation:

"The highest level of background radiation is in the state of Kerala and city of Chennai in southern India, where people receive average doses above 30 millisieverts per year, or 3.42 microsieverts an hour, according to the World Nuclear Association." Article here

Amount of Radiation around the world (PDF


Anyway, I built myself a small and simple click box Geiger counter a while ago, and felt quite good about that. The circuit used a cheaply available SBM-20 tube which is actually quite a good tube to have. I didn't really know much about different sensor tubes back then, and just selected on price and availability...And that it looked like interesting cold war Russian hardware.



I learned some details about the data sheet and that it requires some significant voltage to work. My Russian isn't up to much but thankfully some internet people have translated.

What I ended up with was a simple click-box that would make clicks now-and-then (that's background radiation), and go crazy when I placed a radioactive source next to it; in my case I have an old Pentax camera lens that, well, did you know they used to add thorium to glass lenses to affect distortion and chromatic aberration? No neither did I. Apparently it's still quite desirable for it's unique photographing abilities.


What I found lacking with my click box was that it had no way of recording usable data, it also lacked any type of screen display. I wondered if I could modify it using an Arduino nano that I already had?

It seems I could.





All I had to do was connect the arduino to the speaker of the click box using an analog pin (A0) and GND. All the rest was just coding which is available here (free for public use/not for profit/not for corporate or private enterprise):

unsigned long startMillis = 0;
float secondsElapsed = 0;
int analogPin = 0; // set input pin
unsigned long val = 0;
unsigned long tcount = 0;
float tcountRate=0;
boolean isLow = false;
float microSievert = 0;

void setup() {
  Serial.begin(9600);
  startMillis = millis();
  isLow = true;
}

void loop() {
  val = analogRead(analogPin); 
  if(val>9 && isLow){
    tcount++;
    secondsElapsed = (float) (millis()-startMillis)/1000;
    tcountRate = (float) 60.0 * (tcount / secondsElapsed);
    microSievert = (float) tcountRate * 0.0057;
    Serial.print("tCount:");
    Serial.print(tcount);
    Serial.print(" , Seconds:");
    Serial.print(secondsElapsed);
    Serial.print(" , Rate:");
    Serial.print(tcountRate);
    Serial.print(" CPM,   ");
    Serial.print(microSievert);
    Serial.println(" uSv/hr");
    
    isLow=false;    
  }
  
  if(val<10 span="">
    isLow=true;
  } 
}



This now means that I can include anything from I2c LCD display, SD card recording, ethernet & plotly data chart. I might add bluetooth and make an android app.

It seems the click box is has more value and purpose now, and I hope this code is useful to other people.

Here is 'Geigerduino' with LCD:


Back to the gardening.

Saturday, 20 June 2015

Pimped Dremel

I modded my Dremel tool today. I was having problems with the original battery. Specifically, it was this cheap cordless dremel tool from Maplin for £10

The tool works fine, it's good value. However the battery doesn't last long at all, it's a 9.6v nimh, the charger included with the set doesn't even charge properly - it has no full charge cut-off circuit. This makes damage to the battery possible and potentially dangerous if you leave it switched on too long.

After about 12 months of using it, the batteries barely lasted a minute each for me, and also the charger completely broke. :(

So I was left with a dilemma. Buy and replace using $$$? Or have a go at modding it with an RC lipo battery I already have? So Free!



It was a simple mod to do. The tool unscrews without any issues, I soldered a red & black wire to the correct terminals (they have + & - written to help you), annd connected a XT60 connector.

Et voila:



This mod cost nothing for me, as I already have everything I required. I used a 3s lipo. I was initially slightly concerned about over voltage as the lipo is 11.1v nominal (12.6v max) compared to the original nimh (9.6v nominal - 12v max?? I was guessing a bit).

However, I figure that the tool controls voltage with its potentiometer switch increasing voltage as the dial in increased, so I can test it on a low setting for a while to see if it gets hot. It is noticeable that switch level 5 is now equivalent to 3 using the lipo.

I get much more battery life now, and I also have a small battery alarm to give me voltage readout and beeps when low. Charging takes 25 minutes now, compared to like 6 hours as before.


I think this is a worthwhile mod to a potentially dead item. I have made a $10 dollar tool into a much more expensive model with zero cost. The way I see it is that it is now comparable to the Dremel 8200 but mine has an added low battery alarm + readout, and also that Dremel tool costs almost £150 ($200).

Thanks :)