The Thrifty Bot - Product Releases & Updates

They have just about every color imaginable on Amazon now

8 Likes

Introducing the Thrifty Absolute Magnetic Encoder!


This is a project I have been working on for quite some time, and we are happy to finally release it to the world! In a nutshell, it is a low cost absolute encoder all-in-one solution targeted primarily at swerves. We have created a trio of cases to help interface it with all COTS swerve options, and we are excited to see what other uses teams come up with.

It outputs a 12-bit analog signal relative to the magnet’s diametric position and interfaces with any standard PWM-style cable (included).

Let me know if you have any questions! All parts are genuine and the PCB was fabricated and assembled in the USA.

Edit: Forgot to mention: it is very smol. Also shoutout to @marshall for the beta feedback!
image

52 Likes

Custom encoder mounting is something I have tried once or twice unsuccessfully. With 3d printing and better machining I would be confident in trying this again. Reading this and the document on the CTRE encoders, it sounds like I would need to chuck my shaft in a four jaw chuck and offset it slightly so the magnet is not on the exact center of the shaft? In the documentation from CTRE it kind of sounds like you can get away without offsetting the magnet though. Anyone able to clarify this.

1 Like

[quote=“Smtopps, post:687, topic:361334”]so the magnet is not on the exact center of the shaft
[/quote]

What?

The encoder is looking for the orientation of the magnetic field, not the strength. Magnet should be concentric to shaft, and concentric to sensor.

Even better, this product ships with a case included for maximum convenience.

I don’t know what’s “custom” about this setup that you’re referring to…

2 Likes

We tried mounting a mag encoder for an elevator in 2018. don’t remember exactly what it looked like but we drilled a hole in the center of the shaft for the magnet (that’s kind of what I meant by custom as supposed to using a hex bore housing like what is available now). We had lots of problems for various reasons and poor mounting location of the sensor. we ended up just buying a neo.
image
This is what I was reading from the Mag encoder and Cancoder user guide. I was confused since I thought it worked with the magnet being on the center of the shaft.
image
This is the one from thrifty bot user manual that also confused me.

Offset is in the Z direction. You want some space between the magnet and the top of the IC.

1 Like

Sam,

Is the center of the IC in the center of the PCB?

1 Like

Can’t emphasize enough, the magnet should always, always, always be concentric to the shaft. Whatever is holding the PCB needs to hold it in such a way that the center of the IC is lined up with the center of the shaft. Spacing between the magnet and shaft (Z) is important but not near as important getting the magnet and IC center aligned.

Any misalignment in the X,Y will show up as a nonlinearity issue.

3 Likes

Yes.

2 Likes

Will it work with the FTC control system? Our middle school team discovered the hard way this year that, apparently, many COTS “Absolute Encoders” will only function in Incremental mode on the FTC control system for some reason (looking at you, REV Hex-Bore Encoder).

Also, is there/will there be any sample code available for this?

It does. That says it must be within 0.25mm of center, and ideally concentric. Not that you should aim to mount it 0.25mm off center. The engineer who wrote it got caught up in defining the tolerance at the start of the paragraph, instead of first defining the goal and then defining the tolerance.

4 Likes

This encoder seems to need 5V power, and then outputs a signal 0-5V.

The FTC Control hub appears to accept inputs from 0-5V, but only has a 3.3V power on that particular slot.

You could probably get creative, and find a 5V source for it. You could use one of these guys on a digital port.

It is possible the sensor could run on 3.3V, but @samthesnake would have to confirm or deny that. I don’t see any information about that in the provided datasheet.

I personally haven’t used the FTC control system, but have used other similar systems. Its doesn’t appear to be super simple, but it looks possible from my initial investigation.

Sensor will run on 3.3V. I’m not familiar at all with the FTC control system.

2 Likes

Got it.

I’ve have only messed with FTC control systems a little, but looking at the manual, I think it would work. A team would have to make a custom cable, but it should program similarly to the Rev Potentiometer.

I’ve not personally tested it (obviously) but I think it should work. Feel free to check my work (manuals are linked above).

That is pretty awesome that the sensor also works on 3.3V systems. I can think of some non-FRC/FTC applications where this could be handy.

That converter could potentially be used to convert the 5V power rail, but only converts digital logic levels, so the signal wire would have to be custom wired “around” the level converter.

Another option is provided on the Rev control hub/expansion hub which has auxiliary +5V outputs to provide the needed 5V source. I think this should be legal (and I am a certified FTC LRI) – but you might want to confirm via the Q&A. Still, custom cables / cable splicing would be required.

Specifically, on FTC legality, I am looking at rule <RE05>a “Allowed electronic devices may only be powered by power ports on the REV Expansion Hub or REV Control Hub except as follows:” and sub item iii. “Allowed sensors are powered by the REV Expansion Hub or REV Control Hub: analog, digital, encoder, or I2C ports.”.

By my reading, allowed electronic devices:
– would include this sensor and associated cabling
– would be powered by “power ports” on the control or expansion hub (I don’t see anything saying the 5v auxiliaries don’t count here)
– The subclause iii. simply expands this to say sensors can ALSO be powered from analog, digital, encoder or I2C ports. I don’t think that applies here as you want 5V and those only provide 3.3V.

Note on the 3.3V option - for best practices, shorting pins 1 and 2 of the IC is highly recommended. A nice solder bridge will work fine. The manual will be reflected to say this.

4 Likes

Super cool! I did not enjoy mounting the other type of magnetic encoder with its fiddly multi-pin cable :wink:
What chip is used on this? I’d like to go read the data sheet… Is this a ratiometric sensor (like a potentiometer)? IE, if the power supply is 5.3 Volts, the output is 0-5.3 Volts? And, really, the output can’t be 0-5.3 Volts; rail to rail outputs only get “pretty close” to the rails. I think folks are going to need/want a bit more stuff from the data sheet.
You probably want to have a bit of verbiage on the calibration procedure for this: doing a few full turns and finding min/max levels to go into the firmware. If its ratiometric you may need to measure the supply rail to deal with variations.

1 Like

It is ratiometric. I will update the manual to clarify “operating conditions,” as you are right, they are different from the absolute maximums found in the present manual. As for the “pretty close” verbiage, check your PMs.

Fun datasheet! Thanks @samthesnake !!!

So, for the interested parties: the analog output doesn’t want to see anything lower than 100 kOhm load for 0-100% operation. The data sheet doesn’t tell you what the output resistance of the analog output pin is, so you can’t calculate how close to the rails you will get. For the high impedance input on the RoboRio, you should get very close to the rails.

There is a 10 Least Significant Bits hysteresis that happens when you run all the way to the min or max before you go back into normal operation. SO, when you sit at 0/360, it will not chatter on you; you will get a nice stable zero or VDD signal. 10 LSB steps is -tiny- on a 12 bit chip!

Looks nice on the electrical side!

2 Likes

Available now: QTY 8 - 90 Degree Elevator Gussets

image

A gusset designed specifically for elevator applications. This 90 degree gusset maximizes space between the edge of the gusset and the wall of your tubing while still allowing you to use typical 1/2" hole spacing.

More good stuff to come here in December :slight_smile: stay tuned

40 Likes