dr-mod / pico-solar-system

Digital version of the classic mechanical orrery
GNU General Public License v3.0
283 stars 25 forks source link

Diagram for assembly #6

Closed mpx0 closed 2 years ago

mpx0 commented 3 years ago

Hey, I really liked your project, so i decided to make it but i couldnt find a diagram or a picture on how to assemble the board with the screen and module.

Can you upload a diagram or a picture?

Cheers

HeatfanJohn commented 3 years ago

Hey, I really liked your project, so i decided to make it but i couldnt find a diagram or a picture on how to assemble the board with the screen and module.

Can you upload a diagram or a picture?

Cheers

I'm curious to see how the Pico connected to the Pico display is then connected to the DS3231. I just ordered a 3D printing of your STL, but I fear there isn't enough room in the case for all three devices (Pico, display, DS3231).

dr-mod commented 3 years ago

Hi, the easiest way would be to get this expansion module then everything just stacks together, you don't need to connect the i2c pins "manually" and the case fits as well.

ae5au commented 3 years ago

Hi, the easiest way would be to get this expansion module then everything just stacks together, you don't need to connect the i2c pins "manually" and the case fits as well.

I've just received this module and found that it is using the I2C1 instead of I2C0 bus on the default pins of GP6 and 7. The version on the Waveshare wiki looks just like my module and I'm betting that the one you developed against looks more like the one on the Waveshare website. I've not found any versioning of the board or even mention of changes so far in Waveshare's documentation.

I'm up and working by modifying line 12 of ds3231.py and updating the port and pin numbers. It would be helpful to at least document that the module might be different than the code expects.

OArndt commented 3 years ago

Hi, the easiest way would be to get this expansion module then everything just stacks together, you don't need to connect the i2c pins "manually" and the case fits as well.

I've just received this module and found that it is using the I2C1 instead of I2C0 bus on the default pins of GP6 and 7. The version on the Waveshare wiki looks just like my module and I'm betting that the one you developed against looks more like the one on the Waveshare website. I've not found any versioning of the board or even mention of changes so far in Waveshare's documentation.

I'm up and working by modifying line 12 of ds3231.py and updating the port and pin numbers. It would be helpful to at least document that the module might be different than the code expects.

I'm running into the exact same problem. However, my edit of line 12 doesn't work. Did you just set i2c_scl = 7 and i2c_sda = 6, or did you change anything else as well? Because for some reason this doesn't work for me - even if my module looks exactly like in the wiki.

ae5au commented 3 years ago

I'm running into the exact same problem. However, my edit of line 12 doesn't work. Did you just set i2c_scl = 7 and i2c_sda = 6, or did you change anything else as well? Because for some reason this doesn't work for me - even if my module looks exactly like in the wiki.

Also "i2c_port = 0" needs to be "i2c_port = 1". I have a fork of the project in my Github that will try both I2C busses and seems to be working well for me so far if you want to give it a shot. https://github.com/ae5au/pico-solar-system/

ae5au commented 3 years ago

The only place I've found Waveshare even reference that there are multiple versions of the board is in the sample code on the Wiki. The ds3231.py file there has the following:

#    the first version use i2c1
#I2C_PORT = 1
#I2C_SDA = 6
#I2C_SCL = 7

#    the new version use i2c0,if it dont work,try to uncomment the line 14 and comment line 17
#    it should solder the R3 with 0R resistor if want to use alarm function,please refer to the Sch file on waveshare Pico-RTC-DS3231 wiki
#    https://www.waveshare.net/w/upload/0/08/Pico-RTC-DS3231_Sch.pdf
I2C_PORT = 0
I2C_SDA = 20
I2C_SCL = 21

The first two devices that I purchased were on Amazon but sold by a 3rd party (not Amazon or Waveshare). The images are of the first version without the solder pads for selecting pins so I'm not surprised that I received the first version.

There is another Amazon listing sold by Waveshare themselves and a little more expensive. The images on it are of the second version but I had noticed that a reviewer posted a photo that was the first version. I ordered that item just to see if I could get a second version and also received a first version. I returned it.

OArndt commented 3 years ago

Interesting. Got mine from Amazon (3rd party) as well. Tried your fork, works perfectly! Thanks! It probably was the i2c_port that was still wrong.

grf692 commented 3 years ago

Got mine from Amazon also. Worked with your fork, thanks !!

ae5au commented 3 years ago

Thanks @OArndt and @gaetan-p for testing. I've submitted PR #8 to bring these changes into this repo.