element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Enchanted Objects
  • Challenges & Projects
  • Design Challenges
  • Enchanted Objects
  • More
  • Cancel
Enchanted Objects
Blog 1958 Turntable from the Black Forest - 24: Up to the Clouds with Yún
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 3 Jun 2015 6:10 PM Date Created
  • Views 742 views
  • Likes 4 likes
  • Comments 3 comments
  • internet
  • mqtt
  • enchanted_player
  • enchanted_objects
  • iot
  • arduino
  • atmel
Related
Recommended

1958 Turntable from the Black Forest - 24: Up to the Clouds with Yún

Jan Cumps
Jan Cumps
3 Jun 2015

image

 

It's time to connect my turntable to the internet. We're in the last month, and I haven't sent a single bit to the cloud.

That's about to change.

I'm preparing my fixture to publish information. It's going to be a two-step exercise.

First, I'm going to share the light organ info. I'll send the state of my Highs; Mids and Lows LEDs to the world.

Once I have that working, I'm going to add speed info: is my Perpetuum Ebner running slow, fast or perfect.

 

image

 

 

 

From UNO to Yún

 

My UNO was running the light organ and servo lift code. Today's exercise is taking care that that info is ported to the Yún.

And to check that there's enough space left to talk to the cloud.

That was a fairly easy task. To cut a long story short: the code just ported straight away.

 

 

There's a tendency to play down the Arduino concept. But I'm very sold into it.

It's a great platform to try out new things with an easy step-in cost; there are libraries for so many things.

If you want to go low level, you can just do that. Nothing stops you from going bare metal.

When I have difficulties talking to a particular ship, I often turn to an Arduino to set up a prototype that I can probe with my logic analyzer.

 

And in this particular project, I can just switch to a WiFI enabled Yún. Just like that.

It's at those moments that you really understand why Arduino has had such an impact.

 

There wasn't any software issue during the switch. I changed port and board type, loaded the code, and off I went.

There is a slight difference in sensitivity of the ADC that I have to fine-tune.

I haven't found the reason for it yet, but particularly in the high frequency range, the Yún's ADC is more sensitive than the UNO's.

This results in my green Highs LED being on more often.

That's something I can compensate in software. But I'm still curious on why that happens. I'll have to pull up Atmel's data sheets.

 

The second thing to consider when porting, is the form factor of the Yún. More specific: the USB and ethernet connectors.

The protoboard that's part of the enchanted objects package doesn't fit out of the box.

This is what I have done to it:

 

image

I used my fake dremel and sliced the board in half. That way it fits on the Yún.

I loose the SMD pads - something I would have liked to use, I have some nice Texas Instruments SMD opamps - but you can't have it all.

 

image

 

 

With both hardware and software ported, I'm ready to reach for the clouds.

 

MQTT and Me

 

I have previous experience with the protocol. I've used it for my Christmas Wreath of Things.

If I'm expecting an issue, it would be space or compatibility related.

Regarding space, I'm optimistic. I tried to add the MQTT libraries to my sketch, and initialize some objects to get an appreciation of the memory use.

 

Sketch uses 16,356 bytes (57%) of program storage space. Maximum is 28,672 bytes.
Global variables use 1,138 bytes (44%) of dynamic memory, leaving 1,422 bytes for local variables. Maximum is 2,560 bytes.

 

Nothing alarming there.

 

Library incompatibility is something more difficult in the Arduino world. In particular when libraries are using lower level components of the controller.

I have issues in my design. The motor PWM engine, speed sampler and servo libraries compete for the same hardware timer.(and are incompatible because of that).

I solved that by using two different Arduinos. It's a bit silly because one ATMega has enough juice to do all the work.

The right approach would be to either find libraries that work together, or write my own firmware.

I'll leave that as an academic exercise for the reader.

I'm just hoping here that the Servo lib is compatible with the MQTT and Bridge part...

 

 

Table of Contents
Chapter 1: Fix the turntable
1: Perpetuum Ebner Musical 1
2: A Time to Kill and a Time to Heal
3: Preparation for Motor Drive
4: Motor control with Infineon Motor Shield and Arduino UNO
5: Turntable speed sample testbed with Arduino UNO
6: Turntable Speed Sensor design
7: Control Theory - End of Chapter 1
Chapter 2: First Enchantments
8: Digital Light Organ Enchantment
9: Autonomous Servo Lift
10: SMD Time - Solder the IR Speed Sensor PCB
11: Yelp - who can Help me to Compile and Run my First SAMA5D4 C Program
12: Son et Lumiere - End of Chapter 2
Chapter 3: Taming the Board
13: Breakthrough - Run my own C++ Program on the SAMA5D4
14: Digital Light Organ Input Buffer
15: SAMA5D4 Blinky
16: Scope Creep
17: Audio Sampling with 16-bit ADC ADS8343
18: Sending Files to SAMA5D4 over USB
19: Port my Light Organ from Arduino to SAMA5D4
20: Fast Fourier Transform on the SAMA5D4 - End of Chapter 3
Epilogue: Reaching for the Clouds
21: Right-Sizing my Plans
22: My Own C++ Buffered Sampler on the SAMA5D4
Interlude
23: Building In the Motorized Light Organ
24: Up to the Clouds with Yún
25: Publish or Perish
26: Turntable Finished
Stretch & Boni
Bonus 1a: Remote Light Organ with WiFI pt. 1
Bonus 1b: Remote Light Organ with WiFI pt. 2
Grande Finale: Paho MQTT Client on the SAMA5D4
Related blog
Vintage Turntable repair: Can I fix a Perpetuum Ebner from 1958
Review 1: Atmel SMART SAMA5D4 Xplained Ultra Unboxing and First Steps
Review 2: Atmel SMART SAMA5D4 Xplained Ultra - Building the Libraries from Source
Review 3: Digital Continuous Rotation (360°) Servo Part 1
Review 4: Digital Continuous Rotation (360°) Servo Part 2
Review 5: Atmel SMART SAMA5D4 Xplained Ultra - TCP/IP running
Review 6: Atmel SMART SAMA5D4 Xplained Ultra - LINUX Distro with SSH support
poem
Enchanted Objects: Let's work together to tame the ATMEL SMART SAMA5D4 Xplained Ultra kit
17 bis: Off South...
Review 7: Atmel SMART SAMA5D4 Xplained Ultra - C++ ADC Example on Linux
Review 8: Atmel SMART SAMA5D4 Xplained Ultra - Product Review
Review 9a: Atmel SMART SAMA5D4 Xplained Ultra - Set up ADC Buffer with Hardware Trigger Part 1
Review 9b: Atmel SMART SAMA5D4 Xplained Ultra - Set up ADC Buffer with Hardware Trigger Part 2
Review 10: Atmel SMART SAMA5D4 Xplained Ultra - New Content on AT91.com
1958 Turntable from the Black Forest - Summary of the Enchanted Player Story
  • Sign in to reply

Top Comments

  • Jan Cumps
    Jan Cumps over 10 years ago +2
    My turntable is sending spectrum data to the cloud: What you see is 64 buckets across the audio spectrum, quantified for the amount of signal in each bucket. I can now do 4 things (and more ): - build…
  • Workshopshed
    Workshopshed over 10 years ago +1
    I don't think there should be issues between the bridge and servo, it's using hardware interrupts to handle tx,rx and handshake lines. I should hopefully be pulling everything together over the next week…
  • balearicdynamics
    balearicdynamics over 10 years ago +1
    I love this project! Expect at least 2 min video as it has been finished Enrico
  • Jan Cumps
    Jan Cumps over 10 years ago

    My turntable is sending spectrum data to the cloud:

     

    image

     

    What you see is 64 buckets across the audio spectrum, quantified for the amount of signal in each bucket.

     

    I can now do 4 things (and more image ):

    - build a remote light organ that subscribes to this message and flashes its lights

    - build a wireless spectrum analyzer (I could do this with a 16 character LCD, and group some of the channels together)

    - ask others to subscribe to my broadcast and build a thing that reacts on my audio

    - build a software light organ or spectrum analyzer that displays info on the signal.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 10 years ago

    I love this project! Expect at least 2 min video as it has been finished image

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 10 years ago

    I don't think there should be issues between the bridge and servo, it's using hardware interrupts to handle tx,rx and handshake lines. I should hopefully be pulling everything together over the next week so will let you know if I spot any issues. I'm planning to turn off my servo between moves so might end up modifying the library to handle that.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube