What I want to do
Yesterday (5/17/2016) I received a Riffle beta board in the mail. Nicely packa...
Public Lab is an open community which collaboratively develops accessible, open source, Do-It-Yourself technologies for investigating local environmental health and justice issues.
Public Lab chatroom
Reset your password
Read more: publiclab.org/n/13123
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.
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.
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:
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.
The big question of course is "Why". Today I will:
I do have RTC and SD modules that can connect to standard Adruino for comparison.
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.
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.
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.
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.
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.
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.
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.
@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?
I have a small list of suggested modifications, all dealing with power. What / where / when is it appropriate to 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!!
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.
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..
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:
Sorry not to scale, but I think the idea is clear? :)
You must be logged in to comment.