Add SD to Espruino WIFI ?

Posted on
  • Hi--

    I have an application in which it would be helpful to store some files on an SD card but I also require WIFI. I wanted to use Espruino Wifi and wire up an SD card. Would this work?­id=CjwKCAiAgqDxBRBTEiwA59eEN9jNicYX1kJpv­tYgUmWF2DYvxroZkwWXVljIGIftGHxOyHmsmvmaA­hoCGDoQAvD_BwE

    Also, I'm sorry if this is a dumb question. I'm a beginner with Arduino type stuff.

    Matt W.

  • Hi Matt,

    Yes, that should be ok, however ideally you'd find one without the level converter on it. Normal Arduinos are 5v but the SD is 3.3v so you need conversion logic. However since Espruinos are 3.3v you don't need anything.

    It's worth checking out:

    A quick hack is just to use a simple micro SD -> SD adaptor and just to wire to the pins - you probably already have one kicking around somewhere!

  • Cool thanks a lot. I think I do have that adapter around somewhere. I think ultimately I'm gonna need something that's PCB-mountable, but in the interim that's a very helpful tip.


  • But maybe something like this is more appropriate?

  • It's still got the level converter - this one looks fine

    Or for SD:

  • This is what I use, sd card adapter with pin header:

    2 Attachments

    • IMG_9707.jpg
    • IMG_9708.jpg
  • Thank you all. I think this will work. I'll probably need some kind of pcb because I'll need to use the SD to store a config file containing WIFI credentials and DNS info for particular installations. So my plan is to write the creds on a Mac or whatever, insert into the SD board connected to the Espruino. When the Espruino boots it reads creds and connects to wifi and starts a webserver.


  • For the record, it's actually probably a larger config JSON object that has other preference-y type stuff in there as well.

  • Wed 2020.01.22

    ' store a config file containing WIFI credentials and DNS info'

    Unless 'sneaker net' using the SD card was mandatory between the PC and the Espruino device, has the following been considered at one twentieth the cost?­vicedoc/doc0180.pdf

    A half inch by one inch PCB with jumpers along with a socket'd 8 pin DIP can be had for less than $1 USD. The chip itself, 5 for $1 USD, but might need a few supporting discreet components. I have a handful of AT24xx lying around to do the exact credential store task. Mine is used with the MDBT42Q using BLE so easy O.T.A. update/save. Just a thought. . . .

  • If you weren't wedded to SD cards there's also

    These are tiny little 3 wire devices which could easily be pushed into a bit of 0.1" socket. They don't hold a lot of data but potentially 2.5kB would hold enough JSON?

    But then you'd need the use another Espruino to program them - SD cards are definitely easy to program from a bunch of platforms :)

  • Thanks again guys. 2.5k might be enough storage, but I'm building one for my friend in Chicago and one for another friend in South Carolina. If I send them an SD card and tell them to edit it they'll figure it out. Asking them to flash a PROM might be too complicated for them.

    Also. So when my pals install their devices, I'd like to have them get updates over the internet. So basically, if it detects a new file in a particular S3 bucket, it asks "Do you wanna update?" in the JS, and then it writes the new JS files to the SD, specifies those new files in the config, and reboots. When it reboots, it does its normal routine, and loads the new JS it just downloaded.

    So the SD disk needs to hold code, potentially, as well. In fact, my idea is to make the actual application as dumb as possible, and deploy all the real code over the internet. Again, my buddies are not going to want to manage this stuff in any way more complicated than a normal app on the phone.

    What do you guys think?


    PS. This little app is a web-based autolocator/remote for my analog tape recorders.

    1 Attachment

    • IMG_3156.jpg
  • Nice!

    Yes, I think that'll be totally fine to do - I can't remember where but someone has definitely done something similar... You just read the JS file from the SD card and then eval it :)

  • Okay cool. I'll get eval all up on that SD card.

  • Thr 2020.01.23

    'I can't remember where but someone has definitely done something similar...'

    @Gordon, @allObjects and @DrAzzy to the rescue!!

    run JavaScript code from SD Card eval

    load dynamically - at runtime - module

    Load a .js file?

    Running code off of an EEPROM

    Those should provide some ideas.

    I was more facinated with the Ampex 4-track and it's sister monster.

    Most reading this thread wont have a clue as to what that aluminum block above the capstan and pinch roller is!!    or where the heck the USB port is to plug in their smart phone   ;-)

    Reminded me of a trend during the mid seventies when I would hijack my dad's Teac and mono Webcor (with a green phosphor tube wedge VU) and dup the ELO 'Fire On High' and Pink Floyd 'Empty Spaces' tunes off vinyl to the Teac, then flip the reel over and play it back on the Webcor. Most won't have a clue here either, but you will!!

    'What do you guys think?'

    Matt, after reading the #11 post explanation, SD card it is.

  • Cool! Thanks for the info! I'm meeting up with my friends today so this will be helpful.

    And yeah, I get it re: Teac. ;) The Ampex is set up as a 2 track altho I do have the 4 track block. The other machine -- Otari MTR-90 mk 2 16 track 2"-- is the one we're doing first. We did a very bad version of hardware and software using an Arduino with a PHPOC shield. It's just not the right idea. But it should be up and working today. I'll post a video if its not disastrous.

    But yeah, as soon as the Espruino comes we're gonna ditch the PHPOC.


  • After a day of wrestling with the crappy PHPOC shield, we're ready to try the Espruino. We did manage to read the tachometer and compute counter time accurately and issue all the transport commands.

    Here's a little vid of me and my buddies playing with the current iteration.


  • Amazing, can't wait to see more!

    You should think about writing a tutorial along with your development.

  • Sat 2020.01.25

    Matt @mattw I actually could feel the wind blow my hair back during rewind using the Otari! Man, can that transport move!!

    'After a day of wrestling with the crappy PHPOC shield'

    What type of issues were you running into?

    I had a thought while imagining how the solenoids were tapped into. Was it as simple as bridging the momentary contact in parallel and use the internal Otari electronics to control the solenoids? Just wondering how the EspruinoWiFi would be connected? A driver chip, optoisolation, just plain old transistors?

    I agree with @MaBe in post #17 on considering an ongoing tutorial, or even a listing under the projects heading. AFAIK, no one yet has anything close in coolness to what you guys are working on with audio equipment.

  • The PHPOC shield has a separate flashing process that needs to be done in Windows. We don't have a Windows machine so we're running this VM which doesn't always work. It works like 30% of the time so updating code is a hassle. Anyway, once the Espruino gets here it'll be way easier. We'll redo the "server" code in JS and refactor the client in React. It'll be all JS with a simple USB process to update code for now. (Later on, we'll load from the SD.)

    So yes, @Robin it works as you described. We have the ins and outs of the Arduino hooked up to a 25 pin Honda connector at the back of the machine. We're basically reading tach pulses and tape direction to do the counter, and sending hi or low to issue the transport commands. The Otari machine controls the motor functions-- we just issue commands.

    I'm not sure what we're gonna do when we get this software fully done. But we should prolly do something. It would be amazing to have someone work on the code with us, but how many Otari owners also code. Anyway, thanks to you for your help!


  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Add SD to Espruino WIFI ?

Posted by Avatar for mattw @mattw