0

Rotary Encoder and 7 segment display
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Rotary Encoder and 7 segment display

by RocketKev on Fri Aug 09, 2019 2:01 pm

Hi All,

I am wanting to build a small counter that I can mount on a hand winch. I want to be sble to use a rotary encoder on shaft from winch, and 4 digit 7 segment display to then output a number to indicate how many turns the motor has made.

I need to be able to package it all in a fairly small form factor and be battery powered.

I dont have much experience of Arduino at all, but found a few web pages and posts.

I am looking at a quad alphanumeric display board, thought it could run with a 5v Pro Trinket. My rotary encoder is a 5v encoder, like this one https://www.ebay.co.uk/itm/600P-R-Photo ... SwkelcJujr.

I then thought a LiPo battery pack and charger board.

am I on the right lines, can all this work, any help would be great.

RocketKev
 
Posts: 6
Joined: Sun Jun 10, 2018 10:54 am

Re: Rotary Encoder and 7 segment display

by adafruit_support_mike on Fri Aug 09, 2019 11:59 pm

The encoder you linked says it emits 600 pulses per revolution, which will give you resolution below 1 degree. How much resolution do you want?

adafruit_support_mike
 
Posts: 59148
Joined: Thu Feb 11, 2010 2:51 pm

Re: Rotary Encoder and 7 segment display

by RocketKev on Sat Aug 10, 2019 5:10 am

Hi Mike, resolution may be slightly different on encoder I have, cant check at moment. Resolution I might need to be able to adjust by some form of equation. The winch is used on stage to move scenery, so the numbers are to give a position to the operator. Winch drums vary in size and so I need to be able to get position of scenic item to within a few millimetres.

most drums have maybe a 1m circumference, so this gives a rough idea of what I am after, i hope.

A bit of a vague answer I know, but hopefully helps a little.

RocketKev
 
Posts: 6
Joined: Sun Jun 10, 2018 10:54 am

Re: Rotary Encoder and 7 segment display

by adafruit_support_mike on Sat Aug 10, 2019 6:02 pm

Knowing the application helps, and it does sound like you'll need good resolution.

You can use a microcontroller to read signals from the encoder and drive a 7-segment array. You'll only have a few signals to deal with, so a Trinket M0 could do the job:

https://www.adafruit.com/product/3500

We have 7-segment arrays with I2C controllers, so you only need two pins to control them:

https://www.adafruit.com/category/103

You could also use a Feather 32u4 or M0 and the 7-segment FeatherWing:

https://www.adafruit.com/product/2771
https://www.adafruit.com/product/2772
https://www.adafruit.com/product/3107

Those are a bit larger, but all the connections are pre-made and they're designed to run from LiPo power.

adafruit_support_mike
 
Posts: 59148
Joined: Thu Feb 11, 2010 2:51 pm

Re: Rotary Encoder and 7 segment display

by RocketKev on Sun Aug 11, 2019 2:45 am

Hi Mike,

thanks for reply. Main reason I was considering the trinket was becasue the encoder is 5v, so thought if I needed to run 5v to that it might be better to run it all at 5v?

I was thinking the quad 7 segment backpack to reduce number of pins needed if using trinket.
https://www.adafruit.com/product/1911

I do like the idea of running the 7 segment as a featherwing though, seems to make life a little simpler and take up less space if all fitted onto feather, and with built in charging it would make things a lot simpler with less bits to worry about. So my only issue now is power to the encoder. I think I need to read up and take a look at things and see what could work.

I may well be back with more questions.

Any ideas on coding would be great, seen a few Youtube and webpages with various similar bits that might be usable, but until I get hardware worked out, not really concentrating on it too much as yet.

RocketKev
 
Posts: 6
Joined: Sun Jun 10, 2018 10:54 am

Re: Rotary Encoder and 7 segment display

by adafruit_support_mike on Sun Aug 11, 2019 12:43 pm

Encoders are usually passive devices.. mostly an array of carefully-spaced switches. They usually work from any supply voltage.

If yours specifically needs 5V, it isn’t hard to reduce the voltage. Just connect a 22k-33k voltage divider between each output and GND, and connect the middle of each divider to one of the Feather’s GPIO pins. The voltage dividers will lower 5V signals to 3V.

We also have alphanumeric FeatherWings if you’d prefer to use one of those:

https://www.adafruit.com/product/3130

adafruit_support_mike
 
Posts: 59148
Joined: Thu Feb 11, 2010 2:51 pm

Re: Rotary Encoder and 7 segment display

by RocketKev on Sun Aug 11, 2019 1:11 pm

Hi MIke,

think I will get some bits ordered to start to play with. I do like the idea of the feather, so if I can power encoder from 3.7 liPo as well then it would all be good. is there a direct power output I could use from feather to encoder?

RocketKev
 
Posts: 6
Joined: Sun Jun 10, 2018 10:54 am

Re: Rotary Encoder and 7 segment display

by adafruit_support_mike on Sun Aug 11, 2019 2:04 pm

You can connect to the BAT and GND pins, or to the 3.3V pin instead of BAT.

adafruit_support_mike
 
Posts: 59148
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.