Public Lab Research note


Riffle first experience

by ggallant | May 18, 2016 12:22 18 May 12:22 | #13123 | #13123

What I want to do

Yesterday (5/17/2016) I received a Riffle beta board in the mail. Nicely packaged with all the expected components. My goal is to evaluate the Riffle as a data logging tool.

My attempt and results

The first 2 hours of using the board were a complete failure. My environment is a quad core laptop running Fedora 23 Linux and I was unable to connect to the Riffle via USB. The device was usually detected but a encountered a number of errors including:

No serial port detected. Invalid IOCTL. Unable to upload. Connected one time then failed.

I have other Arduino style boards with the CH-340 chip and they worked OK. I also booted Windows on the same laptop and was unable to do anything.

After a few hours and the following experiments it is working better:

  1. Tried different USB ports on laptop.
  2. Changed to a short USB cable.
  3. Attached the 3.7 LiPo battery.
  4. Added a powered USB hub.

With each of the hardware changes the results became more stable.

Eventually I was able to build and upload the three example sketches. Currently the blink and real time clock setup work without problem. The data logging example is random. During setup it always performs at least one reset (sometimes many) and then usually works.

I am guessing that there is a power problem. Either my laptop cannot supply sufficient power or the Riffle is consuming too much.

Questions and next steps

The big question of course is "Why". Today I will:

  1. Undo and repeat yesterdays activities.
  2. Try with different computers.
  3. Examine signals with scope.
  4. Isolate the data logging reset problem.

I do have RTC and SD modules that can connect to standard Adruino for comparison.


13 Comments

Glad to see it got working, at least somewhat.

the trouble is troublesome, those are all brand-new errors for me and definitely sound like issues with the riffle's power system.

Reply to this comment...


I have isolated it to the SD card power turn on. There is 100% repeatable noise spike that is 1.3usec long and drops 1.9V below 3.3V. Trying to upload scope screen to PC.

Reply to this comment...


riffle.PNG

This is a screen shot of the noise spike when turning on power to the SD card. The yellow signal is the CPU D10 line being used as a sync signal. The blue trace is Vcc. Both signals and ground were measured on the expansion I/O header.

Reply to this comment...


i'm talking out of my depth here-- I know basic electronics and am not an electrical engineer by any stretch-- but a quick 1.9v dip sounds to me like one fo two things: a capacitor charging up in the system, which would explain why adding the battery improves the situation because it charges faster.

or you're overcoming the forward voltage drop of the schottky diodes and adding the battery helps because its on the other side of half the schottkys.

riffle-1_7_1-schem.png

Reply to this comment...


Mathew - This is probably the result of a capacitor discharging, C9 is only 0.1uf. I suspect that C14 needs to be much larger (100uf) or add multiple bulk caps throughout the board. The yellow negative going signal is my sync signal. It is occurring approx 65msec after reset.

I plan on doing more experiments today. Currently the board is connected to a powered USB hub. I want to try different combinations of USB and battery power.

It occurred to me that my initial total failures were with the LiPo battery installed and connected to a Laptop USB port. Perhaps the battery needed to be charged and there is insufficient power available.

Reply to this comment...


It would make sense that the riffle's boot up over draws one of the capacitors.

On the Lithium Ion battery issue, can you clarify a little for me? are you thinking that the battery charger was pulling too much and there was insufficient power available for the riffle? It sounded before like it improved stability.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


I think the 500ma that can be supplied by the host USB port can be misleading. The spec says it must be able to supply 100ma and can switch to 500ma under proper conditions. Not sure if dumb powered USB ports behave the same. I also have found that my linux laptop can be stingy.

Don did some experiments with the charging circuit prior to releasing the board. Perhaps he can elaborate on the amount of current being consumed by the charger.

On a separate note. I changed my voltage monitoring point from the IO connector to the Vcc side of C14. The voltage spike/drop is not as significant but of similar duration and sufficient to reset the processor. Added a second 10uf cap in parallel with C14 (20uf total) and the noise is reduced and CPU is NOT resetting!!!

Getting waveform images from my scope is very difficult. It is one of those no-name Chinese scopes whose manufacturer "Atten" no long lists scopes on its site.

Reply to this comment...


@ggallant -- Wow, this is fantastic detective work. Does it seem that you were able to resolve the uC resetting issue with the extra cap parallel with C14?

I wonder if this would've addressed the issue that @cfastie was having when the Riffle was placed in the freezer? Perhaps the board was resetting when attempting to write to the SD card and needing extra power, and the cold lithium battery couldn't provide it ... whereas a capacitor (charged more slowly by the battery) could've?

In any case, seems like a good idea to put 20uF or 100uF at C14?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Don,

I have a small list of suggested modifications, all dealing with power. What / where / when is it appropriate to comment?

George

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


I just got a new laptop with Windows 10. Installed the Arduino IDE and plugged in the riffle. Couple of sounds relative to a new device being plugged in. No device in the Arduino port tab.

Went away for 15 minutes. Upon returning I restarted Arduino and opened the device manager in preparation of going thru a grueling driver install. Like magic the CH340 was attached as COM3 and ready for action.

Being a dedicated Linux user this was a pleasant surprise!!

Reply to this comment...


George, that's my experience too. I was in a rush to update the sketch on an Arduino so I installed the Arduino IDE on a new Windows 10 machine and plugged in the board and no go, I had to use an old computer. A few days later I prepared to beat my head against it and it was working fine.

Arduino requires patience.

Chris

Reply to this comment...


A friend with 3D printer made these battery holders for the riffle. She printed two sets with slightly different inside diameters. I have a loose one on top and a tight one on bottom. I think a better design would be the tight fit with an open slot.

They are attached to board with 4-40 US screw and insulating washer..

batter-clip-1.jpg

Reply to this comment...


This is gorgeous! So cool!

(Were you able to use the washer without bumping into any components on the board? Been worried bout whether using those mounting holes would tend to pop some parts off accidentally ...)

What sort of enclosure are you planning on using? It's really nice how these loops allow the battery to avoid smashing the main PCB ...

Another geometry that'd be fun to try (is this possible / easy?) -- if trying to use a bottle, or PVC pipe -- might be:

IMG_20160623_160711960.jpg

Sorry not to scale, but I think the idea is clear? :)

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Login to comment.