element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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 - 6: Turntable Speed Sensor design
  • 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: 28 Mar 2015 10:34 AM Date Created
  • Views 1726 views
  • Likes 4 likes
  • Comments 8 comments
  • motor_driver
  • ir_sensor
  • kicad
  • enchanted_player
  • enchanted_objects
  • sample
  • pwm
  • arduino_uno
  • arduino
Related
Recommended

1958 Turntable from the Black Forest - 6: Turntable Speed Sensor design

Jan Cumps
Jan Cumps
28 Mar 2015

image

 

 

The basis for my turntable enchantment is almost done. I'm very close to having a working turntable.

Let's have a look at the speed sensor circuit today. One of the very last things to complete for this basis part.

image

The Speed Sensor

 

The sensor is an infrared opto-coupler. It was component of a 'for parts' video recorder.

image

 

I've placed one of those under the stepped pulley of the Perpetuum-Ebner. I painted the underside of that pulley in a non-reflective color.

Then I glued a small piece of mirror (it's actually a piece of shiny foil that I removed from a toy of one of my girls) on that.

The infrared transmitter is always on.

When the mirror is above the coupler, the receiver conducts. When the mat paint is above the pair, it goes into high resistance..

 

image

The Sensor Circuit

 

My sensor circuit has two duties. It has to power the tx, and it has to translate the state change of the receiver into a signal that we can feed into the Arduino.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image


Powering the IR light sender is easy. In this circuit, it's always on. We'll power it from the Arduino's 5 V.

image

With the setup above, we'll get a constant IR beam pointing to the underside of the pulley.

 

tip: you can see that an IR LED is emitting light by looking at it with a digital camera.

 

image

 

The receiver is set up as a voltage divider.

image

When the light is not reflected, the receiver's internal resistance is much higher than the 10K resistor in series.

The effect is that almost all of the 5 V source will be over that receiver.

So the signal is high when the mirror is not above the opto-coupler.

 

When the mirror is above the sender and receiver, the beam of the sender reaches the receiver. Its internal resistance is low when agitated by the beam.

In that case, the 10K series resistor is the dominant component, and most of the 5 V  source will be over that resistor.

The voiltage over the receiver will be close to 0 V.

So the signal is low when the mirror is above the opto-coupler.

 

I have added an inverting amplifier to that output. It's just your usual high gain one-transistor setup.

image

The high gain will do a few things with the signal. It removes a bit of the noise when the infrared beam bounces against the dark part of the pulley.

The paint is not evenly applied (it is actually just blue sharpie ink). The transistor is driven into full saturation when its input driven.

So the noisy high input signal becomes a clean low signal (inverting amp!) at the output.

The second achievement of the amplifier is to make the edges of the signal sharper. The high gain takes care that the transistor is quickly switched on and off.

image

 

This turns the analog input signal into a nice digital one.

 

output after the amplifierzoom in of one amplified pusle
imageimage

 

 

The Prototypes

 

I've made two prototypes. The first one on a breadboard, so that I could test the firmware, tweak some values and make design changes if needed.

image

And as a temporary solution that I can build into the table, I've soldered the circuit on Veriboard.

This is really temporary. I'm making a tiny SMD print for the final sensor circuit.

 

The Final Sensor Board

 

image

 

I've made a PCB design in KiCAD. I've made a choice a while ago to never ever return to through-hole, so this is an SMD design.

The KiCAD sources, and the fab files for OSH Park are attached. I've designed the PCB for hand soldering.

 

This is the schema:

image

 

 

And this is the PCB layout:

image

I settled for a single side design. If I'd take the proper time to make a double sided design, I believe I could reduce the size to little more than what's needed for the headers.

 

The gallery shows a few of the previews that OSH Park presents when you upload the fab files.

I like that they show all aspects of how your board will look like after production. Some errors like drilling hole mismatches show very well in their report.

I always take the time to review the OSH Park rendering before committing the funding for the PCB.

 

 

{gallery} OSH Park PCB preview

image

Preview 1:PCB back

image

Preview 5: can't remember image

image

Preview 6: can't remember image

image

Preview 7: Component outline

image

Preview 9: PCB front

 

It will take at least 15 days for the PCB to arrive. Meanwhile the Veroboard proto will do the sensor duty.

 

 

Side story: Perpetuum Ebner

 

The two Steidinger brothers were born in a watchmaker family. It's only natural that their first steps in the industry were watch related.


The Black Forest watch making tradition is very different from what was happening in Swiss at the time. In Swiss, they were specializing in wristwatches. There was a thriving industry then, and there is still one now.

In the Black Forest, the clock industry was evolving around furniture clocks. The mechanics were only one part of the work. There was also a big woodworking guild that specialized in the typical rustique cabinets that we still link to that region. The cuckoo clock may be the best known article.


The brothers were making mechanical parts for those clocks. Each on their own, in their own small start-up.

In their spare time they started to experiment with early phonograph mechanisms. The early record player designs shared quite some things with clocks. The feather motor that powered so many clocks at the time was also used by the first phonograph manufactures.


The Steidingers were looking for options to broaden their gamma. Business was not great in the pre-war era. If they only could find something that made more money than those clock parts, where the competition was fierce.

Almost every village had a clockwork workshop. But no one was in the phonograph business yet.

 

 

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
Attachments:
enchanted_table.zip
  • Sign in to reply

Top Comments

  • Jan Cumps
    Jan Cumps over 10 years ago +2
    I've added a capture of the sensor signal before and after the amplifier for comparison of the slopes.
  • Workshopshed
    Workshopshed over 10 years ago +1
    Great stuff, good practice to have that simple amplifier as close to the sensors and possible so putting it all on a PCB is a good idea.
  • Jan Cumps
    Jan Cumps over 10 years ago +1
    Baked in the pizza oven. I had to rework the transistor with hot air because it wandered around a bit.
  • Jan Cumps
    Jan Cumps over 10 years ago

    Baked in the pizza oven. I had to rework the transistor with hot air because it wandered around a bit.

    image

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

    1206 and SOT23

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 10 years ago in reply to Jan Cumps

    What size components did you go for? 0402?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago

    teaser image

     

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago

    The control firmware is finished. The table is now running at a constant speed with feedback regulation. I've added a slow - ok - fast LED display for visual feedback on the regulation.

     

    The 8 seconds video below shows the regulation with a little hysteresis (to make the video flashy image - with optimized hysteresis the green led is on almost always).

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

    • Cancel
    • Vote Up 0 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