Loading...
  Show Posts
Pages: 1 2 [3]
31  Using Arduino / Project Guidance / Re: Reading Slot Car IR on Different Frequencies on: April 10, 2012, 09:20:35 pm
You might try decoding the frequency in software.

Capture the signal with a photodiode using a timer.
With either an external interrupt, pin change interrupt, Input Capture or T1/T0...
What you will get is the time value for the wavelength.

Once you get a couple of samples, average and use a case/switch to identify.
Or you might try this design note, sw FSK decoding:
http://www.avrfreaks.net/modules/FreaksFiles/files/406/DN_027.pdf
32  Using Arduino / Project Guidance / Re: HMC5883L compass huge error [SOLVED] on: April 10, 2012, 08:53:37 pm
You will want to implement some tilt compensation for the compass, using the accelerometer to figure roll, pitch and yaw.
Here's a library we (my friend and I) wrote: http://n0m1.com/2012/02/27/6dof-arduino-compass-accelerometer/
33  Using Arduino / Project Guidance / Re: How to sync motor speed??? on: April 10, 2012, 08:48:29 pm
As already mentioned, PID is what you want.
In addition, you want to command a position, not a speed.
As a loose PID will normally suffer from some velocity following error.
If you find it difficult to tune and/or are going slowly, drop the D and just do PI.
34  Using Arduino / Project Guidance / Re: Needing info on garage door IR beam and interrupt input on: April 10, 2012, 08:40:36 pm
It might be an open drain output, if it is, it will require a pullup resistor to set it before you see anything...

The IR itself is modulated with a carrier frequency much like a TV remote, maybe 38kHz?

35  Using Arduino / Project Guidance / Re: Moving motors to a reset (0,0) point on: April 10, 2012, 08:33:35 pm
In most CNC equipment, there is only one limit/home switch per axis.
Once it's calibrated to home, the machine software (MACH3 for ex) "knows" how far it can go in each axis...

You might try the pin change interrupt library to signal when a limit/home switch is triggered.
It will be more repeatable than polling as the interrupt will fire regardless of what the main loop is doing.

When my CNC mill homes, it pulls the Z up first for safety, then does X and Y.
When it finds the home switch, it then backs up and slow approaches again to negate switch bounce.
36  Using Arduino / Project Guidance / Re: Too much amperage for Arduino power supply? on: April 10, 2012, 08:22:20 pm
I've had a few cases where a large inductive load (such as a motor) causes the supply to dip enough to reset the AVR.
It will depend on the pump startup current and the internal resistance of the battery.

In extreme cases where adding bulk capacitance close to the Arduino isn't enough, a series diode before the capacitance is the fix. 
The diode will block the reverse drain of the bulk capacitance.

The other option is to control the pump with a FET instead of a relay, and ramp up the FET with PWM for a soft start.
37  Development / Other Software Development / Re: Bootloader using photocell? on: April 09, 2012, 12:00:19 pm
Some of the datasheets for these parts indicate less than 20% duty cycle which is about what I'm seeing.
The continuous bit stream I want to send them probably averages very close to 50%.
I suspect the shutdown is due to the automatic gain control circuitry.

I now understand why the NEC protocol has a specific command for repeated hold.
The repeat code is extremely low duty cycle...

The datasheet for one of the parts I've tried (TFM5360) is quite revealing.
According to page 5, the suitable TFM part is the TFM1xx0 series...   
38  Development / Other Software Development / Re: Bootloader using photocell? on: April 08, 2012, 09:20:55 pm
Screen programming could be faster if different colors are used, something akin to FSK as opposed to OOK...

The 38kHz 2400 baud IR bootloader I'm working on is almost going.
But I've just discovered the IR demodulators I'm using are not rated for continuous operation. 
After a few bits in a row, exceeding a certain duty cycle, the demodulator stops responding.
I have some TSOP58038 parts on order, rated for continuous, that should fix this.

With 2400 baud and ten bits per byte (8 + start and stop) we get 16 carrier waves (@ 38Khz) in a single bit.
The carrier wavelength being 26.3us and the the baud bit length being 426us.
There is some phase shift (about 8 wavelengths) as a result of the demodulation circuit that prevents it from being any faster.

Interestingly, IRDA specifies the carrier to be 3/16 the wavelength of the bit length.
So the carrier for 115k baud is 614 kHz, and the carrier for 9600 baud is 51kHz. 
This is considerably better than the 1/16th I'm getting with the 38kHz TV remote demods..
 
I've also looked at the audio bootloader.
It's going to have the same speed issue as 38kHz IR, a little slower, the maximum carrier will be 20kHz.
At least with audio, multiple carries can be used for a multi-bit FSK scheme.
But that would require either decoding FSK in the AVR or some external analog filters...

Michael
http://www.n0m1.com
39  Development / Other Software Development / Re: Bootloader using photocell? on: April 02, 2012, 11:13:13 pm
I'm currently working on this as a small part of an ongoing project.
The first step was getting the boot loader to compile which I detailed here:
http://n0m1.com/2012/04/01/how-to-compiling-the-arduino-bootloader/

And I've now added a 38kHz pwm to the boot loader, to modulate the outgoing IR...
It will be similar to the Asuro IR boot loader, 9600 baud.
When I get it working, I'll blog the details...

Michael
http://n0m1.com/


Pages: 1 2 [3]