Go Down

Topic: what i have been up to, thus far. (Read 7125 times) previous topic - next topic

travis_farmer

i will be starting the long drive in a few minutes to take my Tech Ham license exam :D

~Travis
Current Obsession: Ham Radio, and my CNC Router
Check out my website, i have my own forum on my hobby server.

travis_farmer

Current Obsession: Ham Radio, and my CNC Router
Check out my website, i have my own forum on my hobby server.

TomGeorge

Hi,
CONGRATS MATE... :D :D :D :D :D


So trip home didn't feel that long....

Tom... :) :) :)
Everything runs on smoke, let the smoke out, it stops running....

travis_farmer

it didn't seem as long, for some odd reason ;)

Now i just have to wait for my license, and i am golden :D

~Travis
Current Obsession: Ham Radio, and my CNC Router
Check out my website, i have my own forum on my hobby server.

Paul_KD7HB

it didn't seem as long, for some odd reason ;)

Now i just have to wait for my license, and i am golden :D

~Travis
Congratulations! Well done! Now hope the government doesn't shut down before the FCC issues your ticket.

Paul, KD7HB, CN94jj

travis_farmer

 :o  :o  :o  :o
Hadn't thought of that...

~Travis
Current Obsession: Ham Radio, and my CNC Router
Check out my website, i have my own forum on my hobby server.

GoForSmoke

The CNC is mostly aluminum, so the magnets will have to be attached with some sort of adhesive, like epoxy.
Well there you have luck, what you attach to the frame won't be affected by it.

You can be very accurate as to position with a linear Hall sensor. That's what I want you to see.

With a bar magnet you have field pointing out full strength each end that varies throughout the length of the magnet between N and S, with + and - readings depending on which way you point the sensor. If you adjust your circuit, you can read 0 to 1023 on an analog pin, your precision is the distance from N to S pole divided by your analog read max value. Errors in the length of your magnet are also divided by analog read max.

Stick a button supermagnet to a flathead steel nail and check readings from nail tip to head always along the nail axis pointing towards the head. That should match how the nail and magnet attached to the CNC frame would move under the sensor. You may need to tune the sensor circuit to reach 1023 at the head, perhaps with a turn pot.
With the linear sensor you can watch the limit approach. That's what I want you to see for yourself with a DIY Hall EM field probe.

A precision joystick runs 12 or more bits analog read, linear Hall sensors are commonly used since they don't wear out or need cleaning. These are instrument quality devices unlike Hall switches used in door and window intrusion systems.

Mess with the fields, make the thing that lets you read them! You already spent the nickel, get your time out of it!
That probe will let you find EMF sources better than an unterminated jumper.
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

allanhurst

EMF?  - I thought that was measured in volts, not tesla...

Allan

travis_farmer

Quote
You can be very accurate as to position with a linear Hall sensor. That's what I want you to see.
ok, i will open my mind, and see what flows in ;)

I will create a test fixture tomorrow. right now, i am basking in the glow of my recent achievement. :D

will the 10-bit ADC be enough? i think i have a 12 or 16-bit I2C ADC in my parts rack, somewhere (never did get that bin rack sorted right ;) ).

i am thinking that to preserve the solid-state vs. mechanical, it would be better to use transistors to trigger the limits, rather than relays with their slightly longer activation time.

I am intrigued by the nail experiment, as it sounds like it will improve the repeatability by narrowing the field.

~Travis
Current Obsession: Ham Radio, and my CNC Router
Check out my website, i have my own forum on my hobby server.

travis_farmer

First experiment with AH3503 Hall sensors.

parts list:
Arduino UNO X 1
AH3503 X1
ADS1115 breakout X1  (16-bit I2C from Adafruit - i just wanted more resolution ;) )
various connector wire  X7

Schematic PDF, should be attached.

using customized libraries from HERE.

The code i used:
Code: [Select]

#include <Wire.h>
#include <ADS1115.h>
#include <I2Cdev.h>

ADS1115 adc;



void setup() {
  Serial.begin(9600);
 
  Wire.begin();
  adc.initialize(); // initialize ADS1115 16 bit A/D chip
 
  Wire.beginTransmission(0x48); // Begin direct ADC communication
  Wire.write(0x1);    //  Connect to adc and send two bytes - Set Config Reg to all Ones
  Wire.write(0x7F);  //  MSB
  Wire.write(0xFF);    //  LSB
  Wire.endTransmission();  // End the direct ADC Communication
 
  adc.setMode(ADS1115_MODE_CONTINUOUS); // Set the ADC to free running conversion mode
  adc.setGain(ADS1115_PGA_6P144);  // set the ADC gain to 6.144 Volt range, .0001875 Volts/step
  adc.setRate(ADS1115_RATE_475);  // set ADC sample rate to 475 samples per second
  adc.setMultiplexer(ADS1115_MUX_P0_NG);  // Set the ADC to AN0+ Vs ground Mode
}

void loop() {
  adc.setRate(ADS1115_RATE_475); // Set the ADC rate to 475 samples/sec
  adc.setGain(ADS1115_PGA_6P144); // Set the ADC gain to 6.144V
  adc.setMultiplexer(ADS1115_MUX_P0_NG);  // Set the ADC to Channel 0 AN0+ Vs ground
  delay(10); // adc settling delay
  Serial.println(adc.getDiff0());
}


output is directed to the serial port to make use of the Serial Plot function of the Arduino IDE.

Observations:
at 16-bit, the sensors are very sensitive to EMI. plot rises and falls when a north or south magnet pole is introduced, so it is connected correctly. following lunch, i will try a super magnet, and a nail.
I also noticed that interference is also detectable by having the UNO too close to the Hall sensor. seems to be quite sensitive. so my next test fixture will include a length of wire (shielded, 3con), with the Hall at the end.

~Travis
Current Obsession: Ham Radio, and my CNC Router
Check out my website, i have my own forum on my hobby server.

travis_farmer

current code:
Code: [Select]
#include <Wire.h>
#include <ADS1115.h>
#include <I2Cdev.h>

ADS1115 adc;

unsigned long ADCaccum = 0UL;
int ADCcntr = 0;
unsigned long LastSample = 0UL;

void setup() {
  Serial.begin(9600);
 
  Wire.begin();
  adc.initialize(); // initialize ADS1115 16 bit A/D chip
 
  Wire.beginTransmission(0x48); // Begin direct ADC communication
  Wire.write(0x1);    //  Connect to adc and send two bytes - Set Config Reg to all Ones
  Wire.write(0x7F);  //  MSB
  Wire.write(0xFF);    //  LSB
  Wire.endTransmission();  // End the direct ADC Communication
 
  adc.setMode(ADS1115_MODE_CONTINUOUS); // Set the ADC to free running conversion mode
  adc.setGain(ADS1115_PGA_6P144);  // set the ADC gain to 6.144 Volt range, .0001875 Volts/step
  adc.setRate(ADS1115_RATE_475);  // set ADC sample rate to 475 samples per second
  adc.setMultiplexer(ADS1115_MUX_P0_NG);  // Set the ADC to AN0+ Vs ground Mode
}

void loop() {
  //if ((millis() - 1) >= LastSample) {
    //LastSample = millis();
    if (ADCcntr >= 5) {
      ADCcntr = 0;
      Serial.println(ADCaccum / 5);
      ADCaccum = 0UL;
    }
    else
    {
      ADCcntr++;
      ADCaccum += adc.getDiff0();
    }
  //}
  //Serial.println(adc.getDiff0());
}


ok, really i should continue this elsewhere, as it is off-topic for the Bar, though technically inline with the thread...

anyway, i added some light averaging to kind of smooth the signal a bit. kind of like a DSP filter, i guess.

now, if i didn't have a killer gut ache, i would be out testing this with my CNC to see what the accuracy is. in theory, if i move the CNC away from the sensor, and return it to the exact same position, the sensor result should be nearly spot on.

but as hardware experimenting is off the table for the moment, i can play with the software.

so, to keep things clean, i think i should add a little hysteresis, so when the CNC is homed, the signal doesn't flicker. this can be done by watching the idle signal, and setting my trip points slightly above and below each other, within the idle signal. should be easy enough.

~Travis
Current Obsession: Ham Radio, and my CNC Router
Check out my website, i have my own forum on my hobby server.

travis_farmer

This is so very disappointing. everything i have worked hard for, has become outside my reach. i don't even know why i bothered to try...
no, i will not elaborate, i just need to vent.  :o

~Travis
Current Obsession: Ham Radio, and my CNC Router
Check out my website, i have my own forum on my hobby server.

travis_farmer

Hmm, it would also seem that my application to be a moderator has gone ignored. perhaps because i am just a laughing stock to most. that was well worth the effort of typing out...
makes me wonder what is said about me in the places i can't read.

~Travis
Current Obsession: Ham Radio, and my CNC Router
Check out my website, i have my own forum on my hobby server.

allanhurst

I'd think you must be a mug to want the job - who wants to wade through all our s*** to weed out the dross?

Not me - their diligence and toleration level must be way above mine!

( And actually I mean it)  thanks for all your efforts, moderators!

Allan


travis_farmer

i thought it would give me something of value to do, rather than just spewing drivel.

~Travis
Current Obsession: Ham Radio, and my CNC Router
Check out my website, i have my own forum on my hobby server.

Go Up