HOME | Raspberry Pi | ビジネス書籍紹介 | 2025-05-10 (Sat) Today's Access : 15 Total : 1171369. Since 10 Sep. 2019
Small World 4MH711 / YAMAHA YMU251-D
2025.05.08
YouTube でも紹介しています。画像をクリックすると再生できます。
Small World 4MH711 は1990年半ば、リズム時計工業株式会社から発売されていたカラクリ時計です。
このカラクリ時計は正時毎に人形が動き、音楽が流れます。
時計の重量は約2.5Kgもあるので、丈夫な柱に釘打ちして掛ける必要があり、
高さ約44cm、幅38cm、奥行き7㎝もあるので設置場所を検討しなければなりません。
しかし、流れでるメロディーはオルゴールのようなやさしさがあり、堪らなく魅力的です。
そこで内蔵されているメロディICを取り出し再生できるようにしました。
受注型番126(あるいは125)に収録されている楽曲は下記の通りです。
1.卒業写真
2.We’re All Alone
3.いとしのエリー
4.Yesterday Once More
5.中央フリーウェイ
6.Without You YAMAHA YMU251 Series (簡易)
邦楽を奏でるからくり時計は多くはありません。
この曲目はリズム時計工業株式会社の下記の製品に収録されています
・Small World 4MH711
・Small World ALEM DX 4MH713 (D125)
・Small World ALEM A 4MH712 (D126)
●Arduino Pro Mini
マイコンボードには、Pro Mini 8MHz@3.3Vを使用しました。5V駆動マイコンでも大丈夫なようです。
There are two version of the Pro Mini. One runs at 3.3V and 8 MHz, the other at 5V and 16 MHz.
Power
The Arduino Pro Mini can be powered with an FTDI cable or breakout board connected to its six pin header, or with a regulated 3.3V or 5V supply (depending on the model) on the Vcc pin. There is a voltage regulator on board so it can accept voltage up to 12VDC. If you're supplying unregulated power to the board, be sure to connect to the "RAW" pin on not VCC.
The power pins are as follows: RAW For supplying a raw voltage to the board. VCC The regulated 3.3 or 5 volt supply. GND Ground pins.
Memory
The ATmega328P has 32 kB of flash memory for storing code (of which 0.5kB is used for the bootloader).
It has 2 kB of SRAM and 1kBs of EEPROM (which can be read and written with the EEPROM library.
Input and Output
Each of the 14 digital pins on the Pro Mini can be used as an input or output, using pinMode, digitalWrite, and digitalRead functions.
They operate at 3.3 or 5 volts (depending on the model).
Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:
・Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the TX-0 and RX-1 pins of the six pin header.
・External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the attachInterrupt function for details.
・PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite function.
・SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication, which, although provided by the underlying hardware, is not currently included in the Arduino language.
・LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
The Pro Mini has 8 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). Four of them are on the headers on the edge of the board; two (inputs 4 and 5) on holes in the interior of the board. The analog inputs measure from ground to VCC. Additionally, some pins have specialized functionality:
・I2C: A4 (SDA) and A5 (SCL). Support I2C (TWI) communication using the Wire library.
There is another pin on the board:
・Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.
ブレッドボード左側に YMU251-D、右上部に Pro mini、その手前にセラミック発振器を配置しています。
また、YMU251-DのA0ピンに3.5mmステレオミニジャックをモノラルにして繋いでいます。
Platform: atmelavr
================================================================================================
ID MCU Frequency Flash RAM Name
----------------- ---------- --------- ----- --- -----------------------------------------------
pro8MHzatmega168 ATMEGA168 8MHz 14KB 1KB Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz)
pro16MHzatmega168 ATMEGA168 16MHz 14KB 1KB Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz)
pro8MHzatmega328 ATMEGA328P 8MHz 30KB 2KB Arduino Pro or Pro Mini ATmega328 (3.3V, 8 MHz)
pro16MHzatmega328 ATMEGA328P 16MHz 30KB 2KB Arduino Pro or Pro Mini ATmega328 (5V, 16 MHz)
sparkfun_megamini ATMEGA2560 8MHz 252KB 8KB SparkFun Mega Pro Mini 3.3V
$ pio init -b pro8MHzatmega328 $ pio run -t upload