TinyCircuits Forum

TinyCircuits Products => TinyDuino Processors & TinyShields => Topic started by: dnl on March 20, 2022, 12:32:09 AM

Title: TinyZero + GPS + Analog
Post by: dnl on March 20, 2022, 12:32:09 AM
I'm building a gadget to produce some values needed for astrophotography. A GPS is the key item, and the ASD2501-R is working fine. Woohoo!

I was trying to add an analog sensor, but I could not get sensible values on A3 or A0. A test code that read the sensor reported correct results for both A/D inputs. Adding that identical code to a program using the GPS produced nonsensical results regardless of the input. Debugging eventually lead me to this call:

Code: [Select]
SoftwareSerial swuart( GPS_RXPin, GPS_TXPin );

It seems that executing the above was the source of my A/D problems. Worse yet, the effect lingers even when the known-good test code was reloaded. Turning the TinyZero off and then restarting restored correct A/D function.

As grep is my friend, it now appears an analog sensor is a non-starter as all the analog inputs are consumed by the GPS (GPS_TXPin = A0, GPS_RXPin = A1, GPS_SYSONPin = A2, GPS_ONOFFPin = A3) and I2C (SDA = A4, SCL = A5).

Please advise.

Title: Re: TinyZero + GPS + Analog
Post by: lennevia on March 21, 2022, 12:38:54 PM
Hi there,

There's definitely a pin conflict here. We list all of the pins used by boards under the Tech Specs tab on the product pages for future reference, and we have a TinyShield Compatibility Matrix here for our boards: https://learn.tinycircuits.com/TinyDuino_Overview/#tinyshield-compatibility

Can you tell me all of the hardware components you are using? Is the analog sensor the only way to get the data you want? Hopefully we can come up with a workaround!

Title: Re: TinyZero + GPS + Analog
Post by: dnl on March 21, 2022, 08:26:15 PM
My project is now complete once I found the reason why my analog sensor wasn't working. My first choice was a TMP36, an analog thermal sensor; I used your Temperature Sensor Wireling instead.

The complete stack is:
I didn't use the temperature sensor on the ASD2511 as it reflects board temperature, not true ambient.

The code running on the TinyZero will support either the proto board or the Wireling Adapter. As I only needed one wireling for this project, I opted to connect it via the proto board. I also wrote a Python GUI that displays the data so it can be copied into other astrophotography applications.
Title: Re: TinyZero + GPS + Analog
Post by: lennevia on March 22, 2022, 06:26:10 PM
That's great! I'm glad you were able to use a different sensor to get the results you need.

Do you plan on posting/publishing your project somewhere? We would love to share it once you do! Hackster is a great place for posting projects, and I'm sure this project in particular would be really popular there.
Title: Re: TinyZero + GPS + Analog
Post by: dnl on March 23, 2022, 12:53:52 PM
I've thought about publishing it somewhere. Here are some images of the final gadget and its GUI, which continually updates while connected. Though the screenshot is from a Linux system, it will be run from a Windows laptop.