-
Notifications
You must be signed in to change notification settings - Fork 3
Hypnos Updates
Author: Bao Nguyen
- Can we pick a diode that has lower leakage current?
Show More
Operating voltage of uSD is 2.7V to 3.3V. The first spec is that forward voltage drop at 150mA need to be lower than 0.5V. If voltage drop exceed this number, the SD card is not guaranty to have enough power to write. Next criteria would be low reverse current at 3.3V reverse voltage.
In the previous post, we use CUS10S30 . This diode has low enough forward voltage drop and 30uA leakage current at 3.3V. 30uA and 1.7V (after reverse voltage drop) is enough to light up the power LED.
Let's pick an diode with lower leakage current:
- SM5817PL-TP - Vf 0.3V at 200mA, 3uA reverse current at 3.3V
- SBR2A40P1-7 - Vf 0.35V at 200mA, 8uA reserse current at 3.3V
- DFLS140-7 - Vf 0.4V at 200mA, 1uA reserse current at 3.3V
Test code for leakage current - diode: testcode.zip
Author: Bao Nguyen
- A diode can reduce current draw to 30uA
Show More
The current issue is that when the Feather goes to sleep, there is a 300uA leak when 3.3V rail is shutdown and SPI pins return to pulled up. The first attempt for the hardware patch is adding a Schottky diode like below. The probes are between the 3.3V RAIL and the VCC of the uSD card. uSD card has operating voltage : 2.7V to 3.3V.
Just like any other SD card code, once communication is completed, the 3V3 rail is switched off. With the diode, we go from 300uA to around 30 uA. With 30 uA, the 3.3V LED will still turn on dimly.
We were able to to archive 0uA (based on the accuracy of the multi-meter), with and without the diode through software.
digitalWrite(5, HIGH); //< Disabling all pins before going to sleep.
digitalWrite(6, LOW);
pinMode(23, INPUT);
pinMode(24, INPUT);
pinMode(10, INPUT);
The hardware can help reduce sleep current down to 10 times, but software fix will be best.
Author: Bao Nguyen + Grayston
- SD card seem to have it SPI pins leak current back to 3Vrail
Show More
To find a fix with Loom, Marshal Horn has suggested a patch by re-config the mode of the SPI pins.The easiest way to interface the Hypnos with Loom is externally though the Arduino Sketch:
- In setup, as close to the beginning as makes sense, insert the following.:
pinMode(5, OUTPUT);
digitalWrite(5, LOW); // Sets pin 5, the pin with the 3.3V rail, to output and enables the rail
pinMode(6, OUTPUT);
digitalWrite(6, HIGH); // Sets pin 6, the pin with the 5V rail, to output and enables the rail
- To make ensure Loom is aware of the components on board, the following needs to be added to the config json within the 'components' array:
{\
'name':'SD',\
'params':'default'\
},\
{\
'name':'DS3231',\
'params':'default'\
}\
This sets up the DS3231 RTC for time stamping and interrupts, as well as the SD for reading and writing. If the SD card fails to initialize consistently, ensure your enabling the power rails as the SD needs them to function.
- Within your main loop, place the following code before and after the Loom.sleep() function:
Before:
digitalWrite(5, HIGH); //< Disabling all pins before going to sleep.
digitalWrite(6, LOW);
pinMode(23, INPUT);
pinMode(24, INPUT);
pinMode(10, INPUT);
After:
digitalWrite(5, LOW); //< Enabling all pins after wake up has completed.
digitalWrite(6, HIGH);
pinMode(10, OUTPUT);
pinMode(23, OUTPUT);
pinMode(24, OUTPUT);
The fix is under testing by Max and will be flashed for longer term testing for SmartRock project.
Author: Bao Nguyen
- Testing current from SD card to determine bug fix
Show More
Here is the test with SD.h library: With Sandisk 16Gb BlackState | Current |
---|---|
Idle | 0.81 mA |
Read/Write | 23mA |
With Sandisk Ultra 16Gb
State | Current |
---|---|
Idle | 0.73 mA |
Read/Write | 20mA |
Here is the test with SDFat.h library: With Sandisk 16Gb Black
State | Current |
---|---|
Idle | 0.93 mA |
Read/Write | 13.75 mA |
Sleep | 0.18 mA |
With Sandisk Ultra 16Gb
State | Current |
---|---|
Idle | 0.86 mA |
Read/Write | 14.4 mA |
Sleep | 0.17 mA |
PS: Thank you Max for his rigorous testing of the Hypnos V2. He helped identified the source of current leak.
Author: Bao Nguyen
- 3VRail does not turn off completely if there is SD card.
Show More
After some testing with the code, it seems that the CS (Chip Select) is leaking current back into the 3VRAIL after the rail has been cur off. The schematic shows that CS is pulled up to 3VRAIL => 3.3V from I/0 will source the 3VRAIL when released from communication protocol. Removing the 80k that pulls the system up to 3VRAIL seems to help if SD card is not initialized.The current leak is detected from MOSI, MISO, CLK when the SD card is initialized. One suggestion from Marshal Horn that a Schottky Diode with low forward voltage drop should be placed between the 3.3VRAIL and the SD card VCC. This can prevent current from flowing back to the rail and turn on the LED.
PS: Dr.Chet wanted the LED for easier troubleshooting, and it really helped.
Author: Bao Nguyen
- 5V line for the final PCB does not work. Bug found and fixed.
Show More
Bug found at N-MOSFET for the 5V rail. The footprint layout swap the Drain and Gate. The fix has been applied for the latest push.Author: Bao Nguyen
- LEDs, 5V current draw work as expected
Show More
At the moment, V1 is still out for long term basic functionality tests like RTC and SD cards. Back in the lab, V2 PBCs have arrived but only the MOSFET circuitry is soldered. As the test to simplified the circuit in comparison to V1, two resistors are removed and shorted. With this new circuit, the LEDs light up as expected, good voltage output.
To test the trace width and Mosfet capability, 15-ohm resistor is placed across GND and 5V rail. The current draw is recorded as 0.3A with voltage drop at 5Vrail -> 4.7 Volts. With the design, 0.3A should be the max current for the 5V rail. More tests will be performed on the 3Vrail for later updates.
Extra: Shorting the EN and GND would shutdown the 3.3V regulator. This is a neat trick for "shipping mode". User once received the board can just remove the jumper and the system would boot up normally.
Author: Bao Nguyen
- Refine Hypnos V1 design with LEDs
Show More
While Hypnos V1 is still going through testing, functionality is stable. To make troubleshoot the code/hardware easier, some LEDs is added for each power rail. This LED only turn on when the rails are being switched on. Some improvement from the old design to ensure the proper functioning of Feather. Here are the changes made from V1 to V2:
- Add 2 low power LEDs with current limiting resistors
- RTC is now powered from 3V3 instead of Vbat (using power from Vbat turns on Feather Battery Charger LED)
- Pull up resistor for SD chip select just like adalogger
- Rounded PCB corner
- Move the reset button to the middle of the board - mechanically more stable
- Add solder jumper for RTC-INT, normally connected
Author: Bao Nguyen
- Hypnos V1 proves that it is fully functional
Show More
Hypnos is sent out to 3 different projects for long term testing and also design feedback.The project that use Hypnos V1 for testing are:
- Sitkanet
- Loom
- SmartRock
Once Hypnos V1 is tested for long term deployment, Hypnos V2 will be ordered + test for extra functionality.
Author: Bao Nguyen
- SD card fails to initialize, power rail was not turn on before accessing the card
Show More
When testing the first Hypnos PCB, we was able to get the power control as well as RTC DS3231 to work. However, for the SD card, we couldn't get the same behavior as Adafruit Adalogger. The sample sketch that we ran is called Datalogger in File -> Examples -> SD -> Datalogger.
The Serial Monitor keeps saying the SD card fails to initialize. The SD card is powered when pin 5 is set to LOW, however, digitalWrite(5, LOW);
is in the loop()
. When the setup()
is run, the code check for the SD card, but the card is not yet powered so the program stuck in a while(1)
loop. By moving digitalWrite(5, LOW)
to setup()
, the SD card work as expected.
- Project Planning
- Prototyping
- Synthesis
- Lab Testing
- Field Testing
- Finalization/Production
- Poster/Presentation
- Publication
- CRES
- Dendrometer
- Djinn
- eDNA Sampler
- eGreenhouse
- Evaporometer
- FloDar
- HyperRail
- Hypnos
- Isotopic Sampler
- Lilypad
- Loom
- Micro-Aggregating Sewer Sampler
- Mooraca
- OPEnSampler
- Pied Piper
- Rag Guard
- Rain Gauge Calibrator
- RainSavor
- RFID Moisture
- Sap Flow Meter
- SitkaNet
- Slide Sentinel
- Smart Rock
- Spool
- WeatherChimes
- Weed Warden
- Wisp
- Archived Project Blogs