Quantcast

Gumstix Pi HAT Sensor Board schematic

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Gumstix Pi HAT Sensor Board schematic

Scott Ellis
In particular, which SPI CS lines are the barometer and IMU respectivelly using.

But a full schematic would be nice.

The Geppetto interface probably provides this. I'm just not seeing how to get it.
I'm using a Chrome browser on Windows.

Can someone guide me?

 I'm trying to build up a DTS for the board.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Andrew C. Smith
Hey Scott,

Will do, I'll get a schematic posted to the pubs.gumstix.com site later today.

FYI, in Geppetto you should be able to hit the "Autodoc" button and it will give you a document that outlines the important information (connections).  Also, we have an internal system which generates device tree information for designs automatically.  We are in the process of opening it up for public use.  Does something like that interest you?


Thanks,

Andrew
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Scott Ellis
Thanks Andrew, a schematic would  be great.

I would be interested in seeing the output of the DTS auto-generator.

The RPi dts overlays have some non-standard extra features.
Does your tool handle those?

I'm using a 4.9 kernel from the RPi official repo and here is what it looks
like using the stock config and overlays for an RPi2/3 kernel

rtc     i2c      ds1340     standard rtc, driver built, use i2c-rtc-overlay.dts
temp    i2c      tmp102     hwmon, driver not enabled, need dts
pressure  spi      ms5611     iio, driver not enabled, need dts
accel     spi      lsm303d    iio, driver not enabled, need dts
gyro      spi      l3gd20h    iio, driver not enabled, need dts

So only the RTC will work out of the box.

I don't mind working on this and trying to get changes pushed upstream.

Just need a schematic ;-)


Where is the AutoDoc button in the Geppetto UI?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Scott Ellis
The thermometer support is added

  https://github.com/raspberrypi/linux/pull/1976

The thermometer is placed right over the CPU so it doesn't really read ambient temperature.

The RTC appears to work. I can talk to it at least. Waiting on a coin-battery to fully test.

Any luck getting that schematic?



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Scott Ellis
All of the LEDs work.

Still trying to get the barometer to work.

I added the following kernel config and rebuilt.

  CONFIG_MS5611=m
  CONFIG_MS5611_SPI=m

and wrote a new ms5611-spi-overlay for the RPi boards.

Since you have LEDs on gpio 16 and 18 and claim gpio 17 for the IMU according to the datasheet, I assume you must be using SPI bus 0 for the barometer. (GPIOs 18, 17 and 16 are the CS pins for SPI bus 1).

I've tried both CS 0 and CS 1, but in both cases I get errors when the ms5611 driver tries to read the chip PROM

...
[    3.522566] rtc-ds1307 1-0068: 56 bytes nvram
[    3.536646] iio iio:device0: PROM integrity check failed
[    3.648000] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
...

It's difficult to get a scope probe under the barometer cap to get to the pins.

I haven't used the ms5611 kernel driver before so I am not ruling that out, but I know the SPI bus works fine. I use it all the time with the RPIs.

Can't you just verify for me which CS pin on SPI0 the barometer is supposed to be using?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Scott Ellis
The ambient temp sensor is little better with the Pi Hat Sensor board on an RPI0-w.

For reference in the same physical location

standalone thermometer - 71.2 F
one-wire ds18b20 therm on an RPi - 69.8 F

The Pi Hat Sensor board

rpi0w - 76.55 F
rpi3 - 87.80 F
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Andrew C. Smith
Hi Scott,

I'm sorry for not getting this to you yesterday, I was having troubles with our pubs server.  I've attached the schematic here.

I mentioned the "Autodoc" button.  The document that this produces is the technical specifications listed in the store here.  I took a look at it and unfortunately it is missing necessary information (CS, INT, DRDY pins).  I will get that fixed.


Thanks,

Andrew

pihat_sensor_board.pdf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Andrew C. Smith
Scott,

Would you be willing to share your image and device tree (overlay) that you're using with this board?  Would be helpful for us while we debug our internal device tree system before it goes live.


Thanks,

Andrew
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Scott Ellis
In reply to this post by Andrew C. Smith
Thanks.

The barometer works then. Seems pretty accurate compared to the local weather office.

If anyone wants the dts I'm using just ask.

Did you see this note in the MS5611 datasheet?

"The best noise performance from the module is obtained when the SPI bus is idle and without
communication to other devices during the ADC conversion."

With the MPU on the same SPI bus, the SPI lines are likely never going to be idle.

That and using GPIO_4 for a CS is pretty non-standard.

Why didn't you use SPI bus 1 for either the IMU or barometer?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Scott Ellis
Our posts crossed.

You not only need the dts files I'm using, but you will also need to rebuild your kernel.

Let me finish up with the IMU since I'm going to add that to the same gumsense-spi-overlay.dts.

I'll try to upstream an ms5611-spi-overlay later (using GPIO_4 for a CS is pretty non-standard), but for initial testing I'm just hacking a custom gumsense overlay.

Give me a few hours.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Andrew C. Smith
Awesome, thanks Scott.

To answer the question about non-standard GPIO selection and SPI choice.  The reason is that the board was made without knowledge of which pins are "supposed" to be connected to any specific device.  In Geppetto, a user should be able to make any connection they want (even non-standard) as long as it's an option in Geppetto.  When the design is done, a software image will be generated (DTB) that will use whatever pins they've connected.  We're almost there but we have some bugs to work out.  We also have the ability to prioritize connections.  So if there is a standard connection for something, it will be shown at the top of the list of available connections with a Linux "Tux" approved icon ... or some other OS icon.  This gives less advanced software users a good rule of thumb about where to connect pins.  The choice of connections was done to highlight the flexibility of Geppetto.  I'd need to look it up to see what GPIO pins should be prioritized.  If you've got a list of them, I can input it into the system pretty quickly and that would be a big help.

As for the SPI choice.  The barometer was put on the same SPI bus as the IMU because that's what is done on the AeroCore2.  In the case of the AeroCore2, it's necessary for the devices to share the same bus because of pin availability.  Here we don't have that constraint, so as you said it probably should go on another bus.  When another spin of the board is done we'll change the bus.

Thanks again,

Andrew
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Andrew C. Smith
I should also mention, the "Technical Specifications" document in the store I mentioned earlier has been updated and now should have all the information necessary to work with the board ... without the schematics.

Please let me know if you see any issues or if you come across other boards that do not have the necessary documentation.


Thanks,

Andrew
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Scott Ellis
In that Technical Specs doc you specify the I2C addresses for the IMU components.
That's irrelevant since they are SPI attached on your board, not I2C.

The important details are the SPI bus and CS pins for each component which are not there.

For the barometer you make no mention of the CS line that is used.

So for both of those components the schematic is still necessary to do any work.

Since the document is just about the Pi Hat Sensor board, I would not make any
mention of I2C when talking about the IMU components or the barometer.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Scott Ellis
Not having much joy with either of the IMU components

...
[    3.468222] iio iio:device1: l3gd20: WhoAmI mismatch (0x0).
[    3.473913] st-gyro-spi: probe of spi0.1 failed with error -22
[    3.479913] spi0.0 supply vdd not found, using dummy regulator
[    3.485836] spi0.0 supply vddio not found, using dummy regulator
[    3.492281] iio iio:device1: lsm303dlm_accel: WhoAmI mismatch (0x0).
[    3.499484] st-accel-spi: probe of spi0.0 failed with error -22
...

Do you have a dts for another board where you used these same components?

There are multiple ST devices to choose from and I probably have that wrong.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

arun
Hi Scott,

I had needed this driver hack earlier to get the IMU working earlier on one of our custom boards. I had faced the same WhoAmI mismatch error and remember doing something on the lines of what I have done in the attached patch.

Hopefully this works for you.
Arun

On Wed, Apr 26, 2017 at 1:13 PM, Scott Ellis [via Gumstix] <[hidden email]> wrote:
Not having much joy with either of the IMU components

...
[    3.468222] iio iio:device1: l3gd20: WhoAmI mismatch (0x0).
[    3.473913] st-gyro-spi: probe of spi0.1 failed with error -22
[    3.479913] spi0.0 supply vdd not found, using dummy regulator
[    3.485836] spi0.0 supply vddio not found, using dummy regulator
[    3.492281] iio iio:device1: lsm303dlm_accel: WhoAmI mismatch (0x0).
[    3.499484] st-accel-spi: probe of spi0.0 failed with error -22
...

Do you have a dts for another board where you used these same components?

There are multiple ST devices to choose from and I probably have that wrong.



If you reply to this email, your message will be added to the discussion below:
http://gumstix.8.x6.nabble.com/Gumstix-Pi-HAT-Sensor-Board-schematic-tp4971311p4971324.html
To start a new topic under Gumstix, email [hidden email]
To unsubscribe from Gumstix, click here.
NAML


0001-BRD9-362-Add-IMU-support-for-SPI-on-overo.patch (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Scott Ellis
Hi Arun,

I had to use your patch for the accel/mag and needed another I came up with for the gyro.

https://github.com/jumpnow/meta-rpi/blob/gumsense/recipes-kernel/linux/linux-raspberrypi-4.9/0004-iio-st_gyro-Add-l3gd20h-device-name.patch

I uploaded an image for the RPi3 here

  http://www.jumpnowtek.com/downloads/rpi/gumsense/

The only custom overlay is for the SPI devices.

The I2C devices (RTC, TMP102) use standard RPi overlays.

The overlay is here

  https://github.com/jumpnow/meta-rpi/blob/gumsense/recipes-kernel/linux/linux-raspberrypi-4.9/dts/gumsense-spi-overlay.dts

See the gumstix-spi-overlay-readme.txt in the download dir for some instructions.

I made things optional in the DTS because I didn't find a combined ST accel/mag driver and so was only able to enable one at a time.
I don't think it's possible to configure two kernel drivers for one CS line.

But you can use /dev/spidev0.0 to get access to both at the same time.

A sample config.txt for the board would look like this

enable_uart=1
dtoverlay=pi3-disable-bt
dtparam=i2c_arm=on
dtoverlay=i2c-rtc:ds1307
dtoverlay=i2c-sensor:tmp102
dtparam=spi=on
dtoverlay=gumsense-spi:accel,gyro,pressure


The Yocto layer to build the image is github.com/jumpnow/meta-rpi the [gumsense] branch.

If your not sure, use the instructions here to build making appropriate substitutions.

  http://www.jumpnowtek.com/rpi/Raspberry-Pi-Systems-with-Yocto.html

I didn't setup the IRQ/data ready pins for any of the devices.

And there is some standard stuff to be shutoff to allow use of the UART, but I don't have
one of your GPS modules to test with anyway.

I'll come back to the IRQ/data ready lines later. I'm suspecting something is wrong with my LSM303D.

But I have to get back to some paying work.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Scott Ellis
Any feedback?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gumstix Pi HAT Sensor Board schematic

Andrew C. Smith
Hi Scott,

Thanks for the awesome work.  We're currently trying out everything you've posted to see if we have the same problems.  We'll post back when we have an update.


Thanks,

Andrew
Loading...