Anyone doing an arduino controller?

Stu, thanks for the explanation. See the link I posted above - the method I'm using seems to be the "default" I've seen from the communities I pull info from, which is why I used it - for better or worse! I posted the schematic on an electronics forum a few weeks ago and no one said a peep, so who knows.

At any rate, the prototype order of 5 of the boards are arriving in a few days, so I'm gonna try it. If it misbehaves, I'll give your version a try. :)
 
what are the chances of getting digikey part numbers to build this circuit? Got most of it, just making sure i'm understanding it right before I order.
 
I ordered from Mouser, it was cheaper for this stuff. I can give you the BOM but you might want to wait 'till I test it before building a copy, unless you're really just eager to experiment. It was all SMT so not exactly breadboard-friendly.

If it DOES work, I have multiples of the board coming and won't need them all.
 
that would be great. I'm in no rush. I get my heatsinks in two days then drilling, and taping. Making a canopy. All kinds of other stuff to do first. Your board is an arduino shield, or a breakout?
 
It's designed as a shield, but of course you could use it as a breakout - you'd need to connect Vin, GND, plus the PWM pins you'd be using. it's smaller than many shields but contains full "shield headers" if you need to pass through to other shields.
 
It won't come with a datasheet but you can get it online:

http://datasheets.maxim-ic.com/en/ds/DS1307.pdf

There's a typical circuit on the first page. There's also a recommended crystal layout on page 7, but you won't really be able to address that (the shielding) on a protoshield. Just keep the crystal RIGHT next to the IC and don't put anything else near it.

Basically, you just connect the crystal and battery as shown in the datasheet. Connect a .1uF decoupling cap from the Vcc pin to GND. Connect Vcc to the Arduino's 5v, and the IC's GND to the Arduino's GND.

Then, connect the SDA and SCL lines. They are Analog pins 4 and 5, respectively. You'll need pullup resistors, too. Connect a resistor from each of those two pins to +5v. 1k8 or 2k2 resistors are fine.

I've heard there's a new "time" library that abstracts all of the communication with the DS1307 but I've never used it. If you want the raw code lemme know and I'll post it.

Hi der_wille_zur_macht,
Could you explain the 2 pin Vcc and SQW/OUT connecting to? I'm looking at the data-sheet but can't figure out how to connect these 2 pins. Does the Vcc pin connect to .1uF decoupling cap and to 5v? What about the SQW/OUt pint? The SCL and SDA are each connect to a resistor and the other side of the resistor to 5v also the SCL and SDA connect to analog pin 4 and pin 5 rite? I hope this make sense.
Thanks!
 
Hi der_wille_zur_macht,
Could you explain the 2 pin Vcc and SQW/OUT connecting to? I'm looking at the data-sheet but can't figure out how to connect these 2 pins. Does the Vcc pin connect to .1uF decoupling cap and to 5v? What about the SQW/OUt pint? The SCL and SDA are each connect to a resistor and the other side of the resistor to 5v also the SCL and SDA connect to analog pin 4 and pin 5 rite? I hope this make sense.
Thanks!

Vcc is just your +5v connection. Put a decoupling cap close to the pin and connect the other side of the cap to GND. The SQW/OUT pin is typically not used in our implementations, you can leave it floating (not connected to anything). If you DO want it, it needs an external pullup resistor, which is what is shown on the first page of that datasheet. I leave it floating when I use these chips.

SDA and SCL connect to Analog 4 and 5, respectively. Each of those two connections needs a pullup resistor. A pullup is just a resistor between a given trace and Vcc (5v in this case). So yes, you'd put a resistor between each of those two pins and Vcc. If you put other devices on the I2C bus, you only need ONE set of pullup resistors.

Here's a schematic of everything you need:

DS1307-1.gif
 
Sorry for another dummy question! I've built the rtc but how do I test it? I loaded the DS1307 libraries on arduino site but only see on the serial monitor window a counting 0:00:01, 0:00:02,.... I tried to unplug the connection between the rtc board with my arduino, reload the sketch (without connecting the rtc board i built) and run the sketch and the program run like before 0:00:01, 0:00:02,...... Any help would be appreciate!
 
vnguyen,

You need to load the RTC with time & date.
Then reboot the arduino and it should resynch with the RTC.

Stu
 
Hi Stu,
I'm sorry that I still don't get it. I loaded the sketch that set the RTC to 0:00:00 and let it ran for few minutes. I then unplugged the USB cable (connected the arduino to my laptop for communication and power) for few more minutes and plug back the USB cable. On the serial monitor window I saw the clock went back 0:00:00 again....?? Does it mean the RTC board I have doesn't work?
Thanks!
 
vnguyen,

The sketch you're running has code to set the time and date to all zeros (I'm guessing, but 99.9% sure). Hence, when you disconnect power and restart the Arduino, it re-runs that code, and re-sets the time and date to all zeros.

When I use these RTCs in a new system, I have a "special" sketch I load that sets the time and date to what I want it to be. I load that sketch and let it run once to set the time and date, and then immediately load whatever sketch I actually want on the RTC.

The trick is, you want to set the RTC once and only once. The battery backup onboard will take care of maintaining the time and date as you load, reload, power on, power off, etc. The sketch you're running resets it every time the sketch is reset. So, either load a different sketch, or comment out the line of code that's setting the RTC when that sketch runs.
 
assuming your using 12v to power your arduino then this is much easier and doesn't require a different supply and what 30 cents in parts. it will give you 10v from the 12v power supply..let me know if i did something wrong

You can use 3 diodes to drop the voltage from 12v.
3 x 0.6/0.7 = 1.8-2.1.
 
Thank you guys! I just finished building my first ever controller with RTC and LCD screen with joystick. So far the time seem to run pretty good (some bugs here and there). I have 1 question on the driver. Can I run mix buckpuck 1000mA and 700ma on the same PSU?
 
The input voltages have to match.
The vforwarding will be slightly different at different currents.

Not sure how well buckpuck regulates or if it just drops fixed amount.
 
I bought a parallel LCD and found out the hard way why people just buy serial enabled LCD's, so I got a shift register and did this project and it works flawlessly on pins 12 and 13 (i did the 2-wire version). I'm actually in the process of transferring it from a breadboard to a more permanent board, which is going to be a nightmare for me to solder. Right now I have all the parts stuck through the holes of this proto board but not yet soldered and it looks like it will be impossible. Good thing I got an extra one :lol:

Anyways, I'm going to try it. I'm wondering though, if i should try to get it to work on I2C to save pins. This would also enable me to attach my DS1307 breakout to the same board I'm doing for the LCD which I have running on analog 4 and 5 right now.

My questions are: How should I wire the LCD and clock to the same pins? What will have to change in my code?
 
If you want the LCD to run on I2C, you need an interface chip that can run on I2C - you can't use your shift register chip via I2C. I would strongly suggest making the change now, as it preserves pins - and you may find you want those pins later on.

The most popular choice for I2C LCD interface via "dumb" port expander is probably the MCP23008. I know there are a few libraries out there that'll get you going.
 
If you want the LCD to run on I2C, you need an interface chip that can run on I2C - you can't use your shift register chip via I2C. I would strongly suggest making the change now, as it preserves pins - and you may find you want those pins later on.

Thanks DW. I was thinking the same thing. Better to get it done the right way first since I'm going to give this thing more jobs after I get it controlling my meanwells correctly, which is still giving me probs. I'm seriously considering selling all of them to build my own drivers that will work the way i want them to.

The most popular choice for I2C LCD interface via "dumb" port expander is probably the MCP23008. I know there are a few libraries out there that'll get you going.

Yes, i'm googleing that # and have found a bunch good info and code to go with it. :thumbsup:
 
Back
Top