I know, but according to Brian, the Arduino pins that the Clock signals are assigned to pull the signal to 5 volts. His initial test worked, but he had a concern with the electronics in the readhead handling the higher voltage over a long period.
I'm not sure if you remember, but the original iGaging Absolute Origin scales don't have an external clock, the clock crystal resided in each of readheads and is in a normally high state and pulled low. I believe that's why each scale clock line is assigned its own pin on the Arduino. I think that's why he suggested the comparators, but I'll check into the LM3117's.
Unfortunately, I don't think Brian is on this forum as he could give a much better explanation than I can. You could email him if you'd like. I'm pretty confident with electrical, but much less so with electronics and tend to defer to his expertise.
I also have my own agenda in that it's a good excuse to start playing around with MSP Launchpad. Arduino seems to be easier platform for a beginner like me, but the MSP platform seems to be both cheaper and more flexible a platform. I think I remember Brian telling me you preferred it over Arduino as well.
Yes, I could just build a voltage divider circuit for each of the clock pins, but they do have to be 3 separate circuits in order to detect the clock cycles for each of the scales. Either way, he said the sketch would have to be tweaked depending on which way I decided to go.
I see... I haven't had a chance to look at his sketch yet (have been busy banging by head agains the wall working on the firmware update for the
new Shahe scales).
This is more complicated than it needs to be. I would do the following:
1. Disable pull up resistors in the chip. I.e. leave the pins floating; if needed you can hard-wire unused pins to the round to avoid noise.
2. Add a +3V power supply (you will need this to power the scales). My choice would be the LM1117-3.3, but since the scales draw very little current, a voltage divider with 2K/3K resistors should work.
3. Pull up the lines to the scales Vcc using 20K (or even better, 47K) resistors
This will give you cleaner (more square) pulses. I don't have this scale, but the newer Absolute DRO+ you have to read on the raising edge and the data line goes up right before the clock line and raises very sharply. Comparator with built-in pull-up resistor slows down the raise time, possibly to the point where the data line might not go over the threshold fast enough.
If you *really* want to have an IC between the scales and the inputs, use a non-inverting buffer of some sorts. Those are purpose-built for this sort of thing and 3.3V to 5V ICs are very common.
If you go the comparator route you still have to power the scale and provide "virtual grounds" to the comparators, so you won't be saving any parts. Basically you will be building the circuit I linked in my previous post, except in your case you don't really need it.
As far as MSP430 vs. Arduino, I prefer MSP430 over Arduino because of the tooling. I use Code Composer studio with a proper FET, so I can do debug the code, halt the chip and inspect the registers, look at the memory, etc. MSP430 has more modern perhiperals as well, but the tradeoff is a HUGE learning curve. Unless you really want to invest a LOT of time into learning embedded programming in pretty low-level C, Arduino isn't such a bad option.
Hope this helps
Yuriy
Jimmy finally talked me into joining this forum, figured it would be best if I answered any questions directly.
Like Yuriy said, the Arduino has no problems whatsoever reading the 3.3V signal coming in from the scales. The problem is the clock line. In actuality, it isn't really a clock at all, it's the "doorbell" the read head uses to tell the display unit that a data bit is being sent. The display unit provides a 3V signal to the read head on the clock line. When the read head is sending a data bit, it pulls that voltage to ground. That signals the display unit to read the data line.
Since I wrote the sketch to have the Arduino supply this voltage, 5V is being supplied. The simplest solution is a voltage divider. I'm attaching a quick schematic of the divider. It's 2 resistors and a connection to ground. Easy stuff.
The sketch uses Arduino pins 6, 8, and A0 as the clock lines, so voltage dividers need to be placed on each of those 3 pins.
If you have any questions, ask! I'll get to them as soon as I can, but I can't promise when that will be.
View attachment 286226
Hey Brian,
Good to see you here.
this makes sense. The "doorbell" line seems similar to the "Req" line use by Mitutoyo SPC scales, which is used by the host to request reading from the scale. On the newer absolute scales this line can be just pulled to the ground and the scale will send the position at about 50Hz.
Regards
Yuriy