Author Topic: Something new  (Read 1306 times)

0 Members and 1 Guest are viewing this topic.

frackers

  • Sr. Member
  • ****
  • Posts: 435
  • Country: nz
  • Picard spits "Hello"
Something new
« on: December 08, 2008, 11:00:07 AM »
The latest project is now coming along nicely.


A colleague at work designs lithium/nicad/Nimh battery pack chargers and he pointed out a very useful chip from Dallas (now Maxim). Its a Battery Monitor type DS2438 and is a part of the 1-wire family of devices some of you may be familiar with from a couple of weather stations that use these chips.


Two problems - getting 1-wire communications to the chip and bridging the 100m gap between the battery bank and the house where I could see what is going on.


Both problems solved with a Linksys wireless router that is available with GPL Linux software which is not only available for free but the complete development environment is also available so (if you have the necessary skills) you can write your own software. The model is the WRT54GL and they can be had for about US$60 so not going to break the bank!


So how does this solve both problems? The 100m is no problem for wifi with a decent aerial and the 1-wire problem just requires the addition of a converter board on the hidden serial port of the router. Hidden because its a set of pads on the PCB that requires a connector soldering in and then just plug in the add-on which contains another Dallas chip that converts serial (uart) comms to 1-wire  - a DS2480B chip.


So all this effort gives me what exactly? I can use an external shunt to measure current in/out of the battery bank 30 times a second and accumulate the total state of charge within the monitor chip. I can add two resistors and measure the voltage to within 30mV on my 24 volt bank up to 100 times a second (not that you can read the chip this fast!!) and I can measure the temperature of the battery enclosure. If that is not enough is can accumulate the total charge in and out of the battery over its lifetime.


So far, all the individual parts are working, these being:

 * 12volt switch mode regulator to power the router from the battery bank

 * 5 volt regulator from the 12volt supply to power the 1-wire chips

 * a redundant prototype PCB out of a battery pack with the monitor chip on it

 * PCB with the serial to 1-wire converter on it

 * software loaded onto the router to drive the 1-wire system and read the monitor chip


Since my mill is down awaiting a new tower, I expect to fire it up on the battery bank tomorrow with the mains charger I'm using to keep the bank topped off.


Watch this space for pictures, schematics, PCB layouts and software.

« Last Edit: December 08, 2008, 11:00:07 AM by (unknown) »
Robin Down Under (Or Are You Up Over)

tecker

  • SuperHero Member
  • ******
  • Posts: 2183
Re: Something new
« Reply #1 on: December 08, 2008, 07:19:53 AM »
  Nice and good working setup .The Linksys is gem in that reguard i just uploaded all the one wire pgfs and am checking they out.
« Last Edit: December 08, 2008, 07:19:53 AM by tecker »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Something new
« Reply #2 on: December 08, 2008, 04:19:08 PM »
Nice solution, frackers.


Been looking at the Linksys platform also to use as ISM band data collector. Adding Weather station and remote power meter to the mix. Use the router to display a web page of the data. Remotely using 433Mhz \ 900Mhz \ 2.4Ghz ISM band transmitters.


For others that need a lower power system consider:


RF Wireless Radio Superheterodyne Receiver Module RM1SH

http://cgi.ebay.com/RF-Wireless-Radio-Superheterodyne-Receiver-Module-RM1SH_W0QQitemZ300277360310QQc
mdZViewItemQQptZGarage_Doors_Openers?hash=item300277360310&_trksid=p3286.c0.m14&_trkparms=66
%3A2%7C65%3A15%7C39%3A1%7C240%3A1318


Transmitters and receivers are available. Range is 100ft (depends on antenna etc.)

Have not used modules from above link, $9 is hard to beat. Better receivers with -120dbm sensitivity cost more, with much better range, good antenna can fix things. 900Mhz and 2.4Ghz ISM bands are another option.


Very low power remote data collection system sends data to PC serial port.

USA uses 433Mhz typically for a Keyfob / Garage door openers. Technically there are limits on how much and how frequently data can be sent. Very remote locations nobody will notice. City beware. Sending too much data can keep near by keyfobs and garage door openers from working, people will notice. 900Mhz does not have this limit.


Have fun,

Scott.

« Last Edit: December 08, 2008, 04:19:08 PM by scottsAI »

frackers

  • Sr. Member
  • ****
  • Posts: 435
  • Country: nz
  • Picard spits "Hello"
Re: Something new
« Reply #3 on: December 08, 2008, 05:29:34 PM »
My current weather station uses a 433MHz link back to the main unit in the house and it suffers interference from many sources as it uses the unlicensed low power options (I assume the US is the same as here). I regularly get blanks in my records.


Since the Linksys router has 2 serial ports available inside it, I'll be using the second to directly connect to the weather station and have a more reliable link back to the house and still have one for the 1-wire interface.


I've measured the current draw on the router, one of the reasons I am using a switch mode module to drop from the 24volts battery bank is that the input current is only 150mA to the regulator - not an issue with a 450amp/hr bank!!


Another reason for the router is that it is intelligent enough to run on its own rather than as just a data collection peripheral. It runs a 200MHz embedded Broadcom mips CPU with 4M of flash, half of which is free and 16M of RAM of which only a couple of megs is used. This gives space for quite a large amount of data storage or data processing. The sample application I've build to read the Battery Monitor chip is all of 45k so I have plenty of space to add new functionality :-)


The other motive is that I'll use the same basic design for an irrigation controller using members of the 1-wire chip family and the OWFS project supports pretty most all of them. The wind turbine and its loads will of course eventually be controlled from the router (maybe by using data from the weather station?) as the adding of extra modules onto the 1-wire system is as simple as plugging them in - the software already knows how to identify them and control them.


Cheers

« Last Edit: December 08, 2008, 05:29:34 PM by frackers »
Robin Down Under (Or Are You Up Over)

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Something new
« Reply #4 on: December 09, 2008, 12:09:21 AM »
Frackers,

We are in agreement.

The router uses just under 1% of your battery pack per day. Well within reason.

For the reasons you stated is also why I think it would make a great data collector. Sounds like your doing what I am planning.


My original plan was the other stuff, smaller systems might not like the 93.6whr/day. Then realized could use the router to collect data with PC off, do weather updates etc. so overall less power.


My Weather station uses 433Mhz. Take a look at directional antennas for the base (to keep legal). Lots of problems can be fixed with the right antenna. Extended a Keyfobs range to 1000ft by using the right antennas (both ends). Search: Cell phone antenna or WiFi, use formulas to make one for 433Mhz, all works the same. Friend added a reflector to his base, data dropouts stopped.


Have fun,

Scott.

« Last Edit: December 09, 2008, 12:09:21 AM by scottsAI »

independent

  • Full Member
  • ***
  • Posts: 132
Re: Something new
« Reply #5 on: December 11, 2008, 10:51:44 PM »
you can power those wrt54gl routers directly off a 12v battery system. they have converter inside that will run off up to 15 or 16v directly or up to 50v with a capacitor swap out. those voltages are from memory so consult google for confirmation
« Last Edit: December 11, 2008, 10:51:44 PM by independent »

frackers

  • Sr. Member
  • ****
  • Posts: 435
  • Country: nz
  • Picard spits "Hello"
Re: Something new
« Reply #6 on: December 18, 2008, 04:48:48 AM »
As promised, a few piccies.


Starting off with the PCB that holds the 1-wire master chip. This connects to the serial port inside the WRT54GL router via a couple of opto isolators. These ensure that I don't get any nasty earth currents powering the router off the same supply as has the current shunt in it!!


The UART to 1-wire chip is the surface mount device I've put on an 8 pin header for the prototype - my eyesight isn't very good with SMT and neither are my PCB etching skills.



The PCB is mounted upside down in the router by plugging it into a 5x2 'Berg' connector that is soldered into the blank holes in the router PCB just behind the set you can see in the picture.



A cutout in the front panel allows access to the RJ11 socket (1-wire devices seem to use either RJ11 6 pin or RJ45 8 pin connectors - I guess because they are cheap!!)



Where I work we make a lot of lithium battery packs which incorporate a 1-wire battery monitor chip. A few prototype boards were redirected from the recycling bin to a good cause (me!!). Another SMT problem solved.



More recycling and a few cuts with a hacksaw provided the 12 volt supply for the router and the 5 volt supply for the 1-wire chips assembled with some hot melt glue. The original shunt resistor has been replaced with a couple of back-to-back protection diodes and the 50amp shunt is external to the box.



Its all ready to go into a (recycled) box along with the digital LED panel meter I made up so I can read volts and current at the mill as well as at the house via the WIFI link from the router.


Next job will be to add a DS2408 GPIO chip to control the dump load.

« Last Edit: December 18, 2008, 04:48:48 AM by frackers »
Robin Down Under (Or Are You Up Over)