TinyZero + GPS + Analog

dnl · 5 · 11354

dnl

  • Full Member
  • ***
    • Posts: 15
    • View Profile
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.



lennevia

  • Administrator
  • Hero Member
  • *****
    • Posts: 437
    • View Profile
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!

Cheers,
RĂ©na


dnl

  • Full Member
  • ***
    • Posts: 15
    • View Profile
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:
  • ASM2021-R, TinyZero
  • ASD2501-R , GPS
  • ASD2511-R-P, Barometric Pressure
  • ASD2009-R-T, Tinyshield Proto Board
  • AST1021, Temperature Sensor Wireling
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.


lennevia

  • Administrator
  • Hero Member
  • *****
    • Posts: 437
    • View Profile
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.


dnl

  • Full Member
  • ***
    • Posts: 15
    • View Profile
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.


 

SMF spam blocked by CleanTalk