Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 00:53 20 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Pico with UPS, SD-Card, RTC & WLAN

Author Message
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 187
Posted: 06:28pm 17 Aug 2022
Copy link to clipboard 
Print this post

Hello,

today I took some parts: pico w, RTC module, SD-Card Module, DiP Pi Power Master, some distance holders, glue and created this mini computer.






It is certainly the smallest I ever made :-)

The "mini" can store data and programs on the SD-Card, It has date & time for logging measurements, it can be received by WLAN when using MicroPython, it has an UPS with 10000 mAh akku and a power management with DC input 6-18 volts and has a size of a matchbox.



I tested the SD-Card with an Raspberry Pi 4 Card and listed the files using Picomite "files"  and the "list" commands.



regards
-andreas
Edited 2022-08-18 04:47 by andreas
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 367
Posted: 09:04pm 17 Aug 2022
Copy link to clipboard 
Print this post

Looks good.

Is that a Pico W?  I thought MMBasic didnt run on that flavour?  Or is that why you say "it can be received by WLAN when using MicroPython"?

Not seen that before, but the DiP-Pi PIoT version with WiFi etc looks interesting.

N
Entropy is not what it used to be
 
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 187
Posted: 05:39am 18 Aug 2022
Copy link to clipboard 
Print this post

  Nimue said  Is that a Pico W?


Yes, PicoMite Version 5.070515. And yes, WLAN is not supported by PicoMite. Switching the "operating system" is a matter of seconds. When wireless is required - there is MicroPython  

-andreas
 
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 187
Posted: 05:58am 18 Aug 2022
Copy link to clipboard 
Print this post

After connecting the Dip-Pi Power Master, I used the first 7 Pins of the Pico W to connect the two external devices (SD-Card, RTC). They are listed as "free" or not used by the power master itself.




SD-Card on Pico (VSYS, GND)
===========================
Pin7 = GP5 = CS (SD-Card)
Pin4 = GP2 = CK (SD-Card)
Pin5 = GP3 = MOSI (SD-Card)
Pin6 = GP4 = MISO (SD-Card)

RTC on Pico   (3V3, GND)
========================
Pin1 = GP0 = SDA (Clock)
Pin2 = GP1 = SCL (Clock)

OPTIONS
================================
OPTION SYSTEM I2C GP0, GP1
OPTION AUTORUN 1
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 100000
OPTION DISPLAY 50, 100
OPTION SDCARD GP5, GP2, GP3, GP4

-andreas
 
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 187
Posted: 06:55am 18 Aug 2022
Copy link to clipboard 
Print this post

Here is a PicoMite program to test the "mini". It was run with only the akku connected. No external power source, no USB cable.

It logs: VBAT, EPWR and VSYS.

When connecting a solar panel EPWR will show somting like 16-19 volts and charging the battery. But this morning the 3.7V battery was charged fully to 4.22 volts.





The output of this program:



What I don't understand is the oscillating value of VSYS when using a pico w? Every second value shows VSYS the other value is near zero volts.

-andreas
Edited 2022-08-18 17:00 by andreas
 
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 187
Posted: 07:09am 18 Aug 2022
Copy link to clipboard 
Print this post

Update with time&date logging:  

'Option DISPLAY 50,100
'Option COLOURCODE on

Dim m26 As float = 0.0 ' running mean of VBAT
Dim m27 As float = 0.0 ' running mean of EPWR
Dim m29 As float = 0.0 ' running mean of VSYS

Dim n26 As integer = 0 ' number ob values counted within running mean
Dim n27 As integer = 0
Dim n29 As integer = 0

Const length = 10

Dim fname$ = Right$(Str$(Epoch(now)),8)+".txt" ' generic filename

SetPin GP26,AIN ' VBAT
SetPin GP27,AIN ' EPWR
SetPin GP29,AIN ' VSYS

Open fname$ For output As #1
 Print #1,"Powerlog started: "+Date$+" um "+Time$+" Uhr"
 Print #1
Close #1

While true do

 ClearScreen

 n26 = Min(length, n26+1)
 m26 = m26 + (0.25 + 37*Pin(GP26) / 22 - m26) / n26
 Print Date$+" "+Time$+" GP26 = ";m26;" V (VBAT)"

 n27 = Min(length, n27+1)
 m27 = m27 + (0.7 + 267*Pin(GP27) / 47 - m27) / n27
 Print Date$+" "+Time$+" GP27 = ";m27;" V (EPWR)"

 Print Date$+" "+Time$+" GP29 = ";Pin(GP29)*3;" V (VSYS)"
 Print
 Open fname$ For append As #1
   Print #1,Date$+" "+Time$+" GP26 = ";m26;" V (VBAT)"
   Print #1,Date$+" "+Time$+" GP27 = ";m27;" V (EPWR)"
   Print #1,Date$+" "+Time$+" GP29 = ";Pin(GP29)*3;" V (VSYS)"
   Print #1
 Close #1
 Pause 1000

Loop

Sub ClearScreen

 For i = 1 To 50
   Print
 Next i
 Print @(0,0);

End Sub

-andreas
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8567
Posted: 07:50am 18 Aug 2022
Copy link to clipboard 
Print this post

  Quote  What I don't understand is the oscillating value of VSYS when using a pico w


GP29 is connected to the wifi chip and used as the CLK pin
 
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 187
Posted: 09:09am 19 Aug 2022
Copy link to clipboard 
Print this post

  matherp said  
  Quote  What I don't understand is the oscillating value of VSYS when using a pico w


GP29 is connected to the wifi chip and used as the CLK pin


many thanks for this info!
-andreas
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024