Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: RFM12B-S2 and Arduino Pro Mini 328 Wiring Confusion on: July 31, 2013, 07:26:12 pm
I got it working, it wasnt to wiring. I think it was two things:
- The 3.3 volt to 5 volt logical level conversion, I used the one in the book to begin with and it didnt work to nicely.
- I used the beta Arduino IDE as I have an Arduino Due, so I installed the normal production IDE.

Now it all works.
2  Using Arduino / Networking, Protocols, and Devices / RFM12B-S2 and Arduino Pro Mini 328 Wiring Confusion on: July 30, 2013, 11:07:03 am
I have a book titled "Arduino Cookbook" by Michael Margolis. Page 486 it has instructions to wire up the Arduino to the RFM12B module as follows:

Arduino                 RFM-12B

3V3      <------->     3.3V
GND     <------->    GND

13        <------->     SCK
12        <------->     MISO
11        <------->     MOSI
10        <------->     SS
2          <------->     IRQ

However, looking at the Arduino Pro Mini Schematics, it shows the following wiring

ATMEGA 328            JP7 CONNECTOR

PD2       <------->      PIN 8 ( labeled 2)
SCK       <------->      PIN 9 ( labeled 13)
MISO     <------->      PIN 10( labeled 12)
MOSI     <------->      PIN 11 ( labeled 11)
SS     <------->         PIN 12 ( labeled 10)

The RF12 Library by Jee Labs specifies

ATMEGA 168        RFM-12B

PD2    <---------> IRQ
SS      <---------> SEL
MOSI     <---------> SDI
MISO     <---------> SDO
SCK      <---------> SCK

Therefore, my questions are
- Is the pin out on the Pro Mini that I have from the ATMega 328 to the physical pin numbers correct? Is this standardised accross every arduino?
- Has anyone got the RF12 module working with the Arduino Pro Mini?

ATMEGA          Pin                    RFM-12B

PD2  <---------> PIN 8  ( labeled 2)  <---------> IRQ
SS     <------->  PIN 12   ( labeled 10) <---------> SEL
MOSI   <-------> PIN 11  ( labeled 11) <---------> SDI (MOSI)
MISO   <-------> PIN 10 ( labeled 12) <---------> SDO (MISO)
SCK    <------->  PIN 9 ( labeled 13) <---------> SCK

Has anyone got a Arduino Pro Mini working with the RFM12B from spark fun?
3  Using Arduino / Project Guidance / Re: Position Location Beacon for RC Helicopter and other on: July 27, 2013, 11:40:32 pm
The IR beacon and sensor way looks cheap and straight forward theoretically.

Here comes the big questions.

- This will have to work under sunlight and 200 meters, so I am guessing, I would need a powerful or multiple IR LED's.
- Sensors, and recommended ones?
4  Using Arduino / Project Guidance / Re: Position Location Beacon for RC Helicopter and other on: July 27, 2013, 07:51:05 am
In terms of durability for the physical electronics, there is the option of potting it in epoxy or the like.

After more reading, maybe I should not discount the infra red beacon, the military uses it for marking friendly forces to prevent fratricide.

In terms of RSSI, I have been looking at the
- RFM22
- Xbee
modules. Has anyone tried these for position location?

The other option would be to go down to RF electronics proper, and use triangulation, however, this will rely on a lot of work.

5  Using Arduino / Project Guidance / Position Location Beacon for RC Helicopter and other on: July 27, 2013, 04:44:42 am
I want to locate the position of a beacon mounted on things like an RC Helicopter or perhaps a person playing sports, surfing etc.

A Range of up too 200 meters or so would be nice.

This is so a bunch of servos can aim / point a camera at the beacon.

However, I would like to point out the following which I think should be excluded.
- GPS might not be a good solution, the coordinates would have to be transmitted, this would require alot of electronics, which may not be robust for a sports man (especially when its a rugby player and 10 guys tackle him), and also it might be too bulky.
- IR sensing, this has limited range, and might not be good outdoors under bright sunlight.
- Ultrasonic sensing, once again, limited range.

As new technologies come out, what are the means of locating an object outdoors at ranges of up to 200 meters. I am guessing a radio beacon perhaps?

Are there any modules which would make this project easier?

Has anyone else come across this one? or conducted a project like this?

Has someone done this before?

Any suggestions are welcome.
6  Products / Arduino Due / Re: Arduino DUE PWM and ADC interrupt Triggering on: February 03, 2013, 05:46:45 am
Okay, yes the frequency is fast, It was 1000000. Is there a reference for the arduino PWM functions, or just the Atmel SAM3X8E datasheet?

Correct me if I am wrong, but do I also need to call the PIO_Configure function with these parameters PIN_PWMC_PWMH0_TRIG, PIN_PWMC_PWMH0_TRIG_FLAG ?

Looking inside the Arduino Libs, it appears that of the Timer Counters, TC0 is able to trigger the ADC interrupts. Is this true? Or can the other Timer Counters trigger the ADC.

More importantly, is there one working example with ADC being trigged by PWM or Timer Counters with an arbitrary frequency?

I would love to see it.

I found FPGA's easier. Less abstraction, to the point.
7  Products / Arduino Due / Arduino DUE PWM and ADC interrupt Triggering on: February 02, 2013, 09:32:17 pm
Using an Arduino DUE, I would like to use PWM to trigger the an ADC interrupt.

My problem is a lack of understanding of the Sam3x8e architecture and the programmer API.

I wrote some code, aimed at triggering the ADC interrupts at 5 hz.

But the interrupt trigger runs at some ridiculous speed.

Could anyone tell me what I am doing wrong, or at least point to a working example of where the user can set
an desired ADC triggering frequency using PWM or Timer Counter triggering?


#define PWM_FREQUENCY               2
#define MAX_DUTY_CYCLE              1000

void setup()
  // put your setup code here, to run once:
  Serial.println("PWM Inited");


void loop()
  // put your main code here, to run repeatedly:

void ConfigureTriggerPWM(void)
  /* Enable PWMC peripheral clock. */

  /* Disable PWM channel 0. */
  PWMC_DisableChannel(PWM, 0);
  /* Set clock A to run at PWM_FREQUENCY * MAX_DUTY_CYCLE */
  /* Configure PWMC for channel 0 */
  PWMC_SetPeriod( PWM, 0, MAX_DUTY_CYCLE ) ;
  PWMC_SetDutyCycle( PWM, 0, (MAX_DUTY_CYCLE / 2) ) ;
  PWMC_ConfigureChannel(PWM, 0, PWM_CMR_CPRE_CLKA, (0 << 8), LOW);
  PWMC_ConfigureEventLineMode( PWM, 0, 1 ) ;
  PWMC_ConfigureComparisonUnit( PWM, 0, (MAX_DUTY_CYCLE / 2), 1 ) ;
  PWMC_EnableChannel(PWM, 0);
  adc_configure_trigger(ADC, ADC_TRIG_PWM_EVENT_LINE_0, 0);

void ConfigureADC(void)
  /* Enable peripheral clock. */

  /* Initialize ADC. */
  adc_init(ADC, VARIANT_MCK, 6400000, 8);
  /* Set ADC timing. */
  adc_configure_timing(ADC, 0, ADC_SETTLING_TIME_3, 1);
  /* Disable sequencer. */
  /* Enable channels. */
  adc_enable_channel(ADC, (adc_channel_num_t)0);
  /* Enable Data ready interrupt. */
  adc_enable_interrupt(ADC, ADC_IER_DRDY);
  /* Enable ADC interrupt. */

// ADC Interrupt handler.
void ADC_Handler(void)
  uint32_t ul_temp;
  if ((adc_get_status(ADC) & ADC_ISR_DRDY) == ADC_ISR_DRDY)
    // The serial prints are only here for debugging.
    Serial.println("ADC interrupt triggered.");
    ul_temp = adc_get_latest_value(ADC);
Pages: [1]