#arduino-pro-mini — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #arduino-pro-mini, aggregated by home.social.
-
Arduino Pro Mini USB Host Proto PCB Design
This is a prototyping board for an Arduino Pro Mini and mini USB Host shield.
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
If you are new to electronics and microcontrollers, see the Getting Started pages.
The Circuit
This is mostly just breaking out the pins for an Arduino Pro Mini onto a set of additional headers for use with a mini USB Host shield.
There are additional headers for power and GND and it includes the option for powering via a 7-12V barrel jack into via a 7805 regulator or directly via 5V into a set of jumper header pins.
PCB Design
In previous designs I’ve opted to assume that the USB host shield will be mounted directly onto the Arduino Pro Mini, but this time I’ve separated them out for more flexibility.
I may decide I should have just left them together, but I didn’t think I’d be able to use pin headers and sockets in quite the same way with the headers already connecting two boards.
With hindsight I’m now wondering if I should have passed through all the Arduino Pins to the shield part. As it stands, it only has the connections required for the USB host shield.
All of the pins are broken out either side of the prototyping area however, but only the usable pins have been labelled.
Closing Thoughts
This was a somewhat speculative build based on the idea that I’d want to experiment with a USB host device and some additional circuitry.
But my main need has been satisfied by an alternative build (more on that later), so for now this is probably a “why not, might come in useful” build.
Kevin
-
A 3-tool selector box for a JBC soldering station - Soldering is one of those jobs that are conceptually simple enough, but there’s qu... - https://hackaday.com/2024/02/29/a-3-tool-selector-box-for-a-jbc-soldering-station/ #arduinopromini #toolhacks #soldering #uln2003a #relays #jbc
-
486 Gets Animated Turbo Button Thanks to Arduino - There was a point in time, excruciatingly brief, in which desktop computers often ... - https://hackaday.com/2023/07/25/486-gets-animated-turbo-button-thanks-to-arduino/ #retrocomputing #arduinopromini #arduinohacks #turbobutton
-
An Interesting Circular Stewart Platform - Stewart platforms are pretty neat, and not seen in the wild all that often, perhap... - https://hackaday.com/2022/06/10/an-interesting-circular-stewart-platform/ #stewartplatform #arduinopromini #mischacks #h-bridge #tb6612 #6-dof
-
Vintage Rotary Phone MIDI Controller – Part 7
Having built my adaptor into a small box, I’ve gone back to add a mode button so I can include all the different applications into a single sketch.
This builds on the previous parts in this series.
- Part 1 – Understanding the telephone hardware and interfacing to an Arduino.
- Part 2 – Decoding the rotary dial from the Arduino.
- Part 3 – Rotary phone MIDI note controller.
- Part 4 – Rotary phone MIDI program change.
- Part 5 – Rotary phone MIDI random note sequencer.
- Part 6 – Rotary phone to MIDI adaptor.
- Part 7 – Rotary phone multi-mode applications.
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
If you are new to Arduino, see the Getting Started pages.
Parts list
- Arduino 5V Pro Mini (as I’m soldering it in, I’m using a cheap clone)
- “GPO” or “BT” original 746 rotary telephone
- Scrap ADSL filter
- 120kΩ resistor
- 2x 220Ω resistors
- Chassis mount 5-pin DIN socket
- RJ11 telephone cable (cut in half) – this is the “handset” cable or possibly a “modem” cable
- USB cable (cut in half)
- MIDI sound module
The Circuit
The idea is to simply add a push-button switch to the build from part 6, so I’m taking that as my starting point. I’m adding a button between D3 and GND, using it in INPUT_PULLUP mode.
I made a hole in the case and made a small cut-out in the PCB to hold the button relatively firmly in place, then connected it as shown below.
Aside: I somehow managed to break the leg off the resistor between 5V and the MIDI socket, but didn’t notice until I tried it and nothing worked – so that was a bit of a pain, as I needed to gently prize everything apart enough to get a new resistor soldered in place!
The Code
So, the main idea is to use the button to change between the various modes of the phone. I’ve implemented the following:
- Mode 1 – Send MIDI Control Change 16 – General Purpose Controller 1 – with the digit as the value (0 to 9).
- Mode 2 – Play NoteOn messages for C major, starting with MIDI note 60 (C4) for 0.
- Mode 3 – Play NoteOn messages for a pentatonic scale, as described in the “simple mode” from part 3.
- Mode 4 – Play NoteOn messages for several pentatonic scales, as described in the “complex mode” from part 3.
- Mode 5 – Send MIDI Program Change messages as described in part 4.
Note that I haven’t implemented the sequencer as described in part 5 as the code structure is quite different to the other modes.
Also note, if you examine the code, the modes are encoded as 0 to 4 within the code itself.
The main logic is as follows:
Loop:IF button pressed THEN switch to the next modeIF there is a new digit read THEN IF in Control Change mode THEN Send MIDI General Purpose Controller 1 CC Message with value "digit" ELSE IF in Program Change mode THEN Update the program change number ELSE Check which scale we're using AND Send the associated MIDI NoteOn message for that digit in that scaleIF phone is placed back on the hook THEN IF in Control Change mode THEN nothing to do ELSE IF in Program Change mode THEN Send the MIDI Program Change message ELSE Send a MIDI NoteOff message for all notes from all scale modes, for all digits
Once again I’ve implemented it so that all notes sustain until the phone is placed back “on hook” when I simply cycle through all notes in all scales sending NoteOff messages. This is a little redundant but does mean that if the mode had changed after notes started playing, then all notes will eventually be turned off properly.
The last thing I’ve added was some indication of which mode we’re in. When the button is pressed and the mode changed, it will play a few notes from the C major scale starting on C5 to indicate the number of the mode (1 to 5).
Closing Thoughts
I’m still wondering if it would be better to have specific MIDI messages defined for the different events within the phone, and I’m part way there with the use of the first general purpose CC message. It might be useful to also have a CC message defined for on-hook and off-hook too.
I’ve also wondered if I should have a mode that plays proper NoteOn/NoteOff messages when dialing. I might still implement that for the C major scale mode – I’m still deciding! I also use the built-in LED to indicate a button press, but I might update it to flash to indicate the mode too, again I’m not sure yet.
The MIDI channel is still hard-coded to 1, and to be honest that is fine for me for now. I would like to find a way to get the sequencer functionality in there somehow, but need to think about that a little more. I was also wondering if I should generate MIDI real-time clock messages in response to the pulses, but again I’m still chewing that over too. I have plenty of IO pins on the Arduino spare, but not a lot of space in the casing.
I have managed to pick up a second phone and on simple inspection it appears to be wired up the same as my original phone – but for some reason it isn’t reliably detecting pulses, so I need to look at that at some point too.
So there are still plenty of things I could do next!
Kevin
#arduino #arduinoProMini #controlChange #midi #midiController #programChange #rotaryDial #telephone
-
Giant Working NERF Gun Runs on Tiny Arduino - Well, here it is: a shoe-in for the new world’s largest NERF gun. (Video, embedded... - https://hackaday.com/2021/10/01/giant-working-nerf-gun-runs-on-tiny-arduino/ #arduinopromini #worlds-largest #arduinohacks #weaponshacks #poolnoodle #arduino #nerfgun #pvc
-
DIY PECS Board Uses Pictures to Communicate - One way of communicating with autistic and non-verbal people is through the use of... - https://hackaday.com/2021/07/15/diy-pecs-board-uses-pictures-to-communicate/ #non-verbalcommunication #arduinopromini #communication #arduinohacks #dfplayer #arduino #autism #mdf
-
Sunlight-Based Life Clock Predicts Your Darkest Hour - The past year has been quite a ride for everyone on Earth. But you never know whic... - https://hackaday.com/2021/06/16/sunlight-based-life-clock-predicts-your-darkest-hour/ #thehackadayprize #arduinopromini #e-paperdisplay #lifeexpectancy #arduinohacks #clockhacks #solarhacks #arduino #e-paper
-
Auto Strummer Can Plectrum the Whole Flat-Strumming Spectrum - Playing the guitar requires speed, strength, and dexterity in both hands. Dependin... - https://hackaday.com/2021/05/07/auto-strummer-can-plectrum-the-whole-flat-strumming-spectrum/ #bipolarsteppermotor #arduinopromini #blinkenbuttons #arduinohacks #musicalhacks #steppermotor #strumming #28byj-48 #arduino #guitar
-
Eyesight Guardian Polices Your Poor Pupils - Don’t know about you, but over the last year or so, we have gone from spending ten or twelve hours a... - https://hackaday.com/2021/03/05/eyesight-guardian-polices-your-poor-pupils/ #arduinopromini #arduinohacks #tftdisplay #lifehacks #eyestrain #arduino
-
Slot Machine Has a Handle on Fun - For some reason, when slot machines went digital, they lost their best feature — the handle. Who wan... - https://hackaday.com/2020/12/05/slot-machine-has-a-handle-on-fun/ #arduinopromini #arduinohacks #fruitmachine #slotmachine #ledmatrix #arduino #games
-
An Arduino Controller for Hot Air Handles - In general, the cost of electronic components and the tools used to fiddle with them have been dropp... - https://hackaday.com/2020/09/04/an-arduino-controller-for-hot-air-handles/ #hotairreworkstation #arduinopromini #arduinohacks #toolhacks #soldering #858d
-
Tiny Circuit Sculpture Keeps the Night Watch - If you’re planning to get into circuit sculpture one of these days, it would probably be best to sta... more: https://hackaday.com/2020/07/27/tiny-circuit-sculpture-keeps-the-night-watch/ #circuitsculpture #arduinopromini #arduinohacks #nightlight #mischacks #photocell #arduino #cdscell #led
-
DIY Pocket MP3 Player - When [Neutrino-1] saw DFRobot’s DFPlayer module, he decided he wanted to make his own retro MP3 pl... more: https://hackaday.com/2020/06/29/diy-pocket-mp3-player/ #portableaudiohacks #digitalaudiohacks #arduinopromini #soundcloud #dfrobot #tp4056 #fat16 #fat32 #mp3
-
Arduino Magnetic Board is Anything but Boring - Magnets (especially those ball magnets!) are endlessly fascinating, aren’t they? It’s almost dange... more: https://hackaday.com/2020/06/17/arduino-magnetic-board-is-anything-but-boring/ #arduinopromini #arduinohacks #ballmagnets #reedswitch #arduino #magnets
-
Subwoofer Gets Arduino Brain Transplant - The Samsung PS-WTX500 subwoofer is designed to be used as part of a 5.1 channel home theater system,... more: https://hackaday.com/2020/04/06/subwoofer-gets-arduino-brain-transplant/ #reverseengineering #digitalaudiohacks #arduinopromini #surroundsound #arduinohacks #hometheater #subwoofer #s3p70f4 #spi
-
Game On with these Open Source Arduino Buzzers - Planning a game of Hacker Jeopardy at your next meetup? You’re going to want some proper buzzers to ... more: https://hackaday.com/2019/08/20/game-on-with-these-open-source-arduino-buzzers/ #arduinopromini #arduinohacks #powerboost #quizbuzzer #nrf24l01 #buzzer #games