NOTHING works - close to suicide

Started by MrGlasspoole, March 12, 2016, 05:35:17 AM

MrGlasspoole

I'm getting crazy, close to suicide, close to the point throwing all electronics out of the window.

Did something like that happen do anybody else?
When the RFM69s arrived i hooked them up do some Nano's and the Node/Gateway example worked.
I also have a Teensy now and was playing with him and tried the LowPowerLab with him (it does not work).
I played with Pro Mini's where i have problems getting it running.
I tried the RadioHead lib...
I did allot of other stuff the last 3 days since Node/Gateway example worked.
Also playing with the Banana Pi and hat the Nano's connected there to test things.

Anyway - since 13 hours i try to get the Node/Gateway example running like before.
I tried 4 different RFM69s connected to Mega's, Nano's, Pro Mini's in all kind of variations...
I did a fresh download of the Arduino IDE. I tried 1.0.6, 1.6.5, 1.6.8...
I did a fresh download of the RFM69 lib and removed all other libs...
I did uninstall the standalone AVRDude and Teensyduino...
I uploaded the code with Win10 on the laptop and Win8.1 on the workstation...
I even turned of the DECT phone on my desk *lol

I receive nothing on the gateway no matter what i do.
I also have permanent the "com port busy" message in the IDE. Never had that before and now on two PCs.

DIO0 --> D2 (INT0)
SCK <-- D13 (SCK) using voltage divider
MISO --> D12 (MISO)
MOSI <-- D11 (MOSI) using voltage divider
NSS <-- D10 (SS) using voltage divider

I know nobody can help me. But i'm getting more and more aggressive.
I don't get it. How is this possible?
Anybody else has days like this?

executivul

Been there, done that, all the time.
Take it slow:
1. test the Arduino environment: upload a simple blink sketch, all ok? Move all the libraries from Arduino sketch folder and download clean RFM69 code.
2. connect RFM69, upload struct_send example sketch, let it start... "sending... nothing" and press R in the terminal, you should see all the registers of the radio, they MUST be different, not all 1111 or 10101, that means some SPI problems. By the way on my cheap Chinese Nanos I have MISO and MOSI inverted! Say whaaaat?!?
3. let the struct send work on one node and upload struct_receive on other node. (Start anoter Arduino instance and select apropriate serial port so you have two terminals running. Or use another computer if available). Also press R on the receive node, do all registers show different values?
4. MAKE SURE you uncomment the radio.setHighPower() in init if using HW chips.

MrGlasspoole

#2
EDIT
I did the test you wrote and it looks like:
1 - 10 - 10000
2 - 0 - 0
3 - 2 - 10
4 - 40 - 1000000
5 - 3 - 11
6 - 33 - 110011
7 - D9 - 11011001
8 - 0 - 0
9 - 0 - 0
A - 41 - 1000001
B - 0 - 0
C - 2 - 10
D - 92 - 10010010
E - F5 - 11110101
F - 20 - 100000
10 - 24 - 100100
11 - 9F - 10011111
12 - 9 - 1001
13 - 1A - 11010
14 - 40 - 1000000
15 - B0 - 10110000

I guess it's normal it is different between sender/receiver.

I had only one time showing up:
[109]  [RX_RSSI:-65] nodeId=-4502 uptime=754446146 temp=ovf
[109]  [RX_RSSI:-66] nodeId=-4502 uptime=754446146 temp=ovf
[109]  [RX_RSSI:-65] nodeId=-4502 uptime=754446146 temp=ovf
But "nodeId=-4502"?
EDIT

Thanks executivul, reading your tips cools me down.

Some of them i already did but i will do it step by step.

Yes some of the Nano schematics out there are different. Not only the SPI.
But thats reason i used the ICSP header - hopefully this one is correct.
I have one from Gravitech and one Funduino.
When i bought the second i was new to all this stuff and did not know it is another one.
Then the trouble started because of the fake FTDI and driver problems >:(

You know the problems with clones:
https://www.youtube.com/watch?v=rVIZx3Cl78k

executivul

Exept the rfm69hw modules all my stuff is fake, or at least bought from ali. Unfortunately I had to chose fakes vs not doing it at all. After I move in the new house I hope to be able to replace them one by one with original chips from reputable sellers placed on custom made pcbs, but for now the wirewrapped fakes must do it.
Clones tend to have CH340(G) ftdi chips, just get the drivers for it and should work ok. Only one lot of 10 Mega 2560 I've bought had problems but I was refunded.
I still have a long way to go with testing to make sure they are reliable enough not to let us in the dark/cold/locked on the outside :)

MrGlasspoole

Ok we wrote at the same time. So please see my edit above.

Clones are ok as long as the chips are original.
I have two original Megas and one original Ethernet Shield. But original are to expensive
to put them in the wall or one in every lamp. A Wiznet5500 for 5€ is ok so you can from
coffee machine to dryer connect everything to your LAN.
Also one temp senor with RFM69+ProMini+case+batteries for 14€ is ok.

joelucid

QuoteRe: NOTHING works - close to suicide

That's the nice part about ordering Moteino's. They do work out of the box.

MrGlasspoole

Quote from: joelucid on March 12, 2016, 09:01:43 AMThat's the nice part about ordering Moteino's. They do work out of the box.
privilege of the rich

executivul

@MrGlasspoole:
1. The inputs to the Arduino connected directly from a 3.3V device do not always work, I've used the voltage dividers + direct inputs (DIO0 and MISO) and it did not work unless lowering the Arduino voltage (using external bench power supply to 5V pin) and providing 4-4.2V. A proper level converter saved my a$$.
2. Also the interrupt seemed to cause a lot of issues on the Mega2560, just removing the attachinterrupt from the init() and calling the interruptHandler() from receiveDone() with some very fast loops polling receiveDone() solved my issues. I DO NOT encourage you to drop interrupts, Felix would ban me if I do so, but just make a test.

@Joe: I have rooms with 6 lights, commanded by rotary encoders (3 inputs each) so it's 24 GPIOs just for the switches and relays, RGB LEDs, SPI, I2C, 1-wire, analog sensors, that adds up. The memory footprint is also bigger. I need 2560. That's why I didn't go the original Mote route.
Clones: nano+rfm+ldo+level shifter end up costing about the same as the original Moteino, not to mention the time taken to wire it all up. I encourage everybody who can get the job done on a nano/promini/328p to get the real thing because "They do work out of the box." as you've said it. For me it's a little too late to ditch more than $1000 worth of chips and change the route now.

joelucid

Quote
privilege of the rich

Arm lebt teuer :-) or the poor live expensive as we say in Germany ...

WhiteHare

Quote from: MrGlasspoole on March 12, 2016, 05:35:17 AM

I also have permanent the "com port busy" message in the IDE. Never had that before and now on two PCs.


Yesterday I upgraded to Arduino IDE 1.6.8 from 1.6.5, and now I'm getting this error message as well if uploading using an FTDI.  Anyone else?  Now it sometimes takes multiple attempts at upload to get past it. 

jra

Based on what I've read I don't think 1.6.8 is quite ready for prime time.  Thus far I've found 1.6.5 to be the most trouble free of the post 1.0.X releases.  On linux, at least.

TomWS

Quote from: jra on March 13, 2016, 12:43:17 PM
Based on what I've read I don't think 1.6.8 is quite ready for prime time.  Thus far I've found 1.6.5 to be the most trouble free of the post 1.0.X releases.  On linux, at least.
In the 'old days' (I won't say how old), you NEVER wanted the even numbered version of a particular Operating System, it was the one that contained new 'feechurs'.  The ODD numbered releases fixed most of the bugs in the even numbered ones...

Frankly, if I have an Arduino IDE that works, I will NOT upgrade.  Worst release management in the industry.
Tom

MrGlasspoole

#12
EDIT
OK I'm sick of the FTDI driver clutter so i soldered pins to a second Pro Mini and use the CP2102 cable.
I can't upload code to my original Nano anymore no matter what driver or Windows. The fake one works *lol
Everybody says the FT232RL is the one to get, but here the CP2102 just works in Win8.1 and Win10.
So no more USB boards for me because then i can use a USB<>TTL i know it works.

Anyway: The RFM69s to not work so i took the RFM12B's and connected them to the Pro Mini's.
I uploaded the send and receive examples and it just works.

Before I go any further i order now some RFM69 breakout boards for breadboard testing - to have good connection
and I can make sure there is no slack joint.
EDIT

I had no time the last days to check where the problem is.
I wrote about the com port problem at the Arduino forum: http://forum.arduino.cc/index.php?topic=386315.0

I will buy Moteino to support LowPowerLab but i don't have the money to but them everywhere in the House.

Quote from: joelucid on March 12, 2016, 03:03:51 PMArm lebt teuer :-)
Das sagen wir Deutschen? Hör ich zum ersten mal :-)

perky

I had strange problems with FTDI drivers with my Win7 64bit setup. Basically if I power the PC up with the cables plugged into the USB ports I got no joy, I have to boot the PC up without them plugged in and then plug them in 1 at a time. Strange, but is the only way I could get them to work.
Mark.

OSBSS

Quote from: WhiteHare on March 13, 2016, 10:16:09 AM
Quote from: MrGlasspoole on March 12, 2016, 05:35:17 AM

I also have permanent the "com port busy" message in the IDE. Never had that before and now on two PCs.


Yesterday I upgraded to Arduino IDE 1.6.8 from 1.6.5, and now I'm getting this error message as well if uploading using an FTDI.  Anyone else?  Now it sometimes takes multiple attempts at upload to get past it.

I confirm this issue on 1.6.8 as well. Tried several chips, same COM port being busy error. Have to try several times till it goes through. Went back to 1.6.7 and works fine now (not that it's perfect, but oh well)