Arduino Clock Multiple Divider

Another Arduino module from Hagiwo

5 Likes

This guy is making interesting modules!

2 Likes

I’m building the module and for the diodes on D7, D8, and D3, do we actually have to put two diodes wired to 5v and GND, or do we do something else? Kinda new to finally using schematics.

1 Like

yes 3 diodes to +5V and 4 to GND :slightly_smiling_face:

These diodes are there for protecting the arduino if you plug something in that sends voltages it can’t handle. Everything negative will go to ground thru one set of diodes, everything over 5V will go to the 5V rail thru the other set.
Out has only one diode because there is already one on pin D13.

2 Likes

Maybe I’m misunderstanding something, but per the ATMEGA328P datasheet, “All I/O pins have protection diodes to both V CC and Ground”. I don’t see how D13 is any different from D3, D7, or D8, other than that it connects to an LED.

There is that diode in series just at the output of the arduino, which will block any positive voltage that may be applied to the clock out jack (I think it is meant to block the signal coming from External Clock In).
But shouldn’t the schottky to ground on D13 be on the other side of the 470R ? It may have a hard time if you apply -12V on the jack…

The ATMega has protection diodes. But how much abuse can they handle ?

Maybe I need to wake up more…

Good catch. Yes, the resistor is there to limit current through the diodes. It’s in the wrong place on that pin.

Yes indeed. Protection diodes or no, the ATMEGA528P spec for absolute maximum voltage on any pin but RESET is –0.5 to Vcc + 0.5.

1 Like

Of course its not recommended but I have built a few arduino modules including these new ones without protection with no problems. Ive done more damage by plugging power in wrong way Or socketing the nano the wrong direction.

The 0.5 V is the protection diode drop, so that just means that you need to take them into account if you go outside that range – if you don’t, you’ll fry the diodes. Here’s a fun little circuit from an old ATmega application note that works up to 1 kV (i.e. max 1 mA through the diodes):

I wonder what kind of diode should I put between D13 and the 470Ω resistor?
Also, what values do the caps next to A3 and A4 have? “22op” - I have no idea what “op” means.

Do you have an idea?

Any small signal diode (ie. 1N4148) should work on the D13 output.

As for the capacitor values, my read of it is “220 p”, as in 220 pF.

3 Likes

Thanks @illucynic

I managed to build it on breadboard with the following changes:

  • using a log pot A100k for rate control, which allows more granular settings with bpm<200
  • using 4k7 instead of 22k for the LEDs for better brightness
  • control both multiple/divider output channels with a separate pot

More adaptions I have in mind, given that the precision does not suffer:

  • more outputs
  • 7 segment 3 digit LED to visualize the actual bpm. However this requires 10 digital pins, but only 9 are left. Maybe using rx/tx or turning an analog one into a digital.
  • add more divider modes, like /5 /7 /9
  • replace program pot with a rotary switch for more convenience
1 Like

Use a TM1637 display, only 2 pins required and extensive libraries to drive them. 9 displays on this project and only 7 wires used.

3 Likes

does it fit horizontally into a 5cm Kosmo panel?

I think off the shelf ones are about 40cm as they are 4 digit displays in general. But you can get the chip TM1637 and any combination of displays you want upto 6 digits, so you can use small sized 7 seg LEDs, mine are 3 digit 0.56" displays because I had plenty of room.

Alternatively a 0.96" i2c OLED display only needs 2 wires, pins A4 & A5 of an Arduino, I show BPM and duty cycle on mine.