Mostly related to DS-1307 Clock Module (Newbie)

CudaBlu

New Member
Hello everyone. I somewhat feel like I know many of you from reading through this forum for the past few weeks. You have a great community of people helping each other here, which was the main reason for me choosing PICAXE as the platform for a project I am researching.

As best as I can, here is an overview (minus a lot of detail) of my project and the resulting, preliminary, question(s) that I have.

The overall project is for an AquaPonics/Hydroponics system to be housed in my cellar.

Here are some of the tasks I would like to automate using one or more PICAXEs’:
- Movement of water/nutrients with water pumps, solenoid valves and liquid level switches
- Aeration with air pumps
- Heating and ventilation with temperature/humidity sensors, fans, vents and heaters
- Lighting with both standard and grow lighting (looking into an idea with RGB LED strips)
- Nutrient monitoring such as PH, etc.

I am new (as in brand new) to electronics and programming, though did spend some time as a Systems Analyst at a large computer company about 17 years ago. But have been working in totally unrelated industries since. My father, who before he retired was an Electrical Engineer at the same company, has gotten excited about the project and is working with me. He has purchased the PICAXE Experimenter Kit (AXE091U) and I have been collecting relays, switches, pumps and other related items.

As I am trying to picture how all of this will fit together I am at a point where I need some overall structural (packaging?) guidance. Because I am new at this I have tried to break everything down into what I call modules. Such as one or more “modules” for each of the above tasks (and I am sure there will be more before I am done). I am also trying to cut down on duplicity, where as I have only one of each common module that is shared by the other modules.
A primary example of a common module to me is a clock (DS-1307) module. Two or more of the main task groups that I have identified would have some sort of scheduling involved (i.e., turn on/off at set times, run for set amounts, etc.).

Question(s) start here:
- Is it possible for a clock module to be shared by other modules that are controlled by various PICAXEs’?
- If so, what kind of considerations will I need to take into account?

I am afraid I am committing one of the forum sins here of not giving enough detailed information, I apologize for that but I am not far enough along into the project to have real specific questions. Right now I am just curious about above two questions.

Any help with the above or any other wise words to help me get started will be greatly appreciated.

Thanks.
 

nick12ab

Senior Member
Welcome to the PICAXE Forum.

There are many ways that you can interface multiple PICAXEs with each other. These include using i2c and asynchronous serial. It's also possible to use wireless communications.

For i2c, PICAXE does not support multi-master i2c so all the PICAXEs in the system cannot access the DS1307 - only one can. However if you are using X1 and X2 PICAXEs then you can use one master PICAXE* and the other PICAXEs are i2c slaves. The time can then be sent to each slave PICAXE that needs it by the master PICAXE.

*Master doesn't have to be X1/X2.

If using serial communications, only one PICAXE will be connected to the DS1307 so whichever PICAXE is connected will need to communicate with the others that need to know the time. The same applies if using wireless communications.
 

CudaBlu

New Member
Thanks so much for the reply nick12ab that makes a lot of sense. So if I understand correctly I could create a master circuit board with all the modules that I would like to be shared and then pass data (time, date, etc.) from it to the other boards -or- the shared modules could be on separate boards from the master and accomplish the same affect. Have I understood correctly? I will start researching serial communications and the X1/X2 chips. Thanks for the leads!
 

nick12ab

Senior Member
Thanks so much for the reply nick12ab that makes a lot of sense. So if I understand correctly I could create a master circuit board with all the modules that I would like to be shared and then pass data (time, date, etc.) from it to the other boards -or- the shared modules could be on separate boards from the master and accomplish the same affect. Have I understood correctly?
Yes. However i2c is not designed to work over long distances so if you want to use separate boards that are metres apart then you can either use an i2c extender, wireless communications, RS485 or another method suitable for long distances.
 

CudaBlu

New Member
@nick12ab

I plan on everything being housed in the same box so distance should not be a problem but thanks for the input on that I2C restriction (for future reference). I keep thinking that I don't want to have one monster-sized board with everything on it in case something burns out (most likely by my inexperience) and if the modules are separate they can be easily replaced. Thanks again for the help!
 
Top