Touch Dro Fix For Igaging Absolute Dro Scales (i Hope)

BTW Middle.Road,
For USB wired connection, connect USB to the Arduino board RX & TX connections as if using a BT module. I think it would be TX to D- and RX to D+.
Shouldn't have to connect the VCC or Gnd wires and probably good idea not to since your tablet might try drawing power from the Arduino. Result probably would't be good.
Voltage divider on TX connection might not be required either since not using BT module. I'll check on that.
 
Well, little bad news, seems the Absolute scales have a clock in the scales unlike other 21 bit scales where clock resides in the display.
As a result, the controller will have to be modified.

Here's part of a couple Emails my friend Brian sent me today:
"I just needed to lift the cover again, just like changing out the cord. It does have a crystal. Feeds back on the clock signal. looks like a way to start the data collection process. I've got a setup breadboarded together that works, I just need to figure out how to sync up data acquisition with the read head clock."
"Yuriy replied to an Email I sent to him, and he had a great suggestion. This version is going to end up being interrupt driven by the read head. I am not going to use a clock signal at all. I will use a timer so I know when it's time to shift bits, but no clock to run the show. The only voltage divider needed is going to be for the BT module (the Arduino has onboard 3.3V to power the scales)."

In short, not resolved yet, but slowly getting closer. Will keep updates coming.
 
I did find out today there's an issue with the schematic on Yuriy's Touch DRO site (http://www.yuriystoys.com/p/android-dro.html) for the wireless Arduino version.
Arduino sends out a 5V signal on its TX pin, and the HC-06 Bluetooth module can’t have more than 3.3 – 3.6 Volts coming into it on the RX pin, so you need to put a voltage divider on that line to step the data signal voltage down. This isn't shown on the schematic or discussed on the site beyond telling you to refer to your specific Bluetooth module specs.
The schematic also shows the 5V supply going to the Bluetooth module. While it may work, it's better to supply it from the 3.3V pin or it may fry your module.
Right now, the issue seems to be the way the Bluetooth module is sending data to the App that's currently not working for me. May be the voltage issue.
HC-06 does use 3.3V but most of the break out boards for it is set up with ability to use 3.3v or 5v. I power mine from the Launchpad with 3.3v.
 
Well, little bad news, seems the Absolute scales have a clock in the scales unlike other 21 bit scales where clock resides in the display.
As a result, the controller will have to be modified.

Here's part of a couple Emails my friend Brian sent me today:
"I just needed to lift the cover again, just like changing out the cord. It does have a crystal. Feeds back on the clock signal. looks like a way to start the data collection process. I've got a setup breadboarded together that works, I just need to figure out how to sync up data acquisition with the read head clock."
"Yuriy replied to an Email I sent to him, and he had a great suggestion. This version is going to end up being interrupt driven by the read head. I am not going to use a clock signal at all. I will use a timer so I know when it's time to shift bits, but no clock to run the show. The only voltage divider needed is going to be for the BT module (the Arduino has onboard 3.3V to power the scales)."

In short, not resolved yet, but slowly getting closer. Will keep updates coming.

JPigg55,
I'm pretty sure Arduino can handle these scales, but the implementation will need to be very "slim" (highly optimized). I've spent a lot of time optimizing the code for MSP430, which has a leg-up on ATmega328 with 16 bit architecture. There are a few gotchas: data stream speed is much faster at 250 HZ refresh rate (which can be tempered by pulling the "Req" line high when the controller is not ready), 2 KHz clock speed, the need to deal with 64 bit integers, and the format conversion (BCD to 32 bit integers) that requires 6 multiplications per reading (not a trivial task for Arduino).
I can give Brian a few pointers as to how I did that for MSP430, and hopefully he will be able to figure out the rest. Let me know if I van help you with the hardware too.

Regards
Yuriy
 
HC-06 does use 3.3V but most of the break out boards for it is set up with ability to use 3.3v or 5v. I power mine from the Launchpad with 3.3v.
You are correct, issue id that the Arduino board TX pin ouputs 5 volts regardless of supply voltage. That's why a voltage divider is necessary on the TX to BT module.
 
JPigg55,
I'm pretty sure Arduino can handle these scales, but the implementation will need to be very "slim" (highly optimized). I've spent a lot of time optimizing the code for MSP430, which has a leg-up on ATmega328 with 16 bit architecture. There are a few gotchas: data stream speed is much faster at 250 HZ refresh rate (which can be tempered by pulling the "Req" line high when the controller is not ready), 2 KHz clock speed, the need to deal with 64 bit integers, and the format conversion (BCD to 32 bit integers) that requires 6 multiplications per reading (not a trivial task for Arduino).
I can give Brian a few pointers as to how I did that for MSP430, and hopefully he will be able to figure out the rest. Let me know if I van help you with the hardware too.
Regards
Yuriy

Yuriy, didn't know you were on this forum.
I know Brian has been in contact with you already. I know he's been working on making the Absolute scales work with the Launchpad format in parallel with the Arduino, May be done, but I'll pass on the message and you two can compare notes.
He emailed me today and said he thought he'd have a working mock-up by this evening for the Arduino. He has only the one scale that I lent him and was concerned about being able to sync all the clock speeds for mutiple scales with the clock speed residing on the scales themselves via an oscillator instead of the display providing it.
From his email yesterday:

"I was looking thru the code for the interrupt library I found, and I do think it'll work. I'm working on programming the on board timer now, I want to read a bit every .5ms once it gets triggered. A 2kHz frequency means that the read head will send a new bit every .5 msec (or .0005 sec).
Here's How it's Going to Work:
A change in state from the read head data line means the read head has started sending data. This will fire off a pin interrupt.
The pin interrupt routine will:
A) Disable the pin interrupt - read head is sending data now, stop waiting for it
B) Fire up the timer to generate a timer interrupt every .5 ms
The timer interrupt will:
A) Read the state of the pin. This is the data bit.
B) Bit shift into a variable. Steps A) and B) will be one line of code.
C) Increment a counter. The counter will run up to 36. This is all the bits the read head sends. Not all 52 bits are being used, and the first 4 that get sent only denote units, so they will be discarded.

After the counter hits 36, the timer is shut down and the pin interrupt is re-enabled. The data will then be sent to the app, the data variable reset to zero, and the cycle is complete.
With the 328P running at 16MHz, it will update every .625usec (or .0000000625 sec). This means the Arduino has time to execute 8000 instructions in the time it takes for the read head to send 1 data bit. We should have plenty of time to spare, and plenty of time for 4 axis and a tach.
All in all, everything should be plenty fast enough. The code is going to be compact, but it will have to be repeated for each axis.

Once I learn a little more about programming the timers I'll get to work writing a sketch to read one axis.
Since I found that interrupt library, I'm convinced the Uno will work just fine, otherwise I think we might have had to go to a Mega or Due.
Thank Goodness for an active Arduino community!!!!! "
 
Yuriy, didn't know you were on this forum.
I know Brian has been in contact with you already. I know he's been working on making the Absolute scales work with the Launchpad format in parallel with the Arduino, May be done, but I'll pass on the message and you two can compare notes.
He emailed me today and said he thought he'd have a working mock-up by this evening for the Arduino. He has only the one scale that I lent him and was concerned about being able to sync all the clock speeds for mutiple scales with the clock speed residing on the scales themselves via an oscillator instead of the display providing it.
From his email yesterday:

"I was looking thru the code for the interrupt library I found, and I do think it'll work. I'm working on programming the on board timer now, I want to read a bit every .5ms once it gets triggered. A 2kHz frequency means that the read head will send a new bit every .5 msec (or .0005 sec).
Here's How it's Going to Work:
A change in state from the read head data line means the read head has started sending data. This will fire off a pin interrupt.
The pin interrupt routine will:
A) Disable the pin interrupt - read head is sending data now, stop waiting for it
B) Fire up the timer to generate a timer interrupt every .5 ms
The timer interrupt will:
A) Read the state of the pin. This is the data bit.
B) Bit shift into a variable. Steps A) and B) will be one line of code.
C) Increment a counter. The counter will run up to 36. This is all the bits the read head sends. Not all 52 bits are being used, and the first 4 that get sent only denote units, so they will be discarded.

After the counter hits 36, the timer is shut down and the pin interrupt is re-enabled. The data will then be sent to the app, the data variable reset to zero, and the cycle is complete.
With the 328P running at 16MHz, it will update every .625usec (or .0000000625 sec). This means the Arduino has time to execute 8000 instructions in the time it takes for the read head to send 1 data bit. We should have plenty of time to spare, and plenty of time for 4 axis and a tach.
All in all, everything should be plenty fast enough. The code is going to be compact, but it will have to be repeated for each axis.

Once I learn a little more about programming the timers I'll get to work writing a sketch to read one axis.
Since I found that interrupt library, I'm convinced the Uno will work just fine, otherwise I think we might have had to go to a Mega or Due.
Thank Goodness for an active Arduino community!!!!! "

JPigg55,
It looks like Brian is headed in the right direction (just got an email form him with a few questions). It might not be easy to make it work reliably on Uno, but I'm pretty sure it can be done. Worst case scenario, he can punch to the raw AVR code and bypass the bloat of the libraries. I don't see the point of going to Mega or Due, though. The cost of (even off-brand) boards is pretty high, so unless there are issues with Launchpad availability, MSP430 makes more sense at that point.

Regards
Yuriy

P.S. If you didn't see my post yesterday (here: http://www.hobby-machinist.com/thre...ts-igaging-absolute-scales.40734/#post-350043) Launchpad version is already good to go (tested and ready to be released to "into the wild").
 
Thanks for the reply and help. I know Brian will figure it out. It's personnal now. LOL
He'd already mirrored what you said about Launchpad and MSP.
I originally went the Arduino route due to a previous interest in learning the system. Had ordered before I knew Absolute scales wouldn't work with your App. I'm a complete novice at electronics and programming.
This ordeal has taught me a lot, but have a long way to go.
I'll probably wait and see how Arduino works when Brian wins his battle (LOL), but may opt for the Lauchpad version depending.
Have other uses for the Arduino boards if I choose not to go that route.
Thanks again for the reply andassistance.

I did see your post about MSP and Absolute scales. Thanks again.
 
I've been slow on updates.
By now, most know Yuriy (aka YCROOSH) has gotten Absolute scales to work with the MSP430 controller.
Big stickler now is that he has the newer iGaging Absolute Plus scale which may be different from the original Absolute scales like I have.
Right now, I can't state if the older version will work with the Launchpad controller either. Brian thinks it won't.
He's still working on a fix for the Arduino controller (not sure about Launchpad yet). Apparently Yuriy has volunteered to assist and, if all goes well, we'll be sending one of the scales and display to him also.
That's all for now.
JP
 
Been a while since I last posted progress.
Not much to report. Brian Quinn contacted Scott Shumate at Shumatech. He noticed something on the O-scope trace that led Brian to think the Absolute scales have 2 read heads with an offset to cover transitions between strips. This would make the reading very stable eliminating a lot of the lower number jumping.
Problem now is figuring out how the display unit combines/interprets the 2 separate words from the read heads and outputs a single number position.
I shipped a scale and display to Yuriy as well it should be there in a day or so.
Once he has a chance to play with it, hopefully him and Brian can figure this puzzle out.
 
Back
Top