Me, the noob, has questions

I have not got any clue what I'm doing ... but I try anyway.

Disclaimer: For everything I ask I did extensive google searches first, but didn't find anything, probably not asking the right way / used the right terms.
Also if this isn't the right category, please move it there. Or should I have used one post for each question?


I recently got a Arduino R3 starter set (to learn the ropes) and for prototyping before I finalize my projects.
Worked well so far. I think* I understand most of it.

  • In the kit was a DS3231SN RTC board. It only mentions the 32k and sqw pins as "not necessary". I still like to know what (and how) they could be used for.

  • I also realized that it has a temperature sensor and alarms. Again I could not find any source how to set, read, or use those.
    (I kinda hope I can also use it to get a board to wake up when I want to ... so that it can remain off for most of the time and hence enhance the time it can be operated on a battery)
    Any resources on that? An idiots guide would be preferred.

  • I also got for various projects a set of nanos ... which apparently use the "old bootloader".

  • What happens if I press (on the ide) burn bootloader?
    Will have have the new bootloader on my nano, then?
    They are cheap ... still don't want to waste one if I can help it.

  • Also the mini-USB is a huge turn off*2. For several projects I have done (on battery driven LED lights) I have bought a bunch of micro USB ... since all was custom ... and only power I didn't sweat the details ...
    But now I kinda have the Idea to replace the mini USB on the nano with a micro ... (I have soldered micro USB ports before ... tho, the ground on the ones I still might be through hole, ... it has been a while)
    But the processor is right next to it ... Again I kinda don't want to ruin it if I can help it.
    Which troubles I could run into?

  • Finally onto my first project (with those nanos)... I have an LED strip ... which I upgraded to an IOT ... like all IOT that thing is horrible (but lacks better alternatives*3)... but would be usable if not the Wlan part would crash roughly every day (runs at least 24 hours as intended the stops working) still can be used with the remote ... but I don't want to.

My idea is to splice a nano somehow into the 12V line and open a normally closed relay for 60000 ms*4 ... or at least cut the power somehow for that time.
I want to go as minimalistic as possible.

  • I have a bunch of zenner 6.2V (and a few lower) 0.5 W and 5V 1W regulator chips laying around. I can use that to go directly in vIn, right?
  • Running a relay directly of the nano draws too much power right? So I better run my relay of my supply in parallel?
  • Would a transistor be enough to switch the LED band and it's controller or would I push too much power through it? (Sorry my knowledge about electronics is very limited as well ... and I try to avoid Dunning-Krugers)

*= and hope I learn the rest soontm
*2= Kinda recycled most of my USB A 1.0 to 2.0 and mini USB cables.
*3= unless I do that with a nano myself ... but I do not feel ready yet to make an Alexa, Google, and app enabled wlan device myself.
*4= and do nothing the rest of the 86340000ms

The 32KHz pin could be used to drive an external logic circuit that needed a very stable and accurate clock signal. Or connected to an Arduino interrupt pin where the interrupt routine simply counts the pulses to give a very accurate time down to a fraction of a millisecond. This would be more accurate than millis() which relies on the less accurate/stable crystal or ceramic oscillator on the Arduino. But for most purposes, millis() is good enough.

The sqw pin is similar but at a much lower frequency which can be selected by sending a command to the RTC chip. It can go down to 1Hz I think.

You can read the internal temp sensor on ds3231. I'm not sure if any of the RTC libraries have a function to make that easy, but it's only a few lines of code. It's not very accurate and can be a few degrees out but ok for non-critical uses like displaying temp on a clock project as an extra feature.

I've never used the built-in alarms on ds3231. Don't know if there are any libraries for that either, but, again, if not, easy enough to figure out by reading the relavent parts of the data sheet and using the Wire library.

If you are serious about running a circuit for long periods on battery power, then neither Uno or Nano are a good choice. Ok for prototyping, but for the final circuit, switch to a bare atmega328 running at 8MHz and use one of the sleep libraries.

To burn a bootloader, you need an ISP programmer, connected to the ISP header on the Nano. You can get these at very low cost on eBay etc, for example "USBasp". Or you can use another Nano as the ISP programmer by using the ArduinoISP sketch.

If for only powering the circuit from a phone charger with a micro-USB plug, you can get micro-USB sockets on small breakout boards which you can then connect up to the 5V & GND pins on the Nano. Or get micro-to-mini adaptors.

I found your led strip/IOT project description difficult to understand.

You can run Nano from 12V supply provided only small amounts of current will be drawn. Powering a 5V relay module would draw quite a lot of current. But you could use a 12V relay module, which would be powered directly from the 12V supply, to avoid that problem.

Your idea of using zener diodes sounds wrong, but as I said, you can power the Nano from 12V directly to Vin as long as the current drawn from the Nano at 5V is keep to absolute minimum. If you draw any significant current (more than a few tens of milliamps) then you risk the Nano's regulator overheating.

PaulRB:
[...]
If for only powering the circuit from a phone charger with a micro-USB plug, you can get micro-USB sockets on small breakout boards which you can then connect up to the 5V & GND pins on the Nano. Or get micro-to-mini adaptors.

There is a light misunderstanding here. I do not want to power the nano from a micro USB. I want to use my micro USB port I have lying around (from making battery powered LED lights) to replace the mini one on the board. Basically desoldering the one that is on there and soldering an other one on there. ... Since I haven't looked and can't quite find them yet I can't tell if my micro ones are surface mount (as the current mini is).

Anyway the question was practically how big is my chance to ruin the nano while doing that (processor is right next to the connector and also there are elements on the other side)

I see. They probably are all surface mount. With a very fine soldering tip, very good eyesight and very steady hands, you might be able to do it without damaging other components. But the connections might not be very physically strong because it will be difficult to get solder to flow underneath and bond strongly with the PCB. Also the footprint of the micro-usb socket may not be exactly the same as the Mini-usb and not have pads in the right places. The result could be a very weak socket which would soon pull off the PCB with frequent plugging & unplugging.

I wouldn't attempt it. Just get an adaptor.
s-l225 (11).jpg

s-l225 (11).jpg

thaaat_guy:
There is a light misunderstanding here. I do not want to power the nano from a micro USB. I want to use my micro USB port I have lying around (from making battery powered LED lights) to replace the mini one on the board. Basically desoldering the one that is on there and soldering an other one on there. ... Since I haven't looked and can't quite find them yet I can't tell if my micro ones are surface mount (as the current mini is).

There is indeed a misunderstanding!

To power the Arduino, you connect your 5 V supply to the "5V" and ground terminals - the same ones you are connecting to your DS3231 module and whatever else uses 5 V.

If you have a power supply ("Phone charger") with a micro USB connector and you are reluctant to cut it off, use a micro USB breakout board to - break out - the 5 V and ground.

thaaat_guy:
Anyway the question was practically how big is my chance to ruin the Nano while doing that (processor is right next to the connector and also there are elements on the other side)

Dead right. For "I have not got any clue what I'm doing", desoldering USB connectors is a really, really bad idea! :astonished: