Arduino SPI GPS NanoHornet 1411 PM04 - arduino

Good afternoon.
I am new to the SPI protocol and Arduino. Recently I came across a GPS sensor, this one: Nano Hornet 1411 PM04 (Datasheet: https://www.origingps.com/wp-content/uploads/2014/11/Nano-Hornet-ORG1411-Datasheet2.pdf).
I have read already many information a lot of about SPI (including some tutorials from Sparkfun for Arduino), but I still can't make this GPS work...
I would really appreciate if someone could help me understand how to write code for Arduino Uno that can make this sensor run.
For further information:
The pins of this sensor are displayed on page 21 of the link provided before for the datasheet (block 17: INTERFACE of the index).
The electronics schematics I have implemented is the one from the lower picture on page 25 (block 18: TYPICAL APPLICATION CIRCUIT of the index, FIGURE 11 – REFERENCE SCHEMATIC DIAGRAM - PM04 ORDERING OPTION).
Option chosen is SPI assembled (No R1, R2, R3, R4 placed).
Vcc is the 3.3 V pin source from the Arduino Uno board.
Clock, MISO, and MOSI pins are 13, 12 and 11 respectively on Arduino Uno
Slave select would be at digital pin 10.
ON_OFF signal is controlled by a transistor linked to digital pin 8, which allows the 3.3 V to make the pulse to start the device.
My bigger misunderstanding for this specific implementation is the fact that I don't know/understand how I can read from the GPS sensor or what I should send to the sensor to start transmitting the position. Besides that, I don't also understand how the data is output...
Thank you very much!

The Hornet uses the NMEA standard. You should start by reading the information on this page, this should set you on the right path.
https://playground.arduino.cc/Tutorials/GPS

Related

doit.am 4-way motor & 16-way servo shield board not working with adafruit libraries

Got a servo + motor driver arduino shield with a robotic arm chassis from amazon. Found this link on the web :
https://github.com/SmartArduino/SZDOITWiKi/wiki/2-4ch-DC-motor-%26amp%3B-16ch-servo-shield---motor-and-servo-shield
Not enough details to help me control servos/ motors for my own project.
Tried the libraries given in the answer to this question:
doit 2-way motor & 16-way servo shield board
The libraries have been included, but i can't figure out how to use it properly. Ran the sample code as given in the adafruit website :
https://learn.adafruit.com/16-channel-pwm-servo-driver/using-the-adafruit-library
The 0th channel didn't move the servo as expected so I don't know what to try next.
Alright guys, here's the complete reply, with some precautions for future users.
The shield can be used via the library available at https://learn.adafruit.com/16-channel-pwm-servo-driver/using-the-adafruit-library.
(Shoutout to #djsfantasi ).
NOTE : One of the main things to ensure is that the 5v power supply for the servos must be separate from that of the arduino, as it messes up the servos somehow.
The motors can be powered via the given slots on the shield. All you have to do is supply the DIR and PWM values to the 1st 8 available arduino pins (after pin 0 and 1, ie, 2-9). It is pretty easy to figure out which pin controls which channel.
NOTE: Since the motor pins are available via male headers stacked very close together, i would suggest using female headers/jumper wires before connecting them to your motors. I burned my 1st shield's motor driver due to the +ve and -ve ending up shorted together.
Thanks for the replies everyone and best of luck to you guys reading this.

LinkitOne and 8-Bit Level Shifter

I want to connect LinkitOne with an LCD display requiring 5-volts in I/O. I opted for an 8-bit level shifter (TXB0108) from Adafruit to do this.
To start with, I made LinkitOne's 7 digital pins (D5-D11) as OUTPUT and DigitalWrite HIGH to each one and had consistently got 3.2 Volts.
However, when I connected D5-D11 in the LOW-side of the level shifter and had the VCCA hooked at 3.3V and VCCB hooked at 5V, the low-side pins registered varying voltages below 3.2 volts (some are below 1v and 2v while only 2 pins are in 3.2 V.
I read in some sites that the 5V must be supplied from other source as the LinkitOne is not giving enough power for the level shifter. So, I did that... as well as with the 3.3 volts but still the problem persists.
Please kindly help.
I did a quick check if picking other I/O pins in LinkitOne will resolve the issue and it did. The pins that work with the 8-bit level shifter are pins D5,D6,D9,D10,D11,D12 and D13.
I went through the LinkitOne pinout diagram here, and the only unusual thing about pins D4,D7 and D8 is that they are labeled GPIO40, GPIO50 AND GPI048 respectively which is unusually above GPIO2X. I'm still new with this board and guess that these pins have some 'specific' functions as stated here.

NRF24L01 and arduino does not communicate correctly

I am trying to exchange data between 2 Atmega328P through NRF24L01.
1) Library and Sketch
I use the Tmh20 library here . And use the getting started sketch to start here .
I send to the first arduino witht the code bool radioNumber = 0;
and the second bool radioNumber = 1;
But i am getting nothing ( just 5 weird character on the Serial console).
2) Schema and electronic
This is an image of the schematic
and this is a picture of what i have on the breadboard
Also i plug
CE -> D7
CSN -> D8
SCK -> D13
MOSI ->D11
MISO ->D12
I add a 10 micro farad capacitor between the GND and VCC of the NRF24L01.
My voltage supply come from a power generator ( current consomption is 0.6 A for the two arduino with 2 NRF24L01 ). The power supply provide 5 V and i derive 3.3 V using an LM3940 using the first schema (simplied ) on the datasheet here
3) Symptom
Nothing appear on the Serial console except 5 weird characters.I can't see any light for activity on the NRF24 module.
If anyone have an idea about i could debug that thing ?
All the best
Vincent
If you do not see anything from what is written from the setup part of the code:
Serial.begin(115200);
Serial.println(F("RF24/examples/GettingStarted"));
Serial.println(F("*** PRESS 'T' to begin transmitting to the other node"));
it will probably be related to other things than the NRF communication itself. Have you remembered to set the baud rate in your serial monitor to 115200 baud?
Mismatch in baudrates are a common cause of weird characters shown in Serial Monitor.
Best regards,
Bjorn Erik

Arduino: Attach an interrupt to one of the higher pin numbers?

I have an Arduino Mega 2560. Is is possible to attach an interrupt on the higher pin numbers, for instance, D20 to D25? I tried PcInt, but it doesn't work with the higher pin numbers for some reason.
I have a custom board and it's using these pins, so my hands are tied in terms of what pins to use.
The pin mapping of the Mega2560 says that pins 20-25 aren't candidates for PCINTs (but 20 and 21 would have INTs). So the layout of the board makes it simply incompatible for this Arduino.

Arduino stepper

I am building a system with the Arduino Uno, a power shield (REf to model) and a bipolar stepper motor.
I cannot initiate the motor using the stepper library from Arduino. I instantiate my stepper with
Stepper myStepper(motorSteps, motorPin1,motorPin2m motorPin3,motorPin4);
And keep on with the example code provided with the Arduino.
When I launch the code on the Arduino, the motor emits some sounds, but it does not turn.
How can determine the right motor pins to use? On the power shield, which mode is to be used, PWM or PLL?
As you suggest, the adafruit motor shield should fit the arduino stepper library, as it uses a L293D to drive the motor. It can drive 2 stepper with an current of 0.6A (good for most of little stepper you can find in printers, floppy/CD/DVD reader...).
Be careful, they seem to use their own library for this shield, you can find it here :
http://www.ladyada.net/make/mshield/download.html
And to know how to connect your stepper, look here :
http://www.ladyada.net/make/mshield/use.html
Sorry to answer your comment this way, but I don't have enough reputation to comment... so please, +1 my answer if you think it's a good answer :)
It's normal that the arduino sketch doesn't work. It drives the motor like this:
PIN1 : coil 1, forward current
PIN2 : coil 1, backward current
PIN3 : coil 2, forward current
PIN4 : coil 2, backward current
Your shield drives the stepper this way:
PIN1 : current forward/backward
PIN2 : current intensity with PWM
PIN3 : current intensity with PWM
PIN4 : current forward/backward
Not a good idea to drive a stepper motor, as you don't even need PWM to drive a stepper. It's to drive a DC motor. You may write your own sketch to drive a stepper with that shield, but you should find a shield that fit the arduino to drive a stepper. Look for something like "UL2003 stepper module", it costs few dollars.
Edit: I've got one of those modules and it works like a charm. Be careful about the power you need. Maybe you need something like a L298N module. I've got few of them too and they work fine.
If the motor emits some sound, this is good news. At least you have contact with it. Since it is just a sound but no movement, there might be three things laying underneath of this behavior;
Wrong pin connections of the motor
Insufficient current feeding from the motor driver.
Step counts determined by the code using PWM might be
too less or too high as per the motor can handle.
I can offer this URL link to determine motor pin-outs;
How Can I Determine My Stepper Motor Wiring Without the Stepper Motor Pinout
In stepper motor how many wires you have? 4 or 6.
Your connection is faulty. That's why it makes such sound.
Test with multimeter. you find two wires give high resistance. other two give half from that. Connect the first two with motor driver out1 and second two with out2.
You didn't mention which motor driver you are using. Try with L298 motor driver shield.
I think the problem you are having is related to the kind of shield you are attempting to use. The power shield that you linked is designed for DC motors and you are attempting to use a stepper motor (see this website for an explanation of the difference).
I would recommend trying another shield (like the Sparkfun EasyDriver) that supports the use of a stepper motor.
The problem seems to be wrong connected motor pins.
Are you sure, you connect true windings to motor?
Measure the motor pins with ohmmeter. There should be two windings which have pins A1-A2 and B1-B2. Between these pins you should see some resistance value.
Then be sure you connect to shield with right order.
In mi projects I use a bipolar motor (a nema17), and you can drive it easy with a A4988 pololu (or drv8825, more powerfull, and more expensive).
Those drivers has an H bridge inside, and allows you to control the motor by a simple:
while(1){
digitalWrite(PIN_STEP, HIGH);
delay(1000);
digitalWrite(PIN_STEP, LOW);
delay(1000);
//1RPM = 100 microsecond delay for a 1.8 degree angle motor (200 steps per
turn)
}

Resources