Monday, 16 September 2013

Sony Action Cam Survives Flood

Got to the seabed at 30m ( 98ft) and tried to turn on my camera and nothing, water sloshing around inside, flooded.

This is with the newer underwater case like this...




With the double video light set-up I had just clipped it to a chest D-ring and an extendable lanyard, it was not in the bag on my belt ( stowed away) and I suspect when we did a roll-off the back, it must have hit something to loosen the front door.

Anyway, at depth I wrote it off and continued the dive.

Once back on the boat, I immediately removed the battery and drained the salt water, filling the case up with mineral water, closing up the case again, giving it a good shake. I did this several times on the boat until I got back to the hotel where i again rinsed it under a tap and left it underwater for an hour to get any remaining salt out. After that, it was drain and leave to dry ( room temperature ). Once home it went into the cupboard with the heater for another 2 days before attempting a power-up and test.

Took the memory card out and inserted a new battery, powered up and it made the right noises. Menu works without the memory card but the Wifi-remote does not. Re-inserted the memory card after checking it on a PC ( in an adpater) that the card was ok and could record no problems including sound.

Noticed the PREV button is not working and the date stamp on all files copied across is 01-01-12 (UK). Just need to reset the time back again.

I think I can live without the PREV button as you can just press NEXT to go round the options.

Next test is to get wet and try the case on its own but looking ok.

I don't think this resurrection is too uncommon as a friends Go-Pro 3 had a similar problem, his only failure was the lcd screen on the back...

The battery that flooded looks a goner. (Correct)...

Whilst looking on the web for a solution I found a Youtube video of a guy dissembling the Action Cam to correct a rattle, I don't have a rattle but this gave me the info to look at PREV button issue...

The two small screws next to the USB port secures the electronics to the case, undo these and you can slide out the camera itself from the case: Take off the USB cover and the facia plate.







Note the corrosion on the screws.
Small battery on the bottom right for the RTC?

Not related to the flooding but noticed this rusting on the tripod mound on the base of the housing....Thread is still ok but greased it up anyway to limit the rust.



Update : PREV button is now working, not sure why!











Friday, 6 September 2013

Measure Torch burn time and compare outputs with an Arduino Uno and bh1750fvi-e.pdf ( lux meter)

I was curious as to how long my batteries were lasting in my torches. I tried turning them on and watching to see when they dimmed/turned off, mostly I missed the inevitable end.... Also trying to gauge power output was proving problematic, they all look very similar. So, something a little more scientific was required.

I thought the answer was a bh1750fvi-e sensor which is a calibrated light sensor readily available and easily interfaced to. In fact all the code/circuit was already on the internet, just needed a small tweak to add a timestamp and capture to file.

The principle is :

1) An Arduino Uno has a bh1750fvi-e sensor connected to it via the I2C bus.
2) The Uno reads the sensor every 1 second and outputs to a connected PC a timestamped value.
3) The Pc captures the Uno's output in MS HyperTerminal, to a file.
4) Load the file in MS Excel and graph it.

An example is shown below, from a Ultrafire G2-t60 torch with a fully charged 18650 3.7V 2500ma Trustfire battery loaded. Its draws about 2.2A at the tailcap. Distance from Torch to Sensor, approx 20cm..

Looks like only a 50 minute burn time.




The graph shows Lux, Foot-Candles and Wattsm2.

I had hoped to measure Lumens but that is a completely different measurement, google it, its not trivial... So the magnitude of the graph is sort of irrelevant in the graph unless you want to compare power outputs between multiple torches.

Lux is the only value returned from the sensor, the other two were included in the code I found on the internet and derived from the Lux value, might loose them.

The torch was about 20cm from the sensor, the further away you move it the values go down. I suspect this was too close and the initial values of the torch at full power are maxing out the sensor. To compare torches, i'll experiment with greater distances, if this is a 800-900 lumen torch then to provide some future proofing in comparisons with more powerful torches i'll try increasing the distance to 1m.

Parts:

Arduino Uno because I had one..
PC for connecting to the Uno for programming and recording the values ( USB).
BH1750FVI Digital Light intensity Sensor Module for Arduino, like this from ebay..














Datasheet for sensor...

www.rohm.com/products/databook/sensor/pdf/bh1750fvi-e.pdf

I used a breadboard to prototype it up...

And test like this:



Circuit is only 4 wires to support the sensor's power requirements and the I2C interface. Its listed in the programme below.

/*
 #######################################################
 Arduino Light Meter

 #######################################################

 BH1750 sensor module connections:
 -------------------------------------
 BH1750                        Arduino
 VCC      --------------->     5V
 SCL      --------------->     Analog pin 5 (A5)
 SDA      --------------->     Analog pin 4 (A4)
 ADD      --------------->     Leave it open
 GND      --------------->     GND
 #######################################################

 */


#include "Wire.h" 
#include "math.h"

// macros from DateTime.h 
/* Useful Constants */
#define SECS_PER_MIN  (60UL)
#define SECS_PER_HOUR (3600UL)
#define SECS_PER_DAY  (SECS_PER_HOUR * 24L)

/* Useful Macros for getting elapsed time */
#define numberOfSeconds(_time_) (_time_ % SECS_PER_MIN)  
#define numberOfMinutes(_time_) ((_time_ / SECS_PER_MIN) % SECS_PER_MIN) 
#define numberOfHours(_time_) (( _time_% SECS_PER_DAY) / SECS_PER_HOUR)
#define elapsedDays(_time_) ( _time_ / SECS_PER_DAY)  


int BH1750_Device = 0x23; // I2C address for light sensor
int iCheck = 0;  // iCheck = 0 for Lux, iCheck = 1 for Foot-Candles
unsigned int Lux, Scaled_FtCd;
float FtCd, Wattsm2;

void setup()
{
  Wire.begin();
  Serial.begin(9600);
  Configure_BH1750();
  delay(300);

  Serial.println("Time,  [lx],  [FC] , [Watts/m^2]");
}

void loop()
{

  Lux = BH1750_Read();
  FtCd = Lux/10.764;  /*Foot Candle*/
  Wattsm2 = Lux/683.0;

  time(millis() / 1000);
  
  Serial.print (",");  
  
  Serial.print(Lux,DEC);     

  Serial.print (",");

  Serial.print(FtCd,2);     

  Serial.print (",");

  Serial.println(Wattsm2,4);     

  delay(1000);
}

unsigned int BH1750_Read() //
{
  unsigned int i=0;
  Wire.beginTransmission(BH1750_Device);
  Wire.requestFrom(BH1750_Device, 2);
  while(Wire.available()) //
  {
    i <<=8;            //Highbyte/Lowbyte read
    i|= Wire.read();  
  }
  Wire.endTransmission();  
  return i/1.2;  // Convert to Lux as per datasheet..
}

void Configure_BH1750() 
{
  Wire.beginTransmission(BH1750_Device);
  Wire.write(0x10);      // Set resolution to 1 Lux / continous H-Res mode
  Wire.endTransmission();
}

void time(long val){  
 int days = elapsedDays(val);
 int hours = numberOfHours(val);
 int minutes = numberOfMinutes(val);
 int seconds = numberOfSeconds(val);

 char time_c[13];

 sprintf(time_c,"%02d:%02d:%02d" , hours, minutes, seconds); 
    
 Serial.print(time_c);
}


When you run the programme from within Arduino IDE you can verify the output using the Serial monitor in the Tools menu. I thought there was a way of capturing it direct from there but couldn't find it, so i opted to use the old terminal emulator supplied with Windows ( Hyper Terminal under Programs/Communications).

First of all exit the Arduino IDE to free up the USB port and then run up Hyper Terminal.
Create a new connection which is:-
Connects using the COM port used by Arduino IDE ( mine was COM8 for the USB port).
Bit Speed = 9600

Enable capture to file using the Transfer menu option "Capture Text"

To capture text with the headings from the Uno's output, Call the device to reset the Uno and get it to start logging from 00:00:00 and output the headings. You can Call / Disconnect the Uno to reset its output anytime.

I left the torch on overnight, stopped the capture the next morning, loading into MS Excel as a CSV file and graphed it. The first row in the file contains the series names.

Not so plain sailing...

I tried again with the same torch ( Ultrafire G2-t60) and a premium Xtar 3.7v 2600 to see if that made any difference to the run time....

Started it off and after 30mins noticed a nice warm plastic smell, it was running so hot it was burning the plastic surface it was resting on ! I had to let it cool down and repeat the process, making the excel graphing a nightmare.. ( with the current timestamp). But it ended up like this:-

Let it cool down !

Final Run.


Total Runtime at max power ish... = 55mins, it was beginning to drop off but I can't imagine it would be noticeable. Looks like the Xtar battery was only slightly better that the Dealxtreme Trustfire battery.

Next steps:-

Reduce the frequency from every 1s reading to say 5s to reduce the number of rows.
Try 1m distance between sensor and torch to be able to compare torches of wider Lumen output.
Heat management, work on a heat dissipation method.
Review the timestamp format to make Excel work easier and stopping/starting.
Waterproof sensor, so I can measure dive torch run times.
Gather some more data with different torches/LEDs/Battery to work on the comparisons.

Update:

Created a waterproof version so I can measure dive torches burn time and not worry about overheating...

Placed the sensor in an acrylic tube and used a rubber bung to block if off. The tube was an offcut from my dive torch project Here



I shortened the bung so the sensor could sit as far down the tube as possible, as the torch is resting on the bottom of my bucket and the beam is quite low.


I used the waste from the bung to make a wedge to keep the sensor in place.

Then place the torch and the sensor in a bucket of tap water, pointing the torch at the sensor.



The wire is 4 core alarm cable but could be anything, length is about 1m back to the Arduino Uno board.

Now I can run the torch without worrying about heat, in one test, I ran the torch for 2hrs and it was barely warm.



In testing the triple XML light ( link here .light. ) I've noticed that the circuit/program doesn't detect the flickering you sometimes get when the battery is going too low to drive the LED... Pro






















Sunday, 1 September 2013

Underwater Video Light - Dual light for Sony Action Cam

After the success of my single video light ( with reflector removed) I modded another identical light to fix a number of issues I discovered i.e. a small shadow in the top right corner and add a little more power..

So, I've added an identical light to the other side and moved the lights further closer to the camera itself by attaching them further up the handle.


The second light was modified in a similar way to the first, only the shape of the metal plate is different... rather a square rather than a strip in the first. Still jammed in rather than fixed in any way.




Used the same clip as before, using a bit of inner tube to provide a little extra friction, underwater I found the lights moving when I turned them on/off. From ebay :

EPDM Rubber Lined P Clips Hose Pipe Clamp Cable Wiring Metal & Stainless Mikalor, 27mm pipe fitting.


Going diving next week and will post the results...

Update : Made a slight mistake in diving with the camera set to slow mo which ruined my videos, slow mode underwater is not a good idea.. The camera also flooded on day #2 so i didn't get much shooting done. Did get this clip with the dual light though :-


Update: Another version of this set-up...