Using a Spark Core to connect an Acoustic Guitar to the Internet

I have a research effort of using a Spark Core to connect to the Internet. The following link is to a PDF document that describes my project to this point.

Link to pdf

8 Likes

This is probably the most understated post I’ve ever seen. Please download his PDF and give it a read, holy crap @pra you have some serious time on your hands :wink:

Some eye-candy to suck in some readers…

1 Like

Ohhh… I can’t wait to get my hands on a Parallella. I’m still waiting on them to start taking orders again.

I missed the Parallella kickstarter but ordered the 5 cluster one when they opened up pre-orders for a short period mid last year, I got an email from them about 10 days ago that they would be shipping all the Z7020 based systems April 30th :smile:

if that turns out to be true I suspect it won’t be long until they open orders again

1 Like

I agree with @BDub . This is perhaps the best PDF on the Internet. It’s incredibly well-written, not boring, very insightful and informative, and not too tech heavy for us neophytes. The Vo-96 is probably one of the coolest things I’ve seen… ever.

I’m not a musician (all I can play are MP3s), but my dad has been playing for 50+ years. He even has some of the Line 6 Variax gear. I always like to see when music (guitars) and tech converge into something as cool as this. I hope he gets one!

1 Like

I hope I have such a productive retirement one day :wink:

3 Likes

I have the application up on a Linode virtual Linux server now. I chose to run CentOs linux of all the variety available, as it was/is my development platform for my Xilinx Z7000 linux platforms. The move of the application was straight forward, almost worked straight out of the box, except for the following 3 items:

  1. bcrypt didn’t install with npm. A google search quickly fixed that. I “yummed” in the gcc dev tools and openssl and npm was then fine and able to build it correctly.

  2. The latest version of Mongo doesn’t tolerate the JSON style of sort specifications that the older version did. Some toying around with different formats in the mongo query tool and the mongo docs found a solution for that.

  3. npm didn’t install the socket.io package because I forgot to put its dependency in package.json

I’m on a satellite internet link. The server is in Linode’s New Jersey data center. So communications from browser to nodejs to spark core and then back includes two round trips up and down to the satellite. Even so, its still quite responsive. The Ping of the VO-96 now takes 800-900 ms versus around 130ms on my local network.

You mat try out my app at VO-96Cloud/admin. The admin version is desktop/laptop only (meaning it works on the mac, not the IPad).

  • You can sign in using demo/demo for userid and password
  • You are an administrator = PLEASE be a kind and considerate administrator by NOT clicking anything that contain the words ADD, REMOVE or UPDATE
  • You probably need to read parts of my document to understand what to do/what is happening

Be aware the Spark Core and/or the VO-96 may not be always online, as I still have development work going on with both, and at these times they will ba attached to my private network. The application itself (node js) should always be up.

Peter

Managed to fix a few problems today:

  • Removed the old device entry and destroyed the socket it was using in node js whenever a new device registration is received from the Spark. Quick resets of the Spark could mean a new tcp connection is opened before node js realizes the old one has timed out, resulting in inputs from the Spark using the new socket and node js still sending data over the old socket,

  • Found that in my CC3000 rewrite I was not always returning the correct number of bytes received. I was not checking this value before but with the satellite latency I found I was not always receiving the # bytes requested resulting in incomplete packets being sent to the VO and checksum errors,

  • Changed the firmware upload process to use large blocks sizes between node js and the Spark (1024 bytes) to minimize satellite latency and small block sizes (128 bytes) from Spark to VO to minimize the chance of causing rx overruns in the VO during firmware updates.

1 Like

Did a “Trace Route” from my Mac in WV to the server at Linode’s Data Center in NJ. 21 hops in all:

  • 1 My Router
  • 2 -4 Satellite
  • 5 - 6 Dish Routers in Utah
  • 7 - 8 Salt Lake City
  • 9 - 10 Denver
  • 11 - 12 Chicago
  • 13 - 14 New York
  • 15 -16 A couple more in New York
  • 17 - 18 A couple in NJ
  • 19 - 20 Linode Data Center
  • 21 Server

It’s amazing this stuff works at all, let alone doing a round trip in under a second!

Since I removed the JTAG adapter and powered it directly from a wall wart, the Spark has been running continuously for more than 40 hours, doing its routine 574 accesses per minute to the CC3000.

1 Like

Should have known better and kept my mouth shut. It just failed!!!

1 Like

It looks like you haven’t been getting many replies lately, so I thought I’d contribute one. Please keep posting your updates! I read every single one. This project is really interesting. I’m wondering if my dad could track down Paul Vo and/or a VO-96 the next time he vacations to Asheville. I know he’s interested in this as well!

1 Like

Oh, I completely agree! This is a very cool project and your document reads like a NASA tech. report (in a good way)!

There is so much going on here, it is great to see!

I did some work (long-ago) that Echostar/DISH used in their set-top boxes so I know that they have pretty sophisticated predictive algorithms for the satellite internet part of their business. Really popular pages like the google and yahoo main pages appear in the downlink stream multiple time to reduce the latency you see as a user–it is sort of like a song on the radio being in “heavy rotation” as they used to say. They tried pretty hard at the time to figure out what you were going to click next and make sure it was available before you click it, but the modern interactive web must not work very well at approx. one second latencies.

I know Paul sold out the original 100 units, but I see on his web site voinventions.com that he is taking orders for another production run, delivery later in 2014. Your dad can contact Paul through his contact info on the website.

1 Like

im not musically inclined; but as an engineer, i find this project awesome! i wish the site had a better way for your work to be shared as an online project (instead of a static pdf)
regardless, great work! keep it coming.

Thanks. You can access the demo website as documented in one of my prior posts

[[quote=“pra, post:8, topic:3993, full:true”]
You may try out my app at VO-96Cloud/admin. The admin version is desktop/laptop only (meaning it works on the mac, not the IPad).

You can sign in using demo/demo for userid and password
You are an administrator = PLEASE be a kind and considerate administrator by NOT clicking anything that contain the words ADD, REMOVE or UPDATE
You probably need to read parts of my document to understand what to do/what is happening
Be aware the Spark Core and/or the VO-96 may not be always online, as I still have development work going on with both, and at these times they will ba attached to my private network. The application itself (node js) should always be up.

Peter
[/quote]

excellent.
you should definitely post your project here: http://spark.hackster.io/

For those interested in learning more about the VO-96, what it does and how it works, this is a video of a great interview and demo with Paul Vo. Interview with Paul Vo

I have been pre-occupied with the product of another kickstarter project, the “Other Mill”, which arrived a week or so ago (see image) and haven’t done much on this project until this week.

I’ve cleaned up to spark side of the application a bit:

  1. Removed all the spark cloud code as I don’t use it
  2. Converted all remaining .ccp files to pure .c to avoid using heap space
  3. Cleaned up up wlan initialization to only retain essential components and renamed the file sparkRT_wlan
  4. Added code to all fault interrupt routines to save a reason code to backup register D1 and perform a NVIC_SystenReset() to restart. The reason code is retrieved from the backup register and sent to Node JS when the device reestablishes its TCP session with Node JS.
  5. Use dynamically allocated memory for task stacks rather than statically reserved space. Terminate initialization task and release its stack space once wlan is functional.
  6. Retested thoroughly.

New memory profile = 43K flash, 1800 data, 3900 bas (this includes CoOS but without kernel memory configured. I am now running with kernel memory set at 3600 (long ints or 14,400 bytes).

I have 2 outstanding problems:

  1. Spark was failing after running for 30+ hours (Node JS loses TCP comms with it) with what I suspect is a memory leak. The new fault handling is intended to help track that down. It is currently 26 hours into a run since modifications were made.

  2. When spark fails and Node JS loses TCP connection, the web client is automatically signed out because the web socket times out. Running Node JS under Web Storm with breakpoints set to trap and debug this problem causes it not to occur, Go figure! I place the spark in “pause” under the debugger to cause the TCP session to time out and generate this failure condition.

Next I want to work on the user side of the application, including the Preset library. That effort will be intermixed with time allocated to Other Mill projects I’m sure. Now that I have the spark code cleaned up, I will work on putting “sparkRT” up on spark.hackster.io so people can use it as a multi-tasking operating system for the Spark Core.

1 Like

Looks like any memory leak has been plugged!