# Arduino Clock Multiple Divider

**URL:** <https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612>\
**Category:** DIY STUFF\
**Created:** [January 3, 2021, 7:11pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612 "2021-01-03T19:11:23Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dud](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/dud/32/610_2.png) [@Dud](https://lookmumnocomputer.discourse.group/u/Dud)\
**Post date:** [January 3, 2021, 7:11pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/1 "2021-01-03T19:11:24Z")

</div>

Another Arduino module from Hagiwo

[![](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/c/c559c42e5a12d088eb9ba7593bcff65b6819f6c9.jpeg "[$6] DIY eurorack modular synth Clock multiple divider with arduino") ](https://www.youtube.com/watch?v=I4j5i1ov19A)

 ![arduino clock divider hagiwo](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/a/a58803d7dd6f06cb936eb943e94de1a0c0bf6e39.jpeg)

> **[700円で作るクロック マルチプル ディバイダー/モジュラーシンセ｜HAGIWO/ハギヲ｜note](https://note.com/solder_state/n/n8907f2f6e8f5)**
>
> Arduinoプログラミングに挑戦しつつ、モジュラーシンセサイザーのクロック マルチプル ディバイダーモジュールを自作したので、その備忘録。 背景 コードの書けないシステムエンジニア脱却のために始めたプログラミングの6作品目。前回、クロックに同期して動くシーケンサーを作成したが、そのクロックを生成するモジュールが欲しかった。 また、タイマーという機能の勉強もしたかったので、クロック　マルチプル/ディバイダーに白羽の矢が立った。 ...

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [January 4, 2021, 8:44pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/2 "2021-01-04T20:44:04Z")

</div>

This guy is making interesting modules!

---

<div class="post-metadata">

**Author:** ![Jewceman](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jewceman](https://lookmumnocomputer.discourse.group/u/Jewceman)\
**Post date:** [February 1, 2021, 9:23pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/3 "2021-02-01T21:23:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dud](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/dud/32/610_2.png) [@Dud](https://lookmumnocomputer.discourse.group/u/Dud)\
**Post date:** [February 1, 2021, 10:04pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/4 "2021-02-01T22:04:06Z")

</div>

yes 3 diodes to +5V and 4 to GND 🙂

---

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://lookmumnocomputer.discourse.group/u/eric)\
**Post date:** [February 2, 2021, 6:33am UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/5 "2021-02-02T06:33:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [February 2, 2021, 1:34pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/6 "2021-02-02T13:34:45Z")

</div>

> [@eric](#):
>
> Out has only one diode because there is already one on pin D13.

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.

---

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://lookmumnocomputer.discourse.group/u/eric)\
**Post date:** [February 2, 2021, 1:44pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/7 "2021-02-02T13:44:46Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [February 2, 2021, 1:55pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/8 "2021-02-02T13:55:23Z")

</div>

> [@eric](#):
>
> 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).

Maybe I need to wake up more…

> [@eric](#):
>
> 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…

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

> [@eric](#):
>
> The ATMega has protection diodes. But how much abuse can they handle ?

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.

---

<div class="post-metadata">

**Author:** ![Unauthorised\_service](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/unauthorised_service/32/14978_2.png) [@Unauthorised\_service](https://lookmumnocomputer.discourse.group/u/Unauthorised_service)\
**Post date:** [May 21, 2021, 6:55pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/9 "2021-05-21T18:55:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fredrik](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/fredrik/32/682_2.png) [@fredrik](https://lookmumnocomputer.discourse.group/u/fredrik)\
**Post date:** [May 21, 2021, 7:11pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/10 "2021-05-21T19:11:07Z")

</div>

> [@analogoutput](#):
>
> Protection diodes or no, the ATMEGA528P spec for absolute maximum voltage on any pin but RESET is –0.5 to Vcc + 0.5.

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):

 ![image](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/2/2ca005dee8348914083fb1b17a189a9c9b26d7ea.png)

---

<div class="post-metadata">

**Author:** ![stmllr](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/stmllr/32/5055_2.png) [@stmllr](https://lookmumnocomputer.discourse.group/u/stmllr)\
**Post date:** [January 6, 2024, 8:28pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/11 "2024-01-06T20:28:45Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![illucynic](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/illucynic/32/17009_2.png) [@illucynic](https://lookmumnocomputer.discourse.group/u/illucynic)\
**Post date:** [January 6, 2024, 8:41pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/12 "2024-01-06T20:41:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![stmllr](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/stmllr/32/5055_2.png) [@stmllr](https://lookmumnocomputer.discourse.group/u/stmllr)\
**Post date:** [January 10, 2024, 10:56pm UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/13 "2024-01-10T22:56:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![craigyb](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/craigyb/32/21602_2.png) [@craigyb](https://lookmumnocomputer.discourse.group/u/craigyb)\
**Post date:** [January 11, 2024, 8:43am UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/14 "2024-01-11T08:43:58Z")

</div>

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

 ![1000010232](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/3X/7/2/72ddf76d67f84d04cdad36c4be481b5cfc945c99.jpeg)

---

<div class="post-metadata">

**Author:** ![stmllr](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/stmllr/32/5055_2.png) [@stmllr](https://lookmumnocomputer.discourse.group/u/stmllr)\
**Post date:** [January 11, 2024, 9:19am UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/15 "2024-01-11T09:19:22Z")

</div>

does it fit horizontally into a 5cm Kosmo panel?

---

<div class="post-metadata">

**Author:** ![craigyb](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/craigyb/32/21602_2.png) [@craigyb](https://lookmumnocomputer.discourse.group/u/craigyb)\
**Post date:** [January 11, 2024, 9:24am UTC](https://lookmumnocomputer.discourse.group/t/arduino-clock-multiple-divider/2612/16 "2024-01-11T09:24:46Z")

</div>

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.

 ![20230108_202036](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/3X/4/0/404059b44ca8aace813ac861b05997a976b743d1.jpeg)
