Tuesday, April 2, 2013

And this weeks winner for cloud storage is...

I work behind a corporate firewall.  It is amazingly good at filtering out cloud storage solutions functionality. Like I mean they do not work at all.

I was using my fave DropBox for a long time - but a recent "upgrade" to the firewall broke that.

Google drive has always worked. Unfortunately it doesn't give me the organization (folders) I need to keep things straight.

When Cubby came out I liked it instantly, since it allowed you to set any folder in the filesystem as a cubby.  So I could make the project folder for Visual Studio a cubby as well as the Eclipse workspace.  Both rather inconveniently buried in the obscure paths in the filesystem.

I originally used the cloud storage solutions to store my arduino code.  I stored the Arduino program and all the code/libraries on DropBox. So whatever computer I was using had a recent copy.  It just took a tweak to change the default place Arduino wanted to store the .PDE and .INO files.

The problem was cubby didn't pierce the firewall at first. That is until I found out yesterday that it allowed creating network shares using WEBDAV.

There are other things I like about Cubby. like computer to computer direct transfer. Plus you can set it up so it doesn't always sync a particular folder(cubby) so you can get the files only if you want to, but not saddled with them appearing on all computers.

I just wish Cubby allowed multiple file up/downloads through its web interface.

I haven't figured out if I am going to have to find a sync program to copy the local folders into this new share - or set up Cubby somehow to run from/point to the webdav share - which by the way shows up as a new drive.  Stay tuned - film at 11:00

If you want to try cubby - use this link - I get a gig more storage if you do . Thank you

Friday, March 29, 2013

COSM .NET SQLSERVER and memory

I have an Arduino outside sending in time,temp,humidity, and tips of the rain gauge   The inside receiver has a barometer so it reports pressure and inside temp. That being said - it was a pain to keep track of all this.

I cobbled together a C# app to read the serial port and update COSM with the stats.  I like the little lines going up and down with the weather. I especially likeed the big dip as Sandy went by.

The C# desktop app was getting way to cumbersome as any DIY project - lots of text boxes and  a cluttered interface.  I was reading a question in Stackoverflow and had an ephiny  moment when the answer was to split the application into two pieces, the Logger, and a display - web or windows.  The middle piece that allowed this was a local SQL database.  So I killed off the old program and started from scratch.

A console app gets  the serial and logs it to a localdb table Then a windows app queries the database for the most current stats.  It allowed me with just a few queries to get the rain fall in the last 24 hours and high  and low temperatures for the same period.  I was having quite a bit of fun tweaking the console app to dump various weather stats.

The Downside of all this is the PC running is an ancient dual core athalon, When I bought it it had xp, in the mean time I migrated to WIN7 and then the fun started, with only the original 2 gigs of memory when I introduced sql server into the mix the system ground to almost unusability   Trying to get the console app to start (even compiled) took longer than the timeout on the query so it would error out, crash city.

I was astonished how much memory for this old box and its 184 pin DDR memory cost - For what 2 gigs cost I could get 8 gigs of DDR3 memory.  The cost of a decent machine was not in the budget so I bit the bullet and got 2 gigs to make 4 gigs on the machine.

Now I was in hog heaven - everything ran swimmingly even with tons of chrome tabs open and I went to bed and slept like a baby.

When I went to the machine this morning it was back to its old self and I  as more than a little miffed. I found the culprit soon after I opened task manager - Sql Server was using 1.9 gig of memory!!!  I know Databases like a lot of memory but this was a little excessive, in my mind.  Just to run a small table and a handful of queries.   Goggled a few Sql Server articles and that led me to the configuration item where the max memory usage could be set. Not being the least bit concerned about performance I throttled it down to 500 meg.

Now it seems like things have settled down and I am using a machine that has a modicum of performance again.

Now its back to making DLLs for COSM and Thingspeak, and polishing the code.

NOTE: in reality I am a software person, I only get enough hardware to let the IDE of the moment work.  I am definitely looking forward to my Raspberry Pi and all  the fun that is going to be.


Sunday, February 10, 2013

Battery Holders, Chargers, home brew gizmos.

Commercial Protected battery holder

The one thing that I thought I needed is a protected battery holder, since the batteries have  no protection circuit built in.  Plus some sort of keyed connector - when I got these on eBay, they came with the JST connectors sets - maybe it was a mistake since the listing doesn't mention it in the listing, but a welcome surprise.

Firecracker Battery holder


My first take at a battery holder. Kind of looks like a firecracker, doesn't it? Just took the battery and wandered around the local home supply store and tried different things. I love PVC, I found these gizmos that press fit onto the battery.  I scavenged some springs from an AA battery holder - drilled a hole in the end and ran the wire through.  Voila - dangerous, but serviceable. Made sure that it had all kinds of markings identifying which end is which. This plus a protector board, a JST connector will find its way outside to the weather transmitter.



The KahnFire Charger setup


The protection board in the circuit



And the charger


Added a trimmer to dial in the current for different batteries.  It's almost set to a short to get the 800 ma to charge the 18650s



A 18650 battery Charging fool

Fire Resistant Charge station
I have been having a seriously geeky good time the last week or so.  I have been filling my brain with everything Li-Ion and 18650 batteries in particular while waiting for the little pieces parts to show up.

Adafruit in their fantastic efficiency got me the charger in just a few days.  But it took a little longer for the "protected" battery holders to show up from China.  Two holders and two surprise sets of jst connectors had me down in the shop melting solder in minutes.

Since I trusted the Adafruit charger it got hooked up first. I think it was a mistake getting a 9v power pack for the charger - when charging the little  chip  gets quite warm to the touch.  The datasheet says the chip is thermally protected and will throttle back on the charging current if it needs to, not what you really want from a charger.  So I will dig around in the old phone charger box for the highest current 5v mini plug converter, less voltage, less heat.  Actually I do not care how long it takes to charge one of these  - I just sit next to the "fire resistant charging station" until the light blinks - about an evenings TV viewing.

It seems that most people use these cells to power flashlights.  Some of these flashlights have Cree LED and are driven at one amp plus constant current buck/boost switchers.  So having a 2200 mah battery for the hour or two run time you will need for this makes sense   However, even though I got a flashlight just to see what it is all about, I will be hooking these up to Arduinos and such which draw milliamps - I suspect that the batters will suffice me for a very long time - even if they are well past their useful life for high power applications.

Comment about Battery safety.  The charging part of the process is the most "dangerous".  I have read all the articles I could find about exploding Lithium batteries.  All of them I find are forced in some way, gimiked cells to cause an unstable situation, direct connection to a 12v car battery to an unprotected pack. These are unusual occurrences.

The thing that simply astonishes me is that people take batteries that have about the energy density of dynamite, that have elaborate safety mechanisms designed to outgas safely if some thing untoward happens.  Then they seal it up in a machined high strength aluminum tube without any safety overpressure blow out ports.  This is how to make a pipe bomb - not something that will take the abuse that a flashlight will over time.  When/if something happens - I will not be surprised, sorrowful and with heartfelt pity, but not surprised.

 I an good with the safety built into the cells, and the protection circuits I purchased, I can't make it any safer.  These batteries are safe if you don't go around poking them with sharp things or running over them, or something juvenile like shorting them out to just to see what happens, or putting them in high flying aircraft .  A little red and black magic marker to make sure I know which end is which, helps a bunch.

So I will use the same care I use with line level circuits / lasers/ gasoline / echant /  hypergolic concoctions.  I will pay attention to what I am doing, and never hurry. Nothing is so important that it can't wait until you are wider awake,  less stressed.......



More interesting details in next post

Saturday, January 26, 2013

Busting open a Laptop Battery Pack

There are lots of posts about people doing the hackgeneer thing - taking things apart- this is mine.


Walking past the recycle bin at work I spied a laptop battery pack. Needing rechargeable cells for various outside Arduino projects I filched it.  After all, it is a recycle bin - and I am going to recycle it...

pack with its top off.













I always wanted to know what was in one of these.  Suffice it to say - it was quite satisfying getting at the innards of the pack - involving ripping, cutting, and general plastic destructing mayhem.  I was cognizant that shorting unprotected LIon cells can be exciting - So  I did this on a non flammable base (Correll dinner plate - don't tell the wife - please)
View of all the pieces
view of pack and its controller board.
What I discovered is a 6 cell pack with 3 sets of parallel batteries in series - Marked with SE US18650.  I had suspected that the pack contained 185650 cells- should give about 10 volts fully charged.
 I was astonished how big these things are.  I expected them to be a little bigger than an AA battery, but these things are HUGE in comparison..


I tested the voltage of the 3 packs - and they had relatively normal voltages on them. I suspect that their capacity has been reduced to the point that they won't run a Laptop for long enough - but should be stellar for supplying a few dozen milliamps to an Arduino - for quite a long time.

I just have to track down some protection boards to keep them safely contained.  Seems that everyone has them for a couple of dollars or so.

Now that I have a few - i am looking around the net for how to use then.
See here
gota see this xkcd: http://xkcd.com/651/
NOTE: in the interest of safety - Mistreating Li-Po batteries are Dangerous 

Stay tuned ...






Sunday, November 25, 2012

Frustration

I am frustrated.  About a lot of things - but mostly about my inability to get the nrf24l01 radio and any Ethernet adapter to coexist on an Arduino. I have three Ethernet shields - a very old one from Adafruit, one of the latest Arduino versions, and a ENC28J60 Chinese module I got off eBay.

I use the rf24 library and it is wonderful for talking to the radio and it makes things quite simple, and rock solid.  There are various Ethernet libraries for the ENC28J60 - and it seems that I have tried them all.

When I use either Ethernet or the RF24 separately  it works. But trying to combine it into the same sketch either it won't start, or something collides in the software libraries and I strange behavior, but no connectivity.

They both use SPI and the I am lead to believe that using the CS (Chip select) to turn one chip off allows the other to take over and use the SPI *bus*. But since I am using libraries i do not quite know if they are behaving normally and releasing their chip select each time.

My goal, which seems simple and straight forward enough, is to take readings from various sensors inside and outside and send them off to ThinkSpeak, COSM, WeatherUnderground.  I have a small C# app I run on the desktop, but that means I have to leave the computer on 24/7 and burning up all that power. Plus the C# app interferes with some of the other things I do on the desktop and consumes a lot of resources besides.  I seem to be killing the app often to read the mail or whatever and forgetting to turn it back on.

So all I need is a standalone Arduino sketch to send the data in.  So far no luck.  I have goggled to try and find someone else that has managed this task, but no one seems to have done it, or is not publishing how they did. Clos4est I got was a post Fixing an enc28J60 based Arduino Mega ethertnet shield 

I will  be trying this hack out - but there is precious little detail.   Wish me luck.


Tuesday, November 13, 2012