I would like to use the pHAT to read from encoders that need to be powered with 5 V, making the enc A and B outputs 5V instead of 3.3V. Could I power the encoders using the 5V from the pi? Would 5V pulses from enc A and B damage the ATtiny84? From the schematic I can’t tell if the ATtiny84 powered from 5V or 3.3 on the pHAT.
Thanks!
5V into the ATTiny is going to be a problem since it’s running at 3.3 volts. You’re going to need some sort of logic level conversion between your encoders output and the input to the Auto pHAT.
Thank you! I’ll get one and try it out.
I also have an encoder on my motors that are powered by 5V from the robot’s power supply. But it must already have a level shifter because when I measure the voltage between ground and either A or B on the motors it reads around 3.3 volts. As I spin the wheel the voltage goes to 0V, then back to 3.3V.
I tried to just hook the two output wires from the encoder to the AutoPHAT A & B terminals. But I get an error when running the example python code “ex1_qwiic_dual_encoder_reader.py”. Says “Error connecting to Device: 73, Remote I/O error The Qwiic Dual Encoder Reader device isn’t connected to the system. Please check your connection”
I also tried powering the encoder from the AutoPHAT +/- terminals but that gives the same message.
Should the ATTiny84 be able to work on the AutoPHAT with just the A & B wires connected to it? There is a ground wire between my robot and the RPi & AutoPhat main header.
Should the ATTiny84 be able to work on the AutoPHAT with just the A & B wires connected to it?
Theoretically yes, but we have only tested the Auto pHAT with the [hobby motor with encoder that we carry.
If you’ve attached a different encode that outputs more than 3.3 volts, that could potentially damage the ATTiny84 and that might cause the error you’re seeing.](https://www.sparkfun.com/products/16413)
Turns out the gpio pin for my power button’s shut-down operation on the Raspberry Pi needed to be moved off of pin 5 because that’s what the i2c is using.
EllieOwen:
But it must already have a level shifter because when I measure the voltage between ground and either A or B on the motors it reads around 3.3 volts.
Hi, I’m also trying to run encoders with a 5V logic level (it would have been great if there was a jumper on the board to achieve this). Ellie, do you think it’s your encoder that has the logic shifter? My encoder is a very basic (IR) optical encoder circuit, so I doubt that it has anything that fancy…
Would something like this https://www.sparkfun.com/products/12009 achieve what I need? I was thinking of supplying the 5V from the servo motor pins on the Auto pHat that I’m not planning to use. Is that reasonable?
Apologies, I am quite new to the world of electronics. Cheers, Greg.