News:

we are back up and running again!

Main Menu

One-wire DS2450 anyone ???

Started by Jens, December 31, 2009, 05:02:48 PM

Previous topic - Next topic

Jens

My apologies in advance as this is WAY WAY off topic and a really long shot ....

As you guys know, my method of data gathering and controlling Thumper is based on the Dallas one-wire technology. This has been quite successful but I am now stuck on a rather big hurdle.
The most important device, a Dallas DS2450 based quad A/D converter is not playing ball. The command sequence is fairly involved and I am obviously screwing it up someplace.

If anybody happens to have experience on this chip I would love to hear from you off list (because it is really way off topic).

In my setup, I have a Cubloc controller talking via serial port to a Link45 device (which acts as the one-wire controller).

The DS2450 is important to me because not only is it an a/d converter but any one of the 4 ports can be used to activate a relay which means I can both control a load and do some data gathering at the same time. As an example, one DS2450 based device will be used to collect RPM data and there will be three output relays to control fuel type (Diesel/veg oil/ none) as well as run status (run/stop). A second device will be used for other operational bits including starter relay operation.

Any help would be greatly appreciated!

Jens

Crumpite

Jens,

I remember back many years ago when I was involved the the one-wire weather station that the DS2450 had "quirks" - stuff not mentioned in the data sheets.

I can only give you this link:

http://owfs.org/

They do mention a few quirks in the documentation.
The one-wire devices had a bit of a reputation when it came to the differences between the data-sheet said and what worked.
They do work pretty well once you figure out how to use them.
You might try interfacing one to a simple PC master program and try interrogating the unit where you can see the exact reply's.
(if you aren't already doing that... that's how we worked out the problems back then...)

Likely this won't help a bit, sorry.  :(
Daryl

mobile_bob

i am left in awe of you guys that work with this controller stuff, your understanding of the various components never
ceases to amaze me.

i got maybe a dozen different command lines down, that i understand which provides me with enormous possibilities,
i can't imagine being smart enough to do half the stuff you guys do in your sleep.

still amazes me what i can get done with the dozen of so commands i understand and use, so yes i will likely have to use
them in strange ways to get the job done.

i can't for the life of me understand how a one wire sensor works,  maybe it qualifies as something i don't need to know?
maybe its enough for me to know it works for somebody?

hats off to folks like you Jens, you guys are one determined bunch to say the least.

where do you guys find room in your cranium to learn all the stuff?  my filing system is so cobbled that if i were to try to stuff
more in, 10 times as much will fall out the the back of the drawer.

:)

Jens, if you get some time, you might explain how these one wire wonders work, i for one would like to know!

bob g

BruceM

#3
Wikipedia has a good summary on Dallas's one wire system.  It's a proprietary (Dallas), two wire, half duplex bus, with alleged range of 100M.  The signal wire is normally pulled high, so small power devices can get power from it, storing it in a small capacitor. Some one wire devices can do 16Kbaud without too much latency. Some devices are very slow, and tie up a lot of processor time waiting for them.  

So think of a proprietary two wire bus, much, much slower than I2C, half duplex (talk or listen but not both), but capable of longer distances.

I'm sure there are some applications where one wire really shines, I just haven't seen it yet for my micro controller projects.

Jens- I'd suggest looking for some help via your processor vendor's support site.  Doesn't Cubloc use an AVR chip? 
Bruce M




Crumpite

Quote from: mobile_bob on December 31, 2009, 08:39:54 PM
i am left in awe of you guys that work with this controller stuff, your understanding of the various components never
ceases to amaze me.

i got maybe a dozen different command lines down, that i understand which provides me with enormous possibilities,
i can't imagine being smart enough to do half the stuff you guys do in your sleep.

still amazes me what i can get done with the dozen of so commands i understand and use, so yes i will likely have to use
them in strange ways to get the job done.

i can't for the life of me understand how a one wire sensor works,  maybe it qualifies as something i don't need to know?
maybe its enough for me to know it works for somebody?

hats off to folks like you Jens, you guys are one determined bunch to say the least.

where do you guys find room in your cranium to learn all the stuff?  my filing system is so cobbled that if i were to try to stuff
more in, 10 times as much will fall out the the back of the drawer.

:)

Jens, if you get some time, you might explain how these one wire wonders work, i for one would like to know!

bob g

Bob g,

Just remember that some of us have been studying for a lifetime on one or two subjects.
I don't even consider myself an expert in much of anything, I'm more of a jack of all trades (JOAT).

Both in electronics and in programming, once you've got the basics down you already know 75% of a new subject, you just need to learn what's different.

As for commands and how few you really need - that is the essence of programming: figuring out how to express the solution to a problem in what you've been given for a command set.
You are probably a better programmer than you think if you've learned that truth already !

We do pay a price, in learning the Python language, I seem to have forgotten my birthday.  ;D

As BruceM says, the one-wire devices have a certain nitch, mainly when you absolutely can't run another pair of wires.

Daryl





BruceM

I looked at the Maxim datasheet for the DS2450-  The first pages all clearly refer to 16 bit resolution, but in a table on page 22 of 24, they gray-out everything over 8 bits and state accuracy is only to 8 bits and that anything over 8 bits is likely just system noise.

Shame on Dallas Semi and Maxim. That was truly misleading,  intentional,  marketing slight of hand.  I haven't seen such blatant misrepresentation in a long time.  Perhaps calling a two wire bus "one wire" was a tip off on their marketing strategy?

Your Cublock has lots of digital and analog I/O;  why not use that?

Bruce








BruceM

Claiming 16 bits resolution proudly on the opening pages while burying a spec of 8 bit accuracy on page 22 is pretty blatant. 

I worked with precision analog data collection equipment in military flight simulators for years; keeping the analog supply and grounds clean and separate from digital was critical to good accuracy.  I just don't see accuracy happening on a 100 foot bus, with both data and digital/analog power on the same wire, and no local linear regulators.  If you need better than 8 bits, I'd suggest running about 9VDC on a second twisted pair, and putting a low noise, 100ma 5V linear regulator at your DS2450s. 

Alternately, a 40X2 picaxe chip has 32 inputs/outputs, mostly programmable as DI/DO/Analog.  It's $10. No clock or support chips required (internal oscillator), it will run reliably on a solderless breadboard so you can check out your hardware and software via breadboard.

Here's an interesting post I found on the DS2450:

Concerning the use of DS2450 for new work:

I'd not recommend the DS2450 chip for anything these days.. its definitely
the worst of the 1-wire chips out there (and need to be replaced by Dallas).
Most of the hardware manufacturing people have gone through real problems
with this chip. .Instead I'd look to use multiple DS2438's. The DS2450 costs
$5.98 and the DS2438 $1.97 in single quantities so this is reasonable, and
besides you end up with a lot more capability with the 4 DS2438's and much
better operation and performance).

BTW.. Dallas just announced a new chip a few days ago...the DS2781E+ It
similar to DS2438, (different pads though) Temp not as good, (smt devices
have their own set of problems anyway, so I like to use a seperate sensor
for this normally), and has a 16bit current sense and a PIO..could be
interesting.

Dave

David Lissiuk
Sr. Computer Scientist
Springbok Digitronics




BruceM

#7
With your separate regulated supply, you've already done everything you can. That should help, some.
I hope it will give you the extra 2 bits you need.  

Just figuring out how to read the A/D of a DS2450 is more work than using a Picaxe chip.  You would be pleasantly surprised.  And the support is great- professional staff as well as senior hobbyists.

Your existing one wire stuff can also be interface to the Picaxe- it has one wire commands in basic. It could then squirt all you remote data in one 9600 baud serial data block to the Cublock.

The nice part is that your Picaxe learning time investment (not nearly as much as you might think) can be reapplied over and over again, since all the parts use the same basic, and are so cheap you can use them anywhere.

My Battery Bank Charge Controller uses a 40X1.  The processor running, draws less than 2ma!  The entire board, with status LEDs disabled, draws only 3ma (including 2 quad micropower op amp chips, 20 A/Ds, and some HCT buffer/drivers). When actually driving the AC charger, or controlling wind or PV outputs, it will add another 8 ma or so.  You do have to think about it to get power consumption so low, but between the Picaxe chips and the new micropower op amps and comparators, it's not nearly as tough as it would seem.

My Lister-Picaxe processor board is just perf-board, copper tape and a bunch of hand soldered wires.  Those DB-25 and DB-15 connectors are very spendy PI filtered connectors from Spectrum Control, all signals got through 10K ohm resistance first. Power (only a few ma) gets a few stages of LC filtering.  This is NOT something normally done, but I just wanted to show that you can do a processor board without doing a PCB.

Now I'm getting old and lazy (and my hands shake too much) so I use expresspcb.  There are prototype PCB's available for these PIC/Picaxe parts, but I've never used them...they never seem to have what I need and have too much of what I don't.  For $50, I can get 3 of expresspcb's experimenters sized boards made with just what I want, and have them in just a few days.  I still do some very small boards on various prototyping boards, hand soldered.  



BruceM

You're in good company.  I've seen some  big $ projects with highly paid engineering project managers flounder and fail very expensively on proprietary software and hardware that on the surface looks like a big time saver. 

KISS, and roll your own.  Words to finish projects on schedule and budget by.  Even when KISS is a state of art system.  Feature creep is the ever lurking enemy, you must be vigilant!

I don't consider the Picaxe a proprietary dead end, since the chips are pure PIC, the most commonly used uP in the world, and I have a choice of over 7 compilers to switch to should Revolution Education fail.  I have little fear that they will, as the product is a hands down winner in the school and hobby marketplace. 











Crumpite

Folks,

I just found another contender for easy DIY control systems - the Basic Nano:

http://www.basicmicro.com/

It's based on the PIC family but unlike the PicAxe, it uses a complied form of Basic, which is loaded in via their bootstrap loader.
It's advantages are that it's much, much faster, has floating point and other more advanced options and has complete control of which pins are are used for what.

I'd prefer a PicAxe, but if speed it needed for some reason, and you want to use basic, here is a way.

Take care,
Daryl


BruceM

#10
Wow, that's great, Daryl.

This is pretty neat- a free basic compiler and a hardware compatible upgrade path for my Picaxe projects.

The 28, and 40 pin parts are the same PIC chips as the Picaxe X2 parts, and are being offered at about the same price.  I see the compiler/development environment is an "official beta release".   I might wait a bit to try it, but I will be checking out their basic language features.

I have not had problems with speed on the Picaxe chips, but interrupt handling is limited to polled interrupts (as one would expect with an interpreted basic) . Many commands that use the timer function can't be done simultaneously,  but since that's a timer hardware sharing issue, it will exist for a compiler as well.  

Having floating point and better math capability would be very nice, though from what I've read on AVR's user forums (they have floating point in their C library), floating point is a brutal CPU hog for these modest CPUs, and should be avoided if at all possible. I'll be checking out the Basic Micro basic for signed 32 bit integer math, something I wish the Picaxe had.

Thanks Daryl!

Edit:

Just finished a quick review of their basic-  it looks good, including  single dimension arrays, data typing including bits and nibbles, signed integer math (including 32 bit), etc.  It is not a structured basic, alas, and there are no local (temp) variables, all variables are global.  That's annoying but expected for an interpreter, but disappointing for a compiler. (Pity Swordfish Basic is having support issues.)  The price is right, however, and it does seem a very capable Basic.


 








Crumpite

Quote from: BruceM on January 06, 2010, 10:35:53 AM
Wow, that's great, Daryl.

This is pretty neat- a free basic compiler and a hardware compatible upgrade path for my Picaxe projects.

The 28, and 40 pin parts are the same PIC chips as the Picaxe X2 parts, and are being offered at about the same price.  I see the compiler/development environment is an "official beta release".   I might wait a bit to try it, but I will be checking out their basic language features.

I have not had problems with speed on the Picaxe chips, but interrupt handling is limited to polled interrupts (as one would expect with an interpreted basic) . Many commands that use the timer function can't be done simultaneously,  but since that's a timer hardware sharing issue, it will exist for a compiler as well.  

Having floating point and better math capability would be very nice, though from what I've read on AVR's user forums (they have floating point in their C library), floating point is a brutal CPU hog for these modest CPUs, and should be avoided if at all possible. I'll be checking out the Basic Micro basic for signed 32 bit integer math, something I wish the Picaxe had.

Thanks Daryl!

Edit:

Just finished a quick review of their basic-  it looks good, including  single dimension arrays, data typing including bits and nibbles, signed integer math (including 32 bit), etc.  It is not a structured basic, alas, and there are no local (temp) variables, all variables are global.  That's annoying but expected for an interpreter, but disappointing for a compiler. (Pity Swordfish Basic is having support issues.)  The price is right, however, and it does seem a very capable Basic.

I believe that the IDE is just a wrapper around their basic compiler, which *has* been around quite a while.
Hopefully the only bugs might be in the wrapper...  :)

They seem to have most everything that the PicAxe lacks.

It's amazing that a PIC can handle floating point at all, even if it is a cycle hog and the lack of local variables can be worked around with a bit of forethought while writing the programs.
As you say, we likely won't need blazing speed in the CHP world anyways...  :)
And they did pick some good PIC's to support. Looks like they want to go head to head with the PicAxe, or perhaps it's just engineering serendipity.
Seems to be an awfully good deal, considering the price of their standalone compiler.

They are pretty tempting for the price, but I've already got PIC's, PicAxes and Arduino's to play with !
Too much good stuff around these days.
Times have never been better for those who want to do a bit of innovation in whatever field...  ;)

Daryl



BruceM

#12
I agree- they seem to be going head to head with the Picaxe; many of the commands are identical, and of course using identical PIC chips.  

If you look at their other stamp-type product prices, you can see why they are now addressing the Picaxe "threat".  They won't be selling many of those stamps in the future.






Jedon

How about some nice chips that require me to use assembler or C with SIMD or something? Maybe we could use a cell chip off discarded PS3's :-)
I hate BASIC.

Crumpite

Oh, that's easy !

Just use the same chip, a PIC or ATMEGA microcontroller !

Lot's 'o development tools in Assembly or C, a lot free.

We're just using Basic because we're aiming to build a system that anyone can program without effort.

Daryl