Oddity to me on the docs (how I see it)...

Once Again I am Here,

Sensors — BeagleBoard Documentation

So far, I think this photo is a bit off. There is an empty PWR (3.3v) populating the breadboard…

  1. One would think 3.3v is needed to power the rotary dial.
  2. I will test this idea soon so I can be sure, i.e. as I do not mess w/ rotary dials much so far.
  3. If you use rotary dials a lot or some in the past too, please chime in.

Seth

P.S. After testing w/ a purchased rotary dial, a particular dial in general, I will update the docs. so people do not 3.3v the breadboard w/out it leading to some part of the dial. It is a floating 3.3v so far.

Update

#!/usr/bin/env python
# // This uses the eQEP hardware to read a rotary encoder
# // bone$ config-pin P8_11 eqep
# // bone$ config-pin P8_12 eqep
import time
    
eQEP = '2'
COUNTERPATH = '/dev/bone/counter/counter'+eQEP+'/count0'
	
ms = 100 	# Time between samples in ms
maxCount = '1000000'

# Set the eEQP maximum count
f = open(COUNTERPATH+'/ceiling', 'w')
f.write(maxCount)
f.close()

# Enable
f = open(COUNTERPATH+'/enable', 'w')
f.write('1')
f.close()

f = open(COUNTERPATH+'/count', 'r')

olddata = -1
while True:
	f.seek(0)
	data = f.read()[:-1]
	# Print only if data changes
	if data != olddata:
		olddata = data
		print("data = " + data)
	time.sleep(ms/1000)

# Black OR Pocket
# eQEP0:	P9.27 and P9.42 OR P1_33 and P2_34
# eQEP1:	P9.33 and P9.35
# eQEP2:	P8.11 and P8.12 OR P2_24 and P2_33

# AI
# eQEP1:	P8.33 and P8.35
# eQEP2:	P8.11 and P8.12 or P9.19 and P9.41
# eQEP3:	P8.24 and P8.25 or P9.27 and P9.42

The above source is for the rotary dial or encoder which a eQEP pin can handle…

I just tested the source w/ a “near” perfect dial but used a trim potentiometer instead. It worked. I had to change the source a bit… Can you see where the source is a bit off?

A trim poti???

A quandrature encoder has two digital outputs (and may have a third index pin to reset the logic at a certain position). In example qep you can find a way how to simulate the QEP signals by the outputs from a PWM subsystem, phase shifted by 90 degrees. Another way to generate QEP signals is to connect an old (ball driven) computer mouse from Atari.

Regards

1 Like

I am going to attach a motor and test.

Seth

P.S. And yes, a trim pot. I know, it does not make sense. I wanted to test something w/ the current source given. Off to the motors!