WhaddaWhadda

Cart

Cart

test123

Whadda WPI430/VMA430 - GPS MODULE U-BLOX NEO-7M Arduino library checker

This repository contains the library and example code to work with our Whadda WPI430/VMA430 GPS MODULE with the U-BLOX NEO-7M chipset. It can configure the module to send out UBX data packets, and is able to decode the time and location data.

Background info

Most GPS modules output so called NMEA sentences that can be interpretted by a variety of programs. The Whadda WPI430 GPS module is also able to send data in the form of UBX packets, a custom protocol designed by U-Blox (the manufacturer of the GPS chipset on the module). UBX packets use a more compact data encoding algorithm which makes it faster to decode the corresponding data on low-resource computers/microcontrollers such as the AVR based Arduino's.

This library only uses the UBX packets to decode the data.

Installation

  1. Download the most recent version of the Arduino library by clicking the Download ZIP option in the Code menu:

  1. Open the Arduino IDE, click on Sketch > Include Library > Add .ZIP Library...

  1. Open the .ZIP file you just downloaded, a message should appear in the Arduino IDE: "Library added to your libraries. Check "include library" menu."

Example

Wiring

Wire up the GPS module to an Arduino compatible board as shown below:

GPS Module Arduino board
VCC 5V
GND GND
TXD D3
RXD D2

Programming

  1. Open the Arduino IDE, open the GPS example sketch by going to File > Examples > WPI430/VMA430 GPS > Show_time_location (you might have to scroll down in the examples list to be able to see it)
  2. Upload the example to your Arduino board
  3. Open the Serial Monitor, make sure it is set to a baudrate of 9600 baud

The example program will first set-up the GPS-module by setting it's communication protocols. It will enable the module to send out UBX messages next to the standard NMEA messages that it normally outputs. The program will then decode these UBX messages, and show the parsed output. The data that is sent out includes location data (latitude & longitude) and UTC time (hours, minutes & seconds).

NOTE: The GPS module's built-in antenna is only designed to work outdoors. You will probably not get valid time and location data if you test this example indoors. You might be able to get reception after a few minutes if you put the GPS antenna close to a window, pointed towards the sky.

Whaddy Nightlight

demo

Make a cool nightlight in the shape of Whadda's very own mascot, Whaddy! This design will fit onto any phone charger in the EU.

Project description - How Does it work?

What can this project do?

This project uses a digital light sensor to measure the ambient light. When a certain light value is reached, the 2 SMD RGB LEDs will turn on and give your room or hallway a purple glow! The enclosure is designed for 3D printing and has the shape of our mascot! The parts are also designed to have a snap fit connection for the electronic modules and to close it. This way, you don't need any screws. The nightlight is supported by a bracket which you also need to 3D print, and is designed for most EU mobile phone chargers or small USB adaptors.

Level of difficulty: intermediate

MATERIALS

Ingredients:

Tools:

  • PC with Arduino IDE installed
  • soldering iron
  • solder
  • stripping pliers
  • cutting pliers
  • shrink tubes
  • heat gun of hair dryer
  • 3D printer

3D printing the NightLight:

The Nightlight consist out of 3 3D printed parts:

  • Nightlight Top (Whaddy_Nightlight_TOP.stl)
  • Nightlight Bottom (Whaddy_Nightlight_BOTTOM.stl)
  • Nightlight Bracket (Charger_Holder.stl)

Find all the .stl files for the case of this project on our Thingiverse account: https://www.thingiverse.com/thing:4804543

There are no supports needed. Be sure to 3D print the Nightlight Top and Bottom in a transparent filament. Otherwise, you won`t be able to see the LEDs inside. Also, be sure to print it with 100% infill to get the best result.

Cura

Programming the development board

Dev board: Arduino Nano (compatible)

Processor: ATMega328P

Code language: Arduino

Difficulty: Medium

Preparations:

Installing Arduino Libraries

Arduino Library manager

Use the Arduino library manager (Sketch > Include Library > Manage Libraries...) to install the following libraries:

Checking the Arduino sketch

  1. Open the Whaddy_Nighlight.ino Arduino Sketch
  2. Select the Arduino Nano board form the board's menu by going to Tools > Board > Arduino AVR Boards > Arduino Nano boardselect
  3. Select the ATmega328P (Old Bootloader) board form the board's menu by going to Tools > Processor > > ATmega328P (Old Bootloader) Bootloader
  4. Check if the Arduino sketch compiles correctly by hitting the Verify button (checkmark button left of the upload button). If everything is installed correctly, no errors should pop-up and the compilation process should finish with the final message Done compiling. If this process fails, please check if you installed all necessary libraries and selected the correct board.

Prepping the connections

Connection table light sensor

BH1750 digital light intensity sensor Arduino Nano
G GND
V 5V
SDA A4
SCL A5

Connection table SMD RGB LEDs

3 COLOUR RGB SMD LED MODULE Arduino Nano
- GND
G A2
R A1
B A0

Running the code!

Almost done with the coding part. After this we can start installing the electronics in the 3D printed case.

Setting the light value

As mentioned earlier, the RGB LEDs will turn on when it gets dark. The value corresponds to the ambient ligt that the senor is measuring (LUX). So 0 = DARK 300 = OFFICE LIGHT 100 000 = SUNLIGHT 🙂 We`ve set the value so that it turns on at twilight (10). Changing the value can be done here:

// Value to determe at wich value the LEDs should switch on
// The lower the value, the darker 
int Dark = 10;
/////////////////////////////////////////

Changing the color of the RGB LEDs

You can change the color of the nightlight to whatever you want by changing the setColor value(R, G, B) format. We`ve set it to Whadda purple.

  if (Alux < Dark) {      // When Avarage Lux measurement is lower then....
    setColor(210, 0, 210); // Set color to Purple (RGB)
  }

Uploading and checking the program

You are now ready to upload the code! Hit the upload button and wait until the program is compiled and uploaded. The nightlight should turn on when you cover the light sensor with your hand. If you're encountering any issue, check the serial monitor to see if the board was able to give correct readings from the B1750 dgital light intensity sensor.

Soldering and assembling the electronics

Overview of the ingredients

INGREDIENTS

Overview of the Tools

TOOLS

Step 1: Cut off or desolder the ICSP pins from the Arduino Nano. We do this to save some space in the 3D printed case. CUT OFF

CutOff

DESOLDER

Desolder

Step 2: Place the Arduino Nano into the provided place at the bottom of the case from the Nightlight, as shown in the picture below.

ArduinoNano

Step 3: Solder 4 wires to the pins of the BH1750 digital light intensity sensor.

LightSens

Finish off the connections by putting heatshrinks around them.

LightSensHeat

Step 4: Place the BH1750 digital light intensity sensor in the provided place at the bottom of the case from the Nightlight.

LightSensCase

Step 5: Measure the aprox length of the cables from the light sensor to the Arduino Nano pins (See connection diagram), and cut them off.

LightSensWires

Step 6: Remove the Arduino and light sensor from the case. Solder the wires according the connection diagram. Don't forget to put heatshrinks onto the connections!! DON'T SOLDER THE 5V YET, WE WILL DO THIS LATER ON.

LightSensSolder

Step 7: Solder wires to the pins of the SMD RGB LEDs modules. Don't forget to finsh the connections off with heatshrinks!

LedsWires

Step 8: The Leds will be mounted in the TOP part of the nightlight. insert them in the provided place and. Then bring the wires from the 2 LED modules together (color by color) and cut them off as shown in the picture below (not too short, otherwise the assembly will be difficult). Again, do not forget the heatshrinks :).

LEDsWireLenght

Step 9: Start soldering the 2 SMD RGB led modules to the Arduino Nano according the connection diagram. DON'T SOLDER THE GND YET, WE WILL DO THIS LATER ON.

LEDsSolder

The assembly should look something like this by now:

Assembly

Step 10: Cut off the USB A cable (approx. 25cm) and strip it (approx. 7.5cm).

USBcut

Step 11: Cut away the excess shielding and wires until you only have the + and - wires.

USBstrip

Then strip and solder the ends of these wires.

USBstripends

Step 12: Feed the + and - wires trough the hole of the bottom part form the Nightlight.

USBfeed

Step 13: Solder the + wire from the USB cable and the 5V wire from the light sensor the the 5V pin of the Arduino Nano.

USBsolder+

Step 14: Solder the - from the USB cable and the - wires from RGB SMD LED modules to the GND pin of the Arduino Nano.

USBsolder+

Step 15: Slide the 2 LED modules into the provided place of TOP part from the Nightlight.

LEdslide

Step 16: Now close the Nightlight TOP and BOTTOM half. The design uses a snap fit, so no need for screws!

CloseAssembly

Step 17: The next step is to mount the bracket on the charger, as shown in the picture below.

Bracketmount

Step 18: Click the bracket into the slot of the BOTTOM part of the Nightlight. BE CAREFULL, DO NOTT BREAK THE BRACKET (it is a fairly tight fitting).

Bracketmount2

Step 19: WOOHOOO, Last step. Plug the USB A into the Charger.

USBplug