Go Down

Topic: DFPlayer Project Idea, Go/Nogo? (Read 819 times) previous topic - next topic

yogi15

Hi all, New here with some question about a project Idea.
  Lately I've been interested in the old phone phreaking recordings and really like the mash-ups done by ElmerCat, https://soundcloud.com/elmercat/didja , using samples of the old Ma Bell recordings, very cool. So I got an idea of a HW player loaded with some of these files and being able to do live mashups. But with a different set of samples could be any sort of FX box.
  The plan is sort of a dual MP3(wav) trigger box. A ProMicro controlling two DFPlayer Mini MP3 players. The UI would allow queuing Folders on Player A or B and triggering files from a 3x4 keypad and/or two encoder knobs. The display would be two 4 digit LED displays showing the folder# and file #, I.E. '1202' would 'dial' folder 1, file 202.
  The first hurdle would be the serial ports, with the Promicro- the USB, HW serial (for future MIDI control) and two soft Serial Tx only ports @ 9600 for the DFPlayers. In addition, will use SPI for UI serial register IO. I found Nick Gammon's mod to the softSerial lib, http://forum.arduino.cc/index.php?topic=112013.0 and hope this will work with two instances.
 Questions:
  1. Is this too ambitious for the ATMega 38u2?
  2. Is there a better way to handle the two Tx only ports? Had considered a HW mux to route the Tx but still using 2 pins so seems better to handle it in software.
  3. Will there be problems with the different Libs, I.E. the softSerial and MIDI and SPI and whatever?
Thought?
Yogi

Grumpy_Mike

It could be done, but whether you can do it is an other matter.

Quote
A ProMicro controlling two DFPlayer Mini MP3 players.
OK.

Quote
1. Is this too ambitious for the ATMega 38u2?
No.

Quote
2. Is there a better way to handle the two Tx only ports?
A 38u2 has a USB port as well as a hardware port, so one instance of software serial only would be needed.

Quote
Will there be problems with the different Lib
You can have no idea until you get your plans more solid.

yogi15

It could be done, but whether you can do it is an other matter.
OK.
No.
A 38u2 has a USB port as well as a hardware port, so one instance of software serial only would be needed.
You can have no idea until you get your plans more solid.
Thanks for your input Grumpy_Mike. A little concerned about the Flash/Ram limits, kind of spoiled by the 18F PICs. With 96K of Flash and +3K Ram you can do alot and 'not bump your head' too often.
 The softSerial ports will service the DFPlayers as Tx only, and Serial and Serial1 will be used for midi traffic. I'll be investigating Nick Gammon's SendOnlySoftSerial Lib mod to minimize pins. As I understand, the DFPlayer is readable but very minimal so just using them with Tx only will be fine for me.
 The total design is still a bit of a WIP, but settled on the UI displays. Had ordered some quad 7 segment LED displays but decided to use some ol'skool 7seg displays I have OH. They are Dailight 745-0007; each display has a built-in latching Hex to 7 seg decoder and a constant current driver. The UI will have two groups of 3 displays bussed on a MCP23017. No need for a multiplexor chip to drive a common cathode array; just latch data into each display, good to go till you need to change the display data. Have a basic test sketch happily counting on one display via the Wire lib ATM.
  These displays are very attractive (to me) and very retro. The LEDs are arranged as a sort of dot matrix in a standard 7 seg form; each segment is composed of 3 surface mount LEDs and extra LEDs in the 'corners' as needed. This allows for example, an 'E' to display very readable and not like a backwards '3'. Here is a Youtube (by someone else):
https://www.youtube.com/watch?v=8eDnIMDzUg4
  For the UI input, planning on a 3x4 keypad and two BCD thumbwheels I have. These will be on a second MCP. I had been working on code to use the Keypad_MC17 Lib extension, but while googling around today, found a relevant thread in the Exhibition/Gallery forum using a 74C922 keypad encoder.
http://forum.arduino.cc/index.php?topic=211548.0
 So this chip sounded familiar and on checking, found it's bigger brother in my parts bins, the 74HC923. Though, using the chip will not really save pins on the MCP (6 pins for a 20 key matrix so a few less then the Lib would need for a 4x5 matrix) BUT it will save instruction cycles with no scanning overhead on the AVR.
  Plus, accessing the key data is straight forward via the Wire lib. The MCP will use the HC923's DA flag to trigger a Int-on-change, capturing the GPIO port's pin state. Not sure if I'll poll The INTn pin or put a semaphore in a ISR to process key presses but the timing isn't too critical with the MCP's latch.
   So a 3x4 KP plus some discreet NO switches on the scan matrix chip with very little software overhead. WIN :)
  The other port on this MCP will have BCD Thumbwheels, but these are pretty simple to read. The ones I have can be used as either active high or active low, having both a Common and a inverse Common. Using one common the BCD switches are active opens and using the other common the switches are active closed, pretty cool. Got some thumbwheel test code ready for when I get a second MCP on the breadboard.
Yogi 
   

Go Up