In the improbable case you need to test the hardware

Discussion and support for the Nmea2Wifi multiplexer - a 2-input Nmea 0183 wifi multiplexer.
Luis Sa
Site Admin
Posts: 141
Joined: Thu May 04, 2017 4:12 am

In the improbable case you need to test the hardware

Post by Luis Sa » Fri Sep 29, 2017 8:36 pm

Hello,

The central part of the Nmea2Wifi multiplexer is the ESP8266 module named as Wemos D1 mini and referred to as U2 in the circuit diagram. If an Access Point is created by the multiplexer and you get the "Settings Web Page" when you type 192.168.4.1 in a browser, then the ESP8266 module is OK. The little antenna printed in its PCB has a sufficient range for most applications in the confined space of a recreational vessel.

If the ESP8266 module does not create an Access Point, check if it is inserted in the right position in its socket. If it happened that you removed it by some reason and inserted it back the other way round, you can recover from this error as the module is not destroyed.

The same is not the case if you invert the power supply, that is, if you exchange the 12V and the GND terminals. Most probably you will destroy (with smoke) the voltage regulator referred to as U1. This circuit is a step down switching voltage regulator that creates 5V to feed all the components in the multiplexer. After September, 1, 2017, versions of the PCB are supplied with a protecting diode so that a wrong connection will not destroy the voltage regulator. If you have an older unit and want to add that protection see this article.

In addition to the ESP8266 module and the voltage regulator there exist two Nmea 183 serial inputs and one Nmea 183 serial output. In normal operation you have the following meanings for the LED lights:
  • BLUE LED in the Wemos D1 mini - blinks when data is output on the P#3 serial port. I also blinks for a second or two when the multiplexer is powered ON.
  • GREEN LED in the main PCB - blinks when valid data is read by the ESP8266 on the P#1 serial input.
  • RED LED in the main PCB - blinks when valid data is read by the ESP8266 on the P#2 serial input.
modulo-montado-fluxo-low.jpg

Note that the blink of the BLUE LED is a not a warranty that data is output at port P#3. This so, because between the ESP8266 and the output itself, there exists a driver integrated circuit, MAX485, referred to as U5. If this U5 fails, data does not reach the output port. On the contrary, if the GREEN or/and the RED LEDS blink it means that the corresponding data has passed through the optocouplers 6N139 referred to as U3 and U4. If one of these LEDS do not blink there is a chance that
  • The external units that feed the multiplexer are not working
  • There is a mismatch of baud rates
  • The connections between the external units and the multiplexer are not correct
  • Or, there is an hardware fail on the optocouplers of the multiplexer
In order to test the functionality of all the serial ports, that is, the output port P#3 and the MAX485 IC, and the input ports P#1 and P#2 and their corresponding 6N139 ICs, an addition was introduced in the firmware.

I will try to explain how it works. Whenever the multiplexer receives power, the first thing it does is to determine the mode of operation (AP or SAT). It does that by reading a location in EPROM memory. If this location shows that the module is in a factory state (either because you did not change any of the initial settings or because you had pressed the RESET button), then it does this (after firmware 4.1):
  • it writes a sequence of 10 HIGH and LOW voltages on P#3: HIGH LOW HIGH LOW HIGH LOW HIGH LOW HIGH LOW
  • and reads P#1 and P#2 to look for that same sequence. At the first fail it gives up and proceeds as normal, that is, initiates the wifi functions, adjust the parameters and so one.
Now suppose that, before supplying power or pressing the RESET button, you had connected port P#3 to port P#1 and port P#2. If both the MAX485 (on P#3) and the 6N139 (on P#1 and P#2) work as expected, the multiplexer will read that same same sequence of HIGH LOW HIGH LOW HIGH LOW HIGH LOW HIGH. If that is the case the multiplexer will run an infinite loop by:
  • writing 5 times in 5 seconds the string "TESTING P#1 AT 9600 BAUD RATE" on port P#3 (BLUE goes ON) and reading that string on P#1 (GREEN goes ON if something arrives)
  • lighting RED LED during 0,1 seconds if all the 5 strings arrived without errors
  • pausing 1 second
  • writing 5 times in 5 seconds the string "TESTING P#2 AT 38400 BAUD RATE" on port P#3 (BLUE goes ON) and reading that string on P#2 (RED goes ON if something arrives)
  • lighting GREEN LED during 0,1 seconds if all the 5 strings arrived without errors
As a picture worth a thousand words, here is a video of what I am describing:


Note that power to the multiplexer is supplied through the USB cable connected to the ESP8266 module. If you do the same experiment and your LEDs blink as in the video then you are sure that all the hardware in the multiplexer is working as expected. So, reconnect the multiplexer as normally and if something is wrong, look elsewhere!

Regards, Luis

carlo194
Posts: 15
Joined: Sat Feb 02, 2019 3:55 pm
Location: Rome

Re: In the improbable case you need to test the hardware

Post by carlo194 » Sun Feb 17, 2019 8:39 pm

luis,
it is not very clear to me and I do not understand from the movie which are the connection to make: a1 and a2 with a3 and the others?

thanks

carlo

Luis Sa
Site Admin
Posts: 141
Joined: Thu May 04, 2017 4:12 am

Re: In the improbable case you need to test the hardware

Post by Luis Sa » Sun Feb 17, 2019 11:02 pm

Hello Carlo,

Connect A3 to A1 & A2

Connect B3 to B1 & B2

Those are the connections.

Regards, Luis

eriknoed
Posts: 6
Joined: Thu Feb 14, 2019 2:57 pm

Re: In the improbable case you need to test the hardware

Post by eriknoed » Tue Feb 19, 2019 12:12 pm

Hello Luis,
This morning the multiplexer worked as a charm, but now I am having problems.... :(
I did logon to the plexer on 192.168.4.1 and on the right side I entered information on our local network (SSID, PW, and a IP), and since then the plexer is stuck.
I have reset the plexer and the ESP-12F
I have reinstalled drivers
I have flashed..
but all I get, is five blinks from ESP-unit, and a steady red from the power supply.

Sorry to borther you, but could you please help to get on?
All the best,
Erik

Luis Sa
Site Admin
Posts: 141
Joined: Thu May 04, 2017 4:12 am

Re: In the improbable case you need to test the hardware

Post by Luis Sa » Tue Feb 19, 2019 1:20 pm

Hello,

For some reason I think that the multiplexer is trying to connect to your existing network and it is not able to achieve that.

Did you try a hard reset? Press and hold the sw1 switch. The leds go on for about 2 seconds and then go off. Release the switch.

The multiplexer will be in default state. We can then examine why it could not connect to the existing network.

Regards Luis

Luis Sa
Site Admin
Posts: 141
Joined: Thu May 04, 2017 4:12 am

Re: In the improbable case you need to test the hardware

Post by Luis Sa » Tue Feb 19, 2019 1:28 pm

Hello,

Regarding to the connection to existing network it looks like it get connected otherwise it would keep trying for about 5 minutes and at each attempt it would make 5 short blinks.

At that stage you should disconnect your smartphone from the Nmea2Wifi network and connect to the existing network. Then, in a browser, type the ip you entered before.

Regards Luis

eriknoed
Posts: 6
Joined: Thu Feb 14, 2019 2:57 pm

Re: In the improbable case you need to test the hardware

Post by eriknoed » Tue Feb 19, 2019 2:41 pm

Hello Luis,
"On the road again...." Thanks a lot.
I have connection in AP-mode, and that is fine for now.
When I get more experienced I might try to connect to a existing network.
All the best from Denmark
Erik

carlo194
Posts: 15
Joined: Sat Feb 02, 2019 3:55 pm
Location: Rome

Re: In the improbable case you need to test the hardware

Post by carlo194 » Mon Mar 11, 2019 4:45 am

Hi Luis,
here I am again....
I mounted the kit.
I flashed the esp with the 56 version and connecting to nmea3wifi network, I can see the device working.
the HW test does not work: I do not have the green and red led blinking and the blue led blinks twice five times. I checked all the soldering and heated all of them to make sure no cold soldering is in the board.
the ground of the led is connected to the square junction in the board.
any suggestion?

thanks

Carlo

board.jpg
back.jpg

Luis Sa
Site Admin
Posts: 141
Joined: Thu May 04, 2017 4:12 am

Re: In the improbable case you need to test the hardware

Post by Luis Sa » Mon Mar 11, 2019 5:13 am

Hello Carlo,

Before doing the test do a hard reset. Hold down the reset switch until all leds go off. Then release the reset switch. Now do the connections as per your photo. As soon as you supply the power (and if the connections are as per your photo) the multiplexer will enter an infinite loop sending data on P3. The blue led will blink for ever. The red and green leds will blink if the data sent out by P3 is correctly read by P1 and P2.

Regards Luis

carlo194
Posts: 15
Joined: Sat Feb 02, 2019 3:55 pm
Location: Rome

Re: In the improbable case you need to test the hardware

Post by carlo194 » Mon Mar 11, 2019 10:23 am

Thanks Luis,

The reset on the esp and the microswitch on the board have the same function?

Obrigado

Carlo

Post Reply