Wednesday, 16 July 2014

Ghetto Remote camera shutter

So, I got myself a point & shoot camera on Gumtree from an emo kid in Stockport for the princely sum of £10 (he originally wanted £15 but lost the charger by the time I arrived to collect)



Anyway, I messed about with it and it works fine even though it looks quite rough. What I was hoping to do with it in time, was to install chdk on it so that I could get more useful features out of it. I plan to strap it to my quadcopter and use it for aerial photography. Anyway, I'm digressing.

I was a bit bored last night. Think it was a full moon. And I decided to make a remote shutter for the camera so I can take photos in various scenarios that a normal point & shoot can't do. And I thought about it for a while and looked around my house for bits & bobs, and decided I could make a wireless shutter using my android phone and bluetooth to control the shutter up to a distance of 20-30 metres. Not a bad 3 hours of night time activity to expend..

Anyway, here is my result. I call it Blueter*, and the code, app and how-to is coming soon:

First video 16/07/2014



Update 03/08/2014:
Video demonstration of finished Android app. (I also have a version with voice control to upload soon but my phone is ghetto, and I need to find someone with a newer phone so I can try it.)

Sunday, 13 April 2014

Dumbphone/4G Router Hybrid.

Call me crazy, but I just had a thought. I lost my android phone last week, but after a few days I felt like I had lost my drug addiction.

I was forced to order a new sim card & dig around my house to find an old phone to use. At first I felt crippled having to approach texting friends and inputting names & numbers. But once I had adjusted, after a few days, as it turns out, it's really quite interesting. And my Ghetto phone has a battery that lasts...I'm yet to see the battery flake out and i'm on day three. You can take your pick of these phones here.



I hated (well, disliked in general) reading on my android phone. And I mostly read using my cheap android tablet as I felt more comfortable this way on a larger 7" screen. I would mostly connect the tablet using wifi, but I would also sometimes connect using my (lost android phone's) wireless tethering ability. I hated having to update apps, allow permissions, feel frustrated with advertising, and that these apps can mostly read my text messages, emails & contact list if they wish to.

I realised how trapped and anxious (and possibly paranoid) the whole smartphone world has made me feel. Using my cheap dual-sim phone, I felt more relaxed again. Who cares if it doesn't have 4G...

Which led me to the idea.

What if I took my cheap dual-sim C1+ phone and added a small 4G router to the back, and piggy-backed my sim card?

I could take a 4G LTE dongle... Better yet. Take a 4G LTE chip like the Altair range for example, and use this in combination with a small wifi router and 1000mah lipo battery. put all this into a back sleeve for the phone and with a little bit of wonder, we have a portable 4G/LTE hotspot on your simple phone.


The dongle would operate separately from the phone, have it's own switch & usb port (for configuration), and it's own battery. If you wanted to take it off, it would be a simple snap of the phone's back cover. You could use an adapter like this one to connect the two devices & one SIM card.

"Why not get a 3G tablet?"

This would mean another sim card for me. I want to use my single sim card and use it's data allowance too. Two sim cards would mean two payments? I am aware that some phone networks are starting to issue subscribers with extra sim cards for their tablets, but it is at an extra significant (£10/$20 a month) cost. and I prefer Pay-As-You-Go, I'm not fond of monetary contracts. (Just a quick scan for UK 'phone + tablet' deals and I find that £37 per month *Measly 1GB data allowance, is the going rate. And that's a 2-YEAR CONTRACT! :( 
With my PAYG provider I can choose to pay £5-£12 for varying data. £12 = Unlimited data.)

If my PAYG provider offered me two sim cards at the price I pay now, then this might be a solution. But I do quite like the idea of having a portable 4G router to use or share with my friends.

So, with a little bit of motivation....

The closest I can find to this thought at the moment is the Nokia 515. However, it doesn't support 4G or allow wireless tethering/router, only wired tethering.



Saturday, 15 February 2014

Ghetto Real-time Carbon Monoxide Data Logger

*This article is of course the ramblings of a hobbyist and not to be taken as fact. You do these things at your own free will. Free will is a great thing mind you…
Something a little different. I feel I have been concentrating too much on my ghetto fpv quadcopter development, and need to do something a little bit different for a while. I have a multifuel/woodburning stove in my house and I’m very happy with it. It’s a huge Morso stove like this one:
5
It was bought new, and was fitted professionally, and it works flawlessly. For this privilege, it set me back several thousand pounds. I don’t need to worry if the stove is damaged, old, worn, or if the flue pipe is leaking, and various other possible scary possibilities.
Anyway, a friend of mine earlier this year, decided they too would like a wood burning stove for their house. My friend is well travelled, and has lived in some strange places, and tiny remote villages. It is fair to say that he lives a somewhat alternate lifestyle now, and believes in political conspiracy, and corporate state control. To him, everything is a lie :)

4
So, he decided he was going to build a woodburning stove. He bought a second-hand stove on ebay for just over £150 pounds (it’s an old 4kw stovax brunel 1a – rrp £1250). The stove looks old, worn, and needs a new baffle plate & fire bricks.
Anyway, he bought a chimney flue kit and smashed in his chimney to build his own fireplace, scaled his own roof, cleaned the chimney, and fitted the flue himself. Amazing! I thought. But mad. His stove cost him a total of about £600 to buy, fit the flue, and do the building work on the chimney. Mine cost me about £5000.
We talked about the legalities about building your own stove, and it seems, as long as you follow some general guidelines, you can indeed build your own stove without relying on a company to do it for you. No matter if a Gas company comes knocking at your door telling you otherwise (It is suggested by my friend, that it is in the interests of British Gas to try to prevent you from building a stove, and seeking out any problem they can to enable them to stop you, so you have to rely on using gas). But my friend has been out in the woods too long perhaps?
Anyway, he wasn’t completely irresponsible it seems, as he bought a couple of carbon monoxide alarms and fitted one on each floor of his house. 2
      3Which led us to an idea….
We looked at these alarms, and read their instructions. It seems that what they do, is detect certain carbon monoxide levels, for certain durations. They are more of a ‘life saving’ device, than a device used for data monitoring.  It seems that health & safety guidelines suggest that you should not be exposed to carbon monoxide for durations explained below:
1





















It seems that according to the alarms he bought, the instructions suggest that the alarm will trigger if exposed to a minimum of 30ppm of Carbon Monoxide for a period of 8-hours. So, you have to wait 8-hours for the alarm to even trigger for a low level. The alarms will only trigger immediately if levels of over 4000ppm are detected.

This worried my friend and me a little bit. What we were concerned with, was low-level poisoning and it’s effects. It seems low-level poisoning can damage brain function and repair, effectively contributing to a certain level of brain damage that might be not too dissimilar to excessive alcoholism and brain damage. This is what we concluded, after several strong pints of ale and some discussion.
What we wondered was how we could read low level ppm in real-time? Like on a graph?

The alarms he bought; one has an LCD display that, when the test button is pressed, will display the ppm reading. You also get a quick short blast of the alarm too, just for good measure. It seems that pressing the button every minute to record a ppm reading (with the added alarm sound blasting your ear) is a bit impractical. What we need is a device that can record ppm and log it every few seconds.
So, me, with my electronic skills, suggested I build something that does exactly that.

It seems, that in the Arduino prototyping platform, there is a range of common gas detecting sensors available which record anything from Methane (parp) & carbon dioxide; to smoke & carbon monoxide. These sensors come under the range of MQ(X) sensors. The X being a number 1-9 to the according sensor. You can read about them here.
They are available on ebay for a couple of quid. 1234
The MQ7 sensor that reads carbon monoxide in the range of 10-10000ppm can be connected to Arduino using only three of it’s four pins.
We can then write a program to read the sensor every, say 5 seconds and give us a ppm reading. Enough of these readings, and we can plot a graph to show how well the stove is working, if there is any damage to the stove, if there are any leaks, if someone opens a house door, if the fire is raging, or dying down. All these factors should affect low-level carbon monoxide readings in some way.

So, if we connected the MQ7 sensor to the Arduino Uno like in this diagram:
sensor-mq7-diagram

Then we upload this sketch to it >>>>> This Sketch
The sensor will print out ppm data every 5 seconds.
The code works like this:The sensor it seems, needs to heat up for at least three minutes to allow it to read data properly, so the sketch begins with the following text displayed in Serial Monitor: “Sensor Heating…” for 3 minutes until the sensor is hot enough. The Arduino then makes an initial sensor reading. This initial sensor reading is made at neutral ‘carbon monoxide free’ area – i.e. outside in the open air, or similar place. The arduino then makes another reading after 5 seconds have passed, then another after a further 5 seconds, and so on.
The arduino makes a calculation:
ppm reading = (5-second Sensor reading - Initial sensor reading) + 5
The ‘5’ value is used because it is assumed that a normal house will have a natural ppm reading of 2-5ppm.
It is also assumed that a house with a woodburning stove in it, will have a normal ppm reading of 7-15ppm depending on the type of stove, fuel burning used, ventilation etc.
Once we have the arduino set up and recording data, we can open the Serial Monitor and log data until we are happy:
22222
As you can see, in my office, the readings are a normal 5ppm on average. When my wood stove is on, the readings increased to between 7-10ppm.





I decided to take the arduino round to my friends house to sample some data:
666666
My friends stove readings were recorded over a 4-hour period. The readings went up to a high of 18ppm, and a low of 4ppm. During this period, doors were closed and opened – affecting projected room heat, and ventilation. When the door to the kitchen was opened, the reading would drop as there is a wall vent installed there.
The stove ppm would increase when the wood was burning fiercely, and the ppm reading would decrease as the fire died down to ashes -As you can see at the end of the data.
All very interesting!
In the future, I am going to repeat the sensor data recording, and use readings from the monoxide alarm that has an LCD as a comparison.
Also, in the future, I will blog a tutorial that will record the sensor data remotely over wireless Ethernet, and I will be able to view the graph in real-time using a web browser. Now this is an exciting idea.
In the mean time, feel free to have a play with the existing code, and try your own calibration experiments.

Listen to this too:


Data Logging Information:
The setup above is simple. You simply run the sketch, open Serial Monitor on your computer, collect the data, ctrl + A to select all data, ctrl + C to copy, then paste it into excel or wherever.

Saving the data to a file.
If you have a serial terminal program like CoolTerm on your computer, you can also capture to a file. To do so, open CoolTerm, and choose your serial port in the Options menu. Click the Connect icon, then from the Connection Menu, choose Capture to TextFile… and Start. Give your file a name and save.
Note: if you want the file to start from the beginning of your sketch, hold down the reset until you’ve started capture.
To stop capture, choose Connect > Capture to TextFile… > Stop. Then you can use your file in any application you want. Change the file extension to .csv and you can open it in a spreadsheet and graph as above.
Saving Data to a micro SD Card.
Sometimes you want to save data when you’re not connected to a personal computer. Attaching a micro SD card to an Arduino is fairly straightforward. There are several different shields that have SD cards on board, and the Arduino Ethernet has a micro SD card on the board. The SD card library makes it simple to save files to the SD card.

Insert a freshly formatted micro sd card into your Arduino Ethernet Shield. Attach the Ethernet Shield to the Arduino Uno, connect the MQ7 sensor to the three pins (5v, GND, A0), then upload the MQ7_SDCardDataLogger sketch. This sketch reads the MQ7 sensor, and if there is an SD card present and initialized, it saves the results to a file called “DATALOG.CSV”. Transfer this file to your computer and use it as you wish. You can open it in a spreadsheet and graph it as you did above, or anything else you wish. If you just want the raw data, and no text ("ppm" "sensor heating" etc) use this file. It will take a sensor reading from the moment the logger is switched on, every 1 second, which will show how as the sensor heats up, the value quickly drops then levels out:

You can use this to make your own calibration ideas, to obtain 'true' ppm values. 

Adding an LCD display & RTC Clock to this would pretty much make a complete device. Maybe I'll update this in the near future.
Saving Data online to Plotly.
If you have an Arduino ethernet shield, you can upload your data directly to Plotly in real-time. You may have heard buzzwords such as 'The Internet of Things' or 'Big Data' recently, and this is one example of this quest for finding new data about our lives. Anyway, Plotly will save your data, and allow you to make and format a graph style so that any data will be loaded into it automatically. It will even record the time that the reading was made (very handy to know without carrying a stopwatch or using a real-time-clock in your circuit). My tutorial is coming soon, but in the while we wait have a look at this tutorial so you can get to grips with using Plotly.
You can also extend the use of the Ethernet Shield with Plotly, by making it wireless. Devices like the TP-Link TL-WR702N, and this other even cheaper ebay device, can be set up as a wifi repeater, and it's Ethernet port connected directly to the Arduino. It makes this a very cheap wireless solution to send data to Plotly (considering the price of the official arduino wifi shield £80?!). You can even wirelessly tether the cheap ebay router with a mobile phone and use the 3g/4g signal, meaning you aren't even limited to house wifi connections. There are also some low-cost mini pocket routers which also connect with 3g usb dongles. There's some really neat possibilities for sensor-based data gathering. Want to collect emissions data on your local road? Or perhaps logging potential local fracking emissions? Have fun and if you think this is cool:

Thursday, 2 January 2014

Micro OSD

BenbojanglesOSD

So, I decided to build a micro-osd for my micro fpv quadcopter. It's still in progress, but if you are interested in this project and would like to add you inputs then please visit this page: http://benbojanglesosd.blogspot.co.uk/


Friday, 6 September 2013

Ghetto fpv Goggles

Ok so for the first time, this isn't one of my own posts. However, it is possible to make your own ghetto fpv goggles to enable you to have a more immersive flying experience, and also look like a dimwit at the same time ;)

Here's the guide: http://youtu.be/2H_PvU82o7A


And if you're happy to buy a cheap kit version. Look here: http://www.flyingwings.co.uk/index.php?route=product/product&path=57_76&product_id=382


:) :) :)


Thursday, 29 August 2013

Ghetto fpv quadcopter: episode 2



Ok, so in my previous blog post, I wrote a fairly comprehensive instruction on how to build a ghetto fpv quadcopter for around £115. It works well. However, just this week I was given a camera module MC495a

I decided to test it and see how it works. 
Connecting the mc495a to our 200mw tx is fairly straight forward. Desolder the simple usb wire from the tx's video out, snip off the connector attached to the rca a/v adapter cable included with the camera, and solder that on to each of the 4 connections on the tx - video, audio, power, ground. Not forgetting the diode at the power. Done. Now, you just plug the camera into that new 4-pin connector. I sealed the exposed back of the camera using tape.


mounting the camera and tx I tried a different approach than the top-mounted 808 #16 camera, as I have thought about the damage to the cloverleaf antenna I have had to repair often, using this method. I opted for a tail-like antenna mounted out the rear of the quadcopter using a simple 'bag-pouch' made from anti-static plastic bag material and a small ziptie. The front, I screw mounted the camera to the front of the quad frame (the screw was a silver screw from the case of the 808 #16 camera).
Simples...

Using an rca-to-3.5mm plug pigtail cable, connected to the rca audio plugs on the rc305 output, I am able to get audio aswell as video on my controller, using a cheap speaker: like this.

I like the camera, as it is lighter and seems more robust than an uncased 808 #16 camera. It seems like the picture quality, and response time is better too.

Downside is that it isn't recording 720p vdeo to sd card. However they can be swopped over if needed, or I may try a WLtoys v262 in the future, of something that can lift both fpv setup & 808 #16 cam (possibly with a cheap gimbal rig...watch this space)

I am recording this fpv camera using a cheap easycap dongle on a laptop, using virtualdub software. Works for me.

One problem I am having, is that I have learned to fly fpv by aiming to have on my monitor screen, half sky, half ground. And as such, as the sky is often naturally brighter than the ground, the camera adjusts for light, and makes the ground dark, shadowy, almost un-viewable. As the camera doesn't seem to have any way to adjust light exposure control, I am wondering what your solutions are?

I am thinking:
-Learn to fly with the camera pointing 90-100% ground, when level flying. (Could be risky monitoring level flight)
-stick some kind of graduated filter over the lens, so that the sky is dimmed, causing the ground to be lightened. I'm aware of photography-related graduated filters, but not tiny lens graduated filters. Anyone have experience with this idea?

How do you adjust/mount your fpv camera to get the best light exposure setting?????