Showing posts with label Maxim. Show all posts
Showing posts with label Maxim. Show all posts

3/14/2013

DS1302

I wanted an easy way to interface and use the DS1302 trickle-charge timekeeping chip.




The DS1302 trickle-charge timekeeping chip contains a real-time clock/calendar and 31 bytes of static RAM. It communicates with a microprocessor via a simple serial interface. The real-time clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator (The library only support the 24-hour mode).

Interfacing the DS1302 with a microprocessor is simplified by using synchronous serial communication. Only three wires are required to communicate with the clock/RAM: CE, I/O (data line), and SCLK (serial clock). Data can be transferred to and from the clock/RAM 1 byte at a time or in a burst of up to 31 bytes. The DS1302 is designed to operate on very low power and retain data and clock information on less than 1µW.

The DS1302 is the successor to the DS1202. In addition to the basic timekeeping functions of the DS1202, the DS1302 has the additional features of dual power pins for primary and backup power supplies, programmable trickle charger for VCC1, and seven additional bytes of scratchpad memory.

3/04/2013

Aquaponics pH to 1-Wire Converter – Part 2 BAT54S

This is the first draft of the pH to 1-Wire converter schematic, and some of the component values are still missing. The original circuit runs on 12 VDC, but since the A/D converter IC must be supplied with 5 VDC only I want to scale down the circuit, so that 5 V is the maximum voltage present. I assume I would have to tweak some resistor values in order to make the circuit run at this lower supply voltage, but I haven’t looked into the details yet. I’ll post an updated schematic and the calculations later.


BAT54S

The original idea was to use a 1-Wire A/D converter with built-in 1-Wire digital interface, but the one I found was not recommended for new designs. This is what Maxim writes about the DS2450 A/D converter:

    This product is Not Recommended for New Designs. Some versions may be No Longer Available or being discontinued and subject to Last Time Buy, after which new orders can not be placed.

Also known as ‘NRND’. Most of the other A/D converters I found at Maxim had another interface, but the main IC on the soil moisture sensor board from Hobby Boards also converts analog signals to digital and that’s a DS2760. The updated version is called DS2762, which is the one that I have used in the new circuit.

The DS2760 on the soil moisture sensor board measures current, but the IC also has a voltage input pin. The IC is actually a ‘High-Precision Li+ Battery Monitor With Alerts’ as Maxim calls it. The idea is to only use the voltage input pin and 1-Wire interface to get a popular, and cheap, A/D converter, with high input resistance.

Since the DS2762 operates on 5 VDC, the ground reference for the amplifier section should be changed to 2.5 V instead of 7 V in order to use the entire input voltage span of the A/D converter. The 7 V in the original circuit was meant to be measured with a voltage meter and you would have the pH value directly as a reading (pH 7 = 7.00 V, pH 8 = 8.00 V etc.). There’s no meter or display on this new circuit, only data delivered to a computer via the 1-Wire interface, so voltages in the circuit can be converted to something meaningful using software on the computer. Historical data can be displayed with e.g. RRDtool.

When the supply voltage is changed, the gain of the voltage amplifier has to change too, along with a change in offset voltage, i.e. ground reference. IC300 is a dual op-amp IC, where R351, R352 and R355 determines the gain. R300 sets the ground reference voltage level. Apparently it is necessary to put in trimmer resistors, since practical op-amps are not perfect like theoretical ones. Also, the pH probe is worn down as time goes by, and the circuit will have to be calibrated regularly.

Several capacitors have been added to short circuit any fast changing signals as these are irrelevant to aquaponics pH measurements and any alternating currents are considered noise in this respect. It means that the pH values from the 1-Wire interface will need seconds to stabilize. D101 is included to protect the 1-Wire interface.

Since the schematic does not represent the PCB layout, a note has been written about the seemingly long wires going from the BNC connector to the op-amp. On the actual PCB the traces must be as short as possible, because the internal resistance of a pH probe is very high and any electromagnetic radiation will induce relatively high unwanted voltages in the circuit. It shouldn’t be a problem though to place IC300 close to J300.

DS2762 has a general purpose I/O pin (PIO) which can be used for debugging. D100 could be connected to this pin to be able to signal something, but it would probably need an extra transistor. As I want things to be as simple as possible I haven’t included this, but at least there’s a resistor footprint to work with now.

I want to experiment with the values of R351, R353, R354 and R355 in Qucs, as I don’t fully understand the impact of changing the supply voltage, hence the missing resistor values. But I don’t mind – Qucs turns out to be an awesome piece of software for the electronics hacker ;-)

   

12/02/2012

An integrated circuit MAX232



The MAX232 is an integrated circuit, first created by Maxim Integrated Products, that converts signals from an RS-232 serial port to signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver and typically converts the RX, TX, CTS and RTS signals.

The drivers provide RS-232 voltage level outputs (approx. ± 7.5 V) from a single + 5 V supply via on-chip charge pumps and external capacitors. This makes it useful for implementing RS-232 in devices that otherwise do not need any voltages outside the 0 V to + 5 V range, as power supply design does not need to be made more complicated just for driving the RS-232 in this case.

The receivers reduce RS-232 inputs (which may be as high as ± 25 V), to standard 5 V TTL levels. These receivers have a typical threshold of 1.3 V, and a typical hysteresis of 0.5 V.

The later MAX232A is backwards compatible with the original MAX232 but may operate at higher baud rates and can use smaller external capacitors – 0.1 μF in place of the 1.0 μF capacitors used with the original device.

The newer MAX3232 is also backwards compatible, but operates at a broader voltage range, from 3 to 5.5 V. 

Pin to pin compatible: ICL232, ST232, ADM232, HIN232.