Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Moteino M0 / Re: Getting stuck or failing imuBegin() for LSM9DS1 breakout
« Last post by Felix on March 08, 2024, 07:24:34 PM »
So with the unmodified sample sketch, you're not getting anything out of it?
That sketch is what I use to test these. I do the testing using a simple spring loaded probe JIG that's installed on a MoteinoM0, I press each board against the jig to init the connection, and wait until I can see the expected output on the serial port, that's it.

So software aside I would ensure solid correct connections. If possibly try with just the M0 and the IMU board alone, nothing else.

PS. The code blocks in the posts can be finicky depending what is pasted in the box, I think the multiline comments could sometimes be a problem.
12
Moteino M0 / Getting stuck or failing imuBegin() for LSM9DS1 breakout
« Last post by jdheinzmann on March 08, 2024, 06:03:04 PM »
I have a LPL LSM9DS1 IMU breakout board connected directly to a Moteino M0 that came with a RFM69HCW - 868/915Mhz transceiver installed.  Have adapted the example code Felix posted here: https://lowpowerlab.com/forum/low-power-techniques/lsm9ds1-power-consumption/msg29804/#msg29804 to specify USB for the serial port and add some Serial.prints for debug:

The important part of the code is this:

Code: [Select]
#if defined (MOTEINO_M0) && defined(SERIAL_PORT_USBVIRTUAL)
  #define Serial SERIAL_PORT_USBVIRTUAL // Required for Serial on Zero based boards
#endif

void setup()
{
  pinMode(LED_BUILTIN,OUTPUT);
  Serial.begin(115200);
  delay(2000);
  Serial.println("Done with setup().");
}

byte imuSetup() {
  // Before initializing the IMU, there are a few settings
  // we may need to adjust. Use the settings struct to set
  // the device's communication mode and addresses:
  imu.settings.device.commInterface = IMU_MODE_I2C;
  imu.settings.device.mAddress = LSM9DS1_M;
  imu.settings.device.agAddress = LSM9DS1_AG;
  // The above lines will only take effect AFTER calling
  // imu.begin(), which verifies communication with the IMU
  // and turns it on.
  Serial.println("About to call imu.begin()...");
  if (!imu.begin())
  {
    Serial.println("Failed to communicate with LSM9DS1.");
    /*
    Serial.println("Double-check wiring.");
    Serial.println("Default settings in this sketch will " \
                  "work for an out of the box LSM9DS1 " \
                  "Breakout, but may need to be modified " \
                  "if the board jumpers are.");
    */
    return false;
  }
  Serial.println("Succeeded in communicating with LSM9DS1.");
  return true;
}

void loop()
{
  if (imuSetup()) {
    printGyro();  // Print "G: gx, gy, gz"
    printAccel(); // Print "A: ax, ay, az"
    printMag();   // Print "M: mx, my, mz"
   

Using version 2.0.0 of the SparkFunLSM9DS1 library I get only this:

Code: [Select]
Done with setup().
About to call imu.begin()...

which tells me that imu.Begin is getting stuck.

I reverted the library to version 1.2.0 and now I get this:

Code: [Select]
About to call imu.begin()...
Failed to communicate with LSM9DS1.
About to call imu.begin()...
Failed to communicate with LSM9DS1.
About to call imu.begin()...
Failed to communicate with LSM9DS1.
About to call imu.begin()...

etc

In this case imu.Begin appears to be returning false.

Does anyone know what might be causing this?  Any suggestions for troubleshooting it?

Thanks!  -JD
13
That first photo has R5 indeed, it's more just illustrative rather than a spec photo that should be analyzed for the parts on it. The rest of the photos have R6.
I added R6 to the title so it's unmistakable.

The MCU is powered from the existing onboard regulator. If you want to use another regulator you will have to remove the existing one. Sounds like your described use might work but how you wire that exactly will be up to you. But it will be a single use it sounds like, and manual restart (you really cut your own power and then reactivate it later (via enable pin)).
14
Felix, menu: shop-->all moteinos--> top of the list, product ID99 image has R5. See attached image.....jim
15
Hi jimf,
I'm quite confused by the opening statements.
Where do you see R5 available?

There is a Moteino 8Mhz running at ... 8mhz, but all other AVR Moteinos run at 16mhz.
16
Hi, I'm refactoring a deadbolt lock project I did in 2021 that used a Moteino R6.  The R6's  I got in 2021  have a voltage regulator (HU6U) and spec said it runs at 16Mhz. I noticed that the current R6's run at 8Mhz and don't have a regulator while the R5's run at 16Mhz and do have a regulator.  Sooooo, did the spec change? Regardless, should I get an R5 or R6?  My decision to use an R5 vs R6 is based on the nature of the refactoring I'm doing and I'd appreciate input on my thought process.  The changes I'm making have to do with getting the lock electronics to power off when the battery gets low.  I'm using two 81650s in series (7.4v) to power the lock and the major consumer of power is the stepper motor that throws the deadbolt.  The Moteino sleep and uses both watchdog timer and pin change interrupts to wake up.  I don't have any problems with detecting low battery, watchdog, and pin change interrupts.  Battery voltage detection returns a status of good, low, and critical. My problem is that when it is time stop working because voltage is critical, the Moteino gets wonky, repeatedly restarting, behaving badly (trying to keep this short :-)  My plan is to 'cut the power' to the Moteino when battery voltage is critical.  I've spent a lot of time looking for /playing with how folks do that and ultimately have decided to use a voltage regulator with an enable pin, which will work as follows: change battery, push start button which enables the voltage regulator, Moteino starts and uses digital pin to keep the voltage regulator enabled even after I've released the start button.  When it is time to cut power, the digital pin is flipped, disabling the voltage regulator and shutting down the Moteino and motor driver board. The voltage regulator I'm planning on using is TPS7233QP (3.3v, 250ma).  After looking at both R5 and R6 currently available, I figure I could either:

1) get the R6 and connect regulator's Vout too Moteino Vin/3.3....running the risk of code no longer working at 8Mhz.
2) get the R5 and connect regulator's Vout to Moteino 3.3v pin
3) same as #2 but remove the HU6U that comes with the R5, connecting Vin to 3.3v on the Moteino (as is done on the R6)

I'm inclined to go with #3.  Anyone see an issue with this?

Somewhat related, it would be nice if the Moteinos' used voltage regulators that could be disabled by code.  I've not found a simple way to cut power without increasing sleeping current draw.  I'd be happy to pay for that too :-).  Apologies in advance if there is a way to do this with the existing designs...if so, please advise!

Many thanks....jimf
17
Moteino / Re: Moteino LED doesn't flash and programs can't be uploaded
« Last post by Felix on February 13, 2024, 08:42:34 AM »
It's possible the LDO is damaged. You can easily check if you get 3.3v on the Moteino 3v3 pin.
Or the MCU has some issue, or bootloader was somehow damaged.
I would try the ISP route to burn a bootloader on it and see if that gets you anywhere.
Just be sure to use a 3.3v Arduino for this purpose (power is ok at 5V into the Moteino but the data lines need to be 3.3v).
18
Moteino / Moteino LED doesn't flash and programs can't be uploaded
« Last post by deven.orourke on February 12, 2024, 04:56:45 PM »
I have two moteinos (R6) I've used successfully for all kind of projects. I am trying to upload a new sketch, and getting the following error message in the Arduino IDE:
"avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x76"

The LED on the moteino doesn't light up at all - not when I plug it in to the USB adapter and into my computer, nor when I apply an external power supply to Vin. When powered, shorting RST to GND does nothing - no LED or anything. Have I somehow messed up the bootloader?

If I have, it seems I may be able to use an Arduino to burn the bootloader back onto my Moteino. An older forum post that seemed promising gave a link, but it is now dead. Am I ok to use this guide to attempt to put a bootloader back on my Moteino? I appreciate any assistance.

https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/
19
Coding questions / TxRxBlinky example from RFM69 using STM32F303K8
« Last post by ATO on February 11, 2024, 04:49:38 PM »
Hi everyone,

I am trying to send a sample "Hi" message from STM32F303K8 to the other one using RFM69HW, and LowPowerRFM69 library.

Here is my schematic. I tried to make it as close as possible to the example given. 

I am using STM32duino to use Arduino IDE.

I see that the function used to send a message, namely sendWithRetry,  is returning False. I have checked all the HW connections multiple times.

Note that, I see a "Button Pressed" in my console, and green & red toggles each time I press a button. Yellow led is always ON, and waiting for sendWithRetry() return TRUE for blink.

Moreover, I didn't connect DIO pin of RFM69HW for my basic application.

Here is my sender code.

Do you have any suggestion for me? I am really stuck at that point.

Best regards,
Talat

20
I use a ATTIny841, you have the SPI connected to the wrong pins. These pins are correct > PA3 SCK, PA2 MISO, PA1 MOSI. Once you connect your RFM69 to these pins it will work with LowPowerLab library, no problem.
Pages: 1 [2] 3 4 ... 10