Arduino Project 9 (2D/3D pictures and videos) – How to connect a Texas Instruments BQ32000 Real Time Clock (BQ32000DR, Uno, 1.0)

1. Introduction:
I went on free sample spree a little while ago and then got myself a few “younametheDIYunfriendlypackage”-to-DIP adapters off ebay (more details on the adapters are in one of my previous posts (DIP adapters to convert less DIY friendly packages (SOP, SOIC, TSSOP, MSOP, SSOP, SOT, LCC, LGA)). This is the first little chip from my free sample batch I’ve soldered onto one of the adapters to make it breadboard friendly.

I’m going to use one of those on a XBee-to-Ethernet concentrator in my wireless sensor network to add a time stamp to data frames which I’m buffering locally onto a SD-card on the concentrator during ethernet down time.

For all those who prefer a video instructable, please head over to YouTube to find both a 2D and 3D video instructable based on this post:


2. Tech spec:
Package: SOIC-8
I2C Interface
Ambient Operating Temperature: –40°C to 85°C
Supply Voltage Range: 3V to 3.6V

Texas Instruments BQ32000 Main product page

BQ32000 data sheet


3.Where to get one/many:
The BQ32000DR is free to sample from TI, their price chart lists them for £0.75 in 1k quantities.

Farnell will sell you a single one for £1.85 (Link to Farnell)


4. Let’s hook it up:
Since we can’t easily connect the SOIC-8 package to the Arduino I’ve soldered it onto a SOIC-to-DIP adapter.

bq32000 on dip adapter

Looking at page two of the data sheet we connect it to the Arduino Uno as follows:

BQ32000 Pin4 -> Arduino GND
BQ32000 Pin5 -> Arduino Analog Pin 4 (SDA)
BQ32000 Pin6 -> Arduino Analog Pin 5 (SCL)
BQ32000 Pin8 -> Arduino 3.3V

Looking at page 3 of the same data sheet (and because I’ve had a look in the Arduino forum where people didn’t get the DS1307 to work without I2C pullup resistors ;) ) we also need to connect SDA and SCL with one 4.7KΩ pullup resistors to the Arduino’s 3.3V supply.


BQ32000 Fritzing files

As usual for a RTC the BQ32000DR also has a battery pin and a battery connected to this will get trickle charged from the main power supply. Both the main power supply and the battery connection should get capacitors on permanent circuits but for this little demo we’ll get away without the capacitors and battery.
I’m not going to spend much time explaining the IRQ pin, have a look at page 5 of the data sheet if you think it might be useful to you. Baseline, for a permanent circuit add another 4.7KΩ pullup resistor between 3.3V and IRQ (just like we did with the SDA/SCL lines) to ensure this get’s turned off when the BQ32000 is running off it’s battery.

Project 9 Arduino BQ32000


5. Let’s talk to it:
Since the BQ32000 is code and pin compatible with the popular Dallas/Maxim DS1307 RTC we can borrow the DS1307 Arduino library to talk to our BQ32000DR RTC :)

This version of the library works with the Arduino 1.0 IDE:
DS1307 Library
Simply unpack, copy the resulting DS1307 folder to your Arduino IDE library folder and open your Arduino IDE. You’ll now find the the examples I’m using under File/Examples/DS1307.

Let’s start with DS1307_demo_en. Upload, start the serial monitor and you should get more instructions on how this sketch works. Basically you paste a string into the serial monitor, hit send and thereby set the BQ32000DR to the current date/time.
The format is straight forward, just one typo to watch out. Make sure you replace the “A” in “A[00-49]” with a Y when setting the year. This is my example string:
h13m43s00D05M06Y12 R

Which gives me the following result in the serial monitor:

Project 9 terminal demo output

Now the second example, ds1307_rtc. This is very much the same as DS1307_demo_en just with the interactive part stripped out. The current time/date simply get set as variables in the void setup loop which runs once whenever the Arduino starts up before it moves on to loop through whatever you have sitting in void loop.


6. Conclusion:
As one would expect from Texas Instruments, a very nice no-nonsense RTC :)

Thanks for rating this! Now tell the world how you feel - .
How does this post make you feel?
  • Excited
  • Fascinated
  • Amused
  • Bored
  • Sad
  • Angry
FacebookGoogle GmailEvernoteDeliciousShare

Add a comment »2 comments to this article

  1. Hello just came upon your blog from Bing after I entered
    in, “Arduino Project 9 (2D/3D pictures and videos) – How to connect a Texas Instruments BQ32000 Real Time Clock (BQ32000DR, Uno, 1.0) | THE MAKE CHRONICLES”
    or perhaps something similar (can’t quite remember exactly). Anyways, I’m glad I found it simply because your subject material is exactly what I’m looking for (writing a college paper) and I hope you don’t mind
    if I collect some material from here and I will of course credit you as the reference.
    Appreciate it.


    • Hi Freya,
      No problem, thanks for letting me know. Happy if you found any of my posts useful :)
      Kind Regards,



Copyright © All Rights Reserved · Green Hope Theme by Sivan & schiy · Proudly powered by WordPress

Hit Counter provided by seo company