Page 8 of 16

Re: SD player UI development

Posted: Wed Apr 18, 2018 9:55 pm
by randytsuch
BTW, these ESP's are amazing for the price. And for IOT/HA kind of tasks, are pretty nice.

I have a Pi running Domoticz (Home Automation software), which is basically the controller and human interface.
The ESP's talk to the Pi. I have scripts running in Domoticz, and can control Domoticz though apps or a web gui.

I have relays connected to ESPs, lets me do things like control sprinklers.
I also have connected reed switches (magnetic switches used in home alarms) that do things like tell me if the garage door was left open too long.
The most useful application has been that I get texts if the freezer in the garage has it's door left open. Sometimes the door is slightly ajar.

Randy

Re: SD player UI development

Posted: Wed Apr 18, 2018 10:17 pm
by jkeny
Yes, sounds good, Randy
What optocouplers are you using?

I'm coming around to thinking that the SD card should only be used as the playlist storage, not as the storage for the music library - it makes navigation/synching easier between control device & SDP

And if we delete the song from the SD card when finished playing & do a reset, then we are always playing the first file on the list. Maybe we/I am expecting too much functionality from the control program - perhaps all it should do is add/delete songs from playlist & the SDP just acts as the player of the songs on the playlist, always playing the first song (which changes when the last played song is deleted)?

Re: SD player UI development

Posted: Wed Apr 18, 2018 10:39 pm
by randytsuch
4n26 opto, cheap garden variety one.

I bought a bunch of them for a few bucks, so have plenty for this project.

I think I like this last idea, copy and play a song then delete. Repeat for all the songs you want to hear.
Nice simple approach.
I guess you can copy the next song while you are listening to the current one, so should have no/little waiting time.

Then you just need play, skip and repeat buttons I think.

Randy

Re: SD player UI development

Posted: Wed Apr 18, 2018 10:53 pm
by jkeny
Yea, then the SD player just acts like a FIFO playlist buffer - don't need to worry much about navigation - it's probably a good starting point & functionality may develop from there?

I copied a 400 MB audio files while current song was playing - no effect on sound & took 2.5 mins - so very doable

Re: SD player UI development

Posted: Wed Apr 18, 2018 11:00 pm
by nige2000
will the arm chip like been reset every track?
almost sounds like a streamer....

modern sd cards are supposed to do up to million writes, and spread that out to prevent hot spots

Re: SD player UI development

Posted: Wed Apr 18, 2018 11:07 pm
by jkeny
nige2000 wrote: Wed Apr 18, 2018 11:00 pm will the arm chip like been reset every track?
almost sounds like a streamer....
Don't think it will mind :)
modern sd cards are supposed to do up to million writes, and spread that out to prevent hot spots
Yes, the constant writing/deleting from the SD card did worry me a bit - how long do we reckon 1M writes would take? 1 million songs @ 3 mins per song - 50,000 hours or 2083 days or ~300 wks ~6 Years of continuous music playback

We should be OK :)

Re: SD player UI development

Posted: Wed Apr 18, 2018 11:33 pm
by randytsuch
These cards have sophisticated controllers for wear leveling, and also have spare memory they can map in as required

So they will move around the card, and not write to the same spot all of the time. And when cells wear out, the controller maps in new memory cells to replace the bad ones.

And if we are writing a couple hundred meg to a 16 or 32gb card, it will be last a long, long time.

Randy

Re: SD player UI development

Posted: Thu Apr 19, 2018 10:59 am
by nige2000
when all settles down we can drop the screen, as it is no longer is useful/ maybe just switch it off

Re: SD player UI development

Posted: Thu Apr 19, 2018 3:33 pm
by randytsuch
Programmed my esp (wemos mini d1) yesterday, and updated these instructions based on what I did

https://sites.google.com/view/randy-wik ... os-mini-d1

Also updated this page on how to setup esp, and get it started
https://sites.google.com/view/randy-wik ... p-esp-easy

I haven't configured the board yet, that is the next step, along with building a little opto circuit which hopefully can drive the switch circuit.

BTW, I used the mini d1. They have a mini d1 pro which has more memory, which when I was working with it last year, made it much harder to program. The mini d1 should be fine for this project, so I recommend using it.

Randy

Re: SD player UI development

Posted: Thu Apr 19, 2018 3:38 pm
by nige2000
If we're pretty sure were using that esp
we should get some ordered for ireland?
Assuming the delivery takes a while
Where to get?