Overview of a New Project

Happy New Year Forum

This is my first post I hope I hit the right forum.
Technically I am a retired race engineer. Getting up to speed on Arduino to keep the mind sharp or less dull.

My project is reading environmental sensors and recording them on a SD card shield on a UNO.

Now I want a time stamp, the sensors are DHT22 temperature and humidity, soil humidity, water temp and a TDS number. There might be multiple soil humidity units depending on ports and coexistence.
Plan to add exit loop button and a led when recording thinking to run the sequence every 5 minutes.
Currently have all the sensors and SD shield running individually the trick will be to stitch them together. I am still thinking of improvements but to many lead down a rabbit hole and rather have a working V1 than a bunch of neat ideas.

I read the RSS feed daily and bookmarking and watching relevant ones there are several books on Arduino and C++ near my general location.
The object is to spend an hour or two a day on this project.

The downside is I lost one kidney to cancer in July my prostrate is positive so getting chemo and hormone treatments and there are spots in three other places that will be looked at in January.
So I have good days and bad days.....

  • Planning is so important, not being in a rush is a virtue .

  • Suggest you always start with a proposed schematic of the way you perceive the connections will be.
    Initially, this will change as you proceed.
    You can ask for help to see if what you think is good is indeed correct.
    When you are 100% sure that things are okay, powering up can be attempted.

  • What is your software experience ?

You mention the individual sensors are working as you hoped.
Next identify your RTC, and post the separate chunks of sensor code here.

The connection strategy is important, as you need to identify the available pins to be used.

Switching to a 2560 could be worthwhile - with multiple serial ports, more memory and a lot more I/O available. Code is virtually identical.

Thanks for responding.

Have a limited amount of programming mostly a hardware guy. Database administrator, cold fusion programming. Worked on my first data acquisition to collect vehicle dynamics in 1984.

Will lay out the ports in a spreadsheet the same way I would do a competition wiring harness.

Have a mega in stock but I want to try on the UNO as the SD shields don't fit the mega.

Need to do some more reading and examples on loops and come up with a clean exit method. Looking at some other RTC modules.

thanks

  • I mostly use the DS3231

1 Like

Yup
That is what came up from Amazon. Think I will order 5.

Thanks

1 Like
  • Very wise.

  • Suggest you disable the battery charging circuit and not use a rechargeable lithium battery.

1 Like

I ordered 8 once, good price. I received 8 packages of 5. Very good price.

Everything I make gets an RTC whether it needs it or not. :expressionless:

a7

5 Likes

How do you connect the SDA & SLC? Both of the shields I have do not connect to those two pins on the UNO. There are 4 holes next to the pins I have not broken out my meter yet to see if there is continuity. I can reach into the pin collection and come up with some right angle pins. Just curious if you had a neat solution.

  • On an UNO, SDA is the A4 pin, SCL is the A5 Pin.

You could write millis() in hex at the start of every log line including the ones with RTC time and date. Every line between those RTC lines happened at the last RTC time and date plus the difference in millis. It makes time-keeping easy.

Why hex? Because in text it works out to 8 chars at the left edge. As long as you use a program to read the log, it doesn't need to be human-friendly.

I did this before with many data sources and many different clocks instead of trying to keep them all synchronized after several teams failed at keeping the clocks synchronized. It's simpler to keep track of the difference to the collector's internal clock, even to log lines with time data. It's so much easier.

1 Like

Find an SD module that does proper voltage leveling and it won't have to fit. You can even DIY an SD module, get microSD with adapter and solder directly to the adapter pads whatever leveling you choose -- 74HC4050 has six 5V to 3.3V channels and an SD card only needs 3! Just make sure that SD has plenty of external VDD as some writes can take more current than an IO pin can safely supply.

SD wires to an SPI bus. You can even use an AVR UART as a dedicated SPI bus if you want to keep the card open while using the SPI port for other hardware. We have the code.

I like the 4050 as leveler because the chip is small and the solution is cleaner than 3 voltage dividers or other levelers and it is current-efficient.

Also:

  • The inputs of the LVC family are 5V tolerant.
    ex: SN74LVC2G08 two AND gates

  • LVC can be used as 5V to 3V3 logic level shifter. i.e. 5V logic --> 3.3V.
    As a side note, we can use the SN74AHCT1G125 for 3V3 to 5V.

1 Like

I have been quiet, but I am reading and plugging away.
Thank you for your responses.
More to Follow.

Honestly I have been reading most of the submission. Learning a little.
Have not touched the electronics in a bit.
With the heat and summer been out in the garden between my garden the quail I am raising and the cancer treatments going through been a little over whelmed.
Hope all is well

1 Like

Stay strong man, cheer up!

LarryD gave the schematic. Here's a photo. I, too, ordered the DS3231 units from Amazon. This is a unit I have not modified yet. The pen tip is pointing at the resistor to remove. It's not a good idea to supply voltage to a non-rechargeable battery.

I used a box knife and just scraped each of the solder points a few times and it came away on a couple of units I did modify.

Interestingly, the units from the "same" listing on Amazon were different-looking between those with and those without the battery. I ordered some of each and I think the units that came without the battery are better looking in their construction. FWIW.

Looking at the most-current post, #15, you're not messing with this much now. I understand. Keep or get faith in Jesus. Praying for you.

--HC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.