DS2438 support

CAI_Support

Senior Member
We are working on adding DS2438 support on WC8.
Once it is finished, it will share with 18B20 the temperature slot.  That means, you can have eight DS18B20, or four 18B20 and four DS2438,  Total number of temperature reading is mot more than 8. 
 
When DS2438 on the 1-wire bus, it will not allow DS2450 to co-exist.  DS2438's A/D converter will take up the same memory location of DS2450 used to take as A5-A8.  When DS2438 is not on 1-wire bus, same firmware will still allow DS2450 to operate the same way before.
 
There will be up to four current accumulator readings from those optional DS2438 chip.  We will introduce four additional variables in PLC to read them, to reset them.
 
We also need your feedback about how to calibrate the current accumulator on DS2438 from any user who has experience with it.  Thanks for your feedback in advance.
 
To have more devices would be nice, but that would require to have more RAM to remember 1-wire device IDs, as well as more RAM to store the result.  What we are trying to do is to use same RAM for both, so that user can be flexible with added function without removing other features.
 
No. Store the device ids in eeprom and the ram is the same if you don't store the temps from the 2438s.
 
DS2438 is  a smart battery monitor? Are you going direction ultra low power demand with the WC8?
 
DS2438 is marketed as smart battery monitor but is used by others for many purposes since it has a/d converter and temperature monitoring in one chip. I would rather still have the DS2450 quad a/ d converter since I made some input boards to my system based on that chip: but it is out of production.

Mike
 
az1324,  store the IDs on EEPROM is too slow for the code. In our logic, we need constantly match the device ID for multi-tasking with different sensors on same bus.  Reading back those from external EEPROM bit by bit is too slow.
 
Bassmanisme,  our idea was not abandoned DS2450 support, rather to share the memory storage with DS18B20, DS2450 support we currently have, so that if user wants to connect DS18B20 and DS2450, their current PLC will still work the same. If user decided to use DS2438 chip, then it will take up the DS2450 A/D storage space, as well as some the DS18B20 temperature space.
 
WC8 can not go to ultra low power, since its Ethernet logic requires the CPU speed must be 41MHz.  If the clock is lowered, its network interface will not work.  Then some the network related PLC functions will not work.
 
CAI_Support said:
WC8 can not go to ultra low power, since its Ethernet logic requires the CPU speed must be 41MHz.  If the clock is lowered, its network interface will not work.  Then some the network related PLC functions will not work.
That is a pity, I thought there could be an external wake-up of the Ethernet part, or a timer based deep sleep..
 
Without network, the timer will not accurate, the Micochip TCP stack could stuck when it running 40 times slower if we lower the frequency to 1MHz.  At least I am not clear if the Microchip TCP stack can be dynamically load and unload from same firmware.  I only know Microchip engineers told us if we have TCP, we must run it at 41MHz for this CPU.  Most those ultra lower power CPUs do not have network.
 
If you looked the board during power up, it at least takes few seconds for network to stabilized.  We love to see it can work in any clock speed to save power. But there are limitations.  What if the network is running on a separate NIC chip like WC32?  We don't know that would save power or not when there are actually one main CPU and another CPU running NIC.
 
This topic has nothing to do with DS2438 chip support. If someone is interested in that, maybe we can start a separate discussion on that.
 
Lets get back to DS2438 discussion.  Currently DS2450's AD inputs are assigned as A5-A8. If there is any DS2438 on the bus, we will ignore DS2450 even it is on the bus.  Or, do you think if there are DS2450 and DS2438 both on the bus, we just ignore any DS2438 AD input?
 
I don't have a horse in this race but when in doubt, strive for maximum backward compatibility. While it is unlikely an existing WC design will have an unused 1-wire device on the buss I don't think it is forbidden. Since anyone using the DS2438 is designing a new system, or at least updating their code, I'd put the burden on them to make sure the buss is configured correctly to support the new device.
 
/tom
 
Tom, thanks for your reminder. We will try to make them backward compatible, especially for the PLC programming communicate with those additional sensors.
 
It seems current measurement calibration is optional.  During PLC execution, unless user pay great attention to stop most function and current flow, there is no way to calibrate the current measurement.  If this chip is hooked up to monitor battery bank operation, there is always current flow into or out from the battery.  In addition, calibration is per chip, shutdown battery banks is impossible in most operations.
 
According to Ross, normally accumulated battery discharge current is 90% to 95% of the charging current.  If this current accumulator is used for monitoring battery operation, we need to provide a PLC command to zero out the current accumulator, so that each day at the end of charge, user can tell DS2438 to start a new cycle. However, user may start more machines one day, caused battery discharged faster than other days.  Since we can not predicate battery usage, it will be left to user to decide when to clear the CCA and DCA (charge current accumulator and discharge current accumulator).  Can we clear both up in one command, or should we separate them into two commands?
 
We may assume that 1-wire everything is easing the work of the DIY-client. 1-wire LEDs as one example would be a hit....
So may be generic 1-wire support would be a USP of WC.
 
1-wire client chip is patented by Maxim IC and no company can make that without trouble.
Please let this thread concentrate on DS2438 support discussion.
 
To save RAM, we plan to have temperature reading, voltage reading and current reading by scheduler to read every two seconds, but CCA (Charging Current Accumulator) and DCA (Discharging Current Accumulator) reading by request, so that PLC execute that request is slower.  Reset those accumulator is also by request in PLC, as a slower process. We hope that is okay.
 
DS2438 when accumulating small current will have ADC error, so that it allow to setup a threshold register to ignore the small spikes in current measurement.  We plan initially not supporting that.  We also do not plan to support calibration feature of the chip.  Once there are enough usage and feedback on them, we can change how we handle them.
 
Please let us know if that is okay.
 
Just got confirmation from Maxim support, we could speed up all the measurements on 1-wire sensors, if sensor was not in parasite mode.  In WC8, this is not a problem, since we do not support parasite mode on WC8.  This will allow us to get measurement on all sensors within one second.
 
We are still waiting Maxim support engineers to conduct some tests for us on DS2438.  Once those tests confirmed, we will be able to get implementation done.  When there are so many different sensors on the same bus, we want to make sure still be able to let every sensor doing its measurement in time.
 
Back
Top