Electron Carrier Board

Agreed, that vent is where the condensation comes from. But, if you dont have that, and you have pressure changes, it will either come through your cable glands or through the seal of your case. The vent is so your seals do not break down over time – and to prevent the box from exploding in rapid pressure changes like experienced in airplanes.

@mikemoy

Thank you for taking a look and for your comments. This is timely as I need to get the next spin of the board out this week.

A) The connector for Solar is not polarized so I guess I did not pay attention to the connection. Thank you for catching this.

B) There are two cases here. 1) When the barrel connector is not used, GND BREAK is connected to GND. The idea of D1 was to protect against reverse current on the non-polarized Solar connector. I thought this was important since I am using a polarized capacitor C2 which could be damaged. 2) In the case where the barrel connector is used, GND BREAK is disconnected from GND and the Solar input is effectively disconnected. Since the barrel connector is polarized, I did not think it needed reverse current protection. Should I be thinking of this differently?

C) I am relatively new to this area so I am open to suggestions. I want to protect the circuit from ESD and over-voltage on the external wires. In this circuit, there are power wires (Vin, Solar, and Vcc) and i2c wires (SDA, SCL, SDA1, SCL1). I used TVS elements to protect the i2c wires as they have low capacitance and will not block the rapidly changing clock and data lines. For the power lines, I use varistors as they are better suited to absorbing large amounts of energy on slowly changing lines. Do you have a link where I can see how and why to employ a fuse in front of the Varistors on the power lines?

Thank you again, Chip

A) Ok, Just a bit confused on solar being not polarized. Is “solar” a solar panel connection ?
B) I think I just need to understand what the solar connection is. If it is a solar panel I dont get how its not polarized.
C) I do not have a link, but there are many reasons and ways to use a TVS. without boring you to much it really depends on the application. This image below is the most common way its is used on power lines.

Basically, as you know when the TVS clamps, and depending on the surge it could clamp and not recover to an open state again. This is what the fuse is for. So if the TVS does do this the fuse will not let the input source fry because its output is now shorted. in these situations the fuse should be a slow blow, to give the TVS time to clamp, and release on the spike but not blow the fuse for a short duration spike. Not saying you need a fuse, because I dont know exactly the whole setup. Its your call if it warren’s one or not :wink:

@mikemoy

A) Yes, Solar is a solar panel connection and I was simply going to use a two pin header for this connection. I sometimes hook up these connections or reverse the waterproof connectors to the panels so that is why I wanted to put protection there. having a separate Solar connector may make more sense after this post as well.

B) The DC-in connector will be polarized (2-pin JST) so no reverse current needed.

C) I think you are pointing out an issue that I had not considered but should have - what happens if the Varistors are tripped? I will need some sort of fuse protection. I need to do a little more reading but, here is what I am thinking. Take DC-In. This is a 5V @ 2A power supply and shorting it would likely not be good. I could use a PTC resettable surface mount fuse like this one. Which would trip a 2A after 500 mSec limit the current to 1A and only introduce 90mohms of resistance (at least until it trips once) and is small and fairly cheap. I would need to size the fuses for Vcc and Vin to reflect lower currents (800mA max). I know there are other fuse technologies and it seems you know a fair bit about this so, does this make sense to you? Am I missing anything else?

Thank you very much for your input.

Chip

I see now. FWIW, if you would like to not have to worry about how you connect the solar panel wiring, you could always use a surface mount bridge rectifier. This way it wont matter which way you wire the panel.

I was going to suggest that people do use a PTC instead of a fuse but each method has its application.

Don’t mean to cause you to be overly concerned about all of this. I just come from a background where I design things for industry so I have seen customers do all kinds of crazy things so I typically design for worst case.
If this is only going to be used by you then some of these things are not needed. For instance, if used by you then you wont have to worry about someone throwing on a 12v or 24v wall wart just because the barrel jack fit and thats all they had laying around.

Feel free to PM me and i’ll give you my number if you would like to talk about it. Don’t want to bore the forum with all the dirt.

3 Likes

Thank you all for your comments especially @mikemoy for taking my call yesterday.

I plan to send this out to OSHPark on Monday. Here are the changes from v1

  • Added fuses to protect external power
  • Got rid of Earth Ground - going to have this device floating.
  • Added a user switch - I will use it to turn off the Electron LEDs and save power / heat
  • Removed the barrel connector - just two JST connectors - LiPo and DC / Solar in
  • Improved the logic and the power path for powering on and resetting the power in software

I have split the schematic into two sheets to make it more readable. Please let me know if you have any comments or suggestions.

Thanks, Chip

@chipmc

This is a great project and very informative discussion.

I’m also interested in using the TPL5010 external watchdog. Are you going to provide some example code that demonstrates how your are using the timer. I saw your explanation (see below), but for us new users it would be helpful to see somr code as well. Again, great project - lots to learn here.

Thanks

It will work like this:

  1. Connect the “wake” pin from the watchdog to an interrupt enabled pin on the Electron
  2. The Electron will have a whopping 20ms to “kick the dog” using a “Done” line
  3. If more than 20ms goes by, the watchdog will reset the Electron

The time between “wake” signals is set using resistor(s) and can be up to 2 hours.

@micromet,

Sure, happy to share the code as well. I need to get the board out to @OSHPark and will get back into the software tomorrow.

Chip

All,

Just sent out the next revision of the board. Should have it back and tested in a couple weeks. Will work on documentation of the bill of materials and post the full EAGLE CAD files as well. Thanks again for all your help.

Updates:

  • Added a user defined input switch
  • Added fuses to protect power supplies should the Varistors trip - thanks @mikemoy
  • Improved logic so Electron can perform a “hard-reset” of 100mSec power cycle
  • Polarized power connectors for better reliability
  • Moved components so you can connect to the micro-USB connector without hitting anything
  • Improved clearance so you can mount the Electron directly to the board if you want
  • Better labeling of components

Key features:

  • 235k FRAM
  • External Watchdog Timer
  • ESD and voltage spike protection on all external lines
  • Push ON/OFF power
  • Electron initiated power cycle for hard reset
  • Large cap for Solar charging
  • Headers for i2c and IO pins

Here is what it looks like:

Open Source - hardware and software.

Thanks,

Chip

3 Likes

@chipmc,

Have you tested using the TMP36 directly feeding an analog input on the electron (as shown in your schematic)? I’ve tried to do this, and given up as I cannot get reliable readings because the output impedance of the TMP36 is too high for the ST microcontroller, which needs to charge a significant internal capacitance when sampling an analog input. A voltage follower op-amp buffer might solve the problem, but you’ll need to find one that works with a single-ended supply over the voltage (temperature) range that you care about. Even with the op-amp, I’ve had mixed results and ultimately gave up.

A 1-wire temp sensor was recommended as an alternative.

Jeff

@JeffInCO
Yes, have tested on the breadboard and on the v1 carrier with the SMD version of the TMP-36. I am using pin A0 and have not had any issues.

Chip

@micromet,

I have created a fresh post with the code needed to implement the watchdog timer. Please take a look and I hope it is helpful.

Thanks,

Chip

1 Like

Would this be appropriate in an automotive application?

I have a project where I need a sealed electron. Powering it from a solar panel only would be ideal.

Can you tell me more about the solar input? What are the voltage limits?

@Vinistois,

Thanks for taking a look. I think this may work in an automative application but, you would need to make sure that the components you select for the carrier board are automotive grade or can handle your temperate requirements (I think the Particle can only go to 140F as well).

As for being sealed, that is my use case and (knock on wood) it is working very well so far.

Solar is an area I have a fair bit of experience with as it is how I run all my current sensors. However, I am relatively new to the Particle platform and would defer to @RWB and others on this. Here is what I have done in this carrier:

  • It is designed to accommodate up to a 10W 6V Solar panel
  • It has a large input cap which should help manage the variations of power from a panel with real world changes in light intensity.
  • I have added ESD/Lightning and short circuit protection to the Solar and DC-In lines as Solar Panels are often mounted high and have long cables.

If this design does not provide proper results, I may use the Solar Power Manager Module I have already designed and tested. My first preference is to use the Electron’s on-board power management.

Here is what still needs to be done (all software)

  • Implement a better barely charge monitoring routine that can change the behavior of the device if battery charge drops too low
  • Implement sleep and wake functions and tie them into the sensor and watchdog timer interrupts
  • Change the behaviors of the device based on time of day (low energy operation at night)
  • Look at power cycling the device on a schedule to ensure proper operation and battery management

I plan to work on the software using some of @RWB 's suggestions in the coming month or two. Happy to share progress. At least one of my installations will be Solar so this is on my list.

I hope this helps. Please let me know if you have more questions.

All,

Just wanted to post an update on this project.

The version 2 board has survived a month now in the NC heat and despite temperatures up to 110ºF it has operated flawlessly. The watchdog has only reset the Electron once so, all seems to be good.

That said, I wanted to make one more tweak before going final on this project and making a larger production run. Here are the improvements for version 2.1 which was sent to OSHPark yesterday.

I added a user-defined push button switch. I will use this to turn the Particle RGB and D7 LEDS on an off but, it can be used for anything.
I enabled the “Kill” feature where the Electron could shut itself off completely. The only way to turn the Electron back on would be to physically push the power button.
I added a 5V buck converter to Vcc for the 2nd i2c port. Before this came from Vin. Now that it is separate, Vin can now be 3.9-12V enabling the use of 12V Solar Panels for power.
Both the Vcc and the 5V supplies have their own ESD protection and fuses

Here are the Schematics. Once I have tested the board, I will write it up and provide the EAGLE files and Bill of Materials. If anyone wants this sooner, send me a PM and I am happy to provide.

Thanks for all your help on this project.

Chip

4 Likes

@chipmc, gosh I like what you’ve done here! One thing I have been meaning to explore is the use of a Maxim DS2482 I2C to 1-Wire bus master to (reliably) use 1-wire devices. I have also had great success using 2MB SPI flash chips (eg M25P16 and larger) with SPIFFS which is a wear-leveling-aware file system library for NOR flash. I used these in lieu of microSD to avoid mechanical issues. My experience with FRAM is limited to SPI. I wish it wasn’t so darn expensive and was available in larger sizes.

I particularly like your power management chain. The only thing missing is a timed “wake from kill” power-on feature. Having a “deep freeze”, being one level of power savings better than deep sleep, would be a great option. Thanks for all the great work!

@peekay123,

Thank you for taking a look and the kind words. I only hope this project can be of help to more than just me.

There are two things I need to add to my “when I am not buried in current projects list”:

  • 1-Wire
  • Alternatives to FRAM. I know I am paying a premium but it just works so each project, the path of least resistance is…

Let me think about the timed “deep freeze” it is possible that I could use another ($0.50) watchdog timer to wake after “Kill” has ben asserted.

Also, it seems that the IO pins on the Electron do some random things when it is reset / powered up. May need to add a pull-down resistor to “Kill” - will see once I get back from OSH-Park. This is why I don’t just post the EAGLE files until I have had a chance to validate them myself.

Thank you for all your help as I get up to speed on the Particle platform.

Chip

2 Likes

@peekay123 @chipmc I’m needing to add in a watchdog circuit to a few of my projects so it’s nice to see that you’re testing a watchdog timer and it’s working as it’s supposed to.

I don’t understand the “Wake From Kill” Power ON feature @peekay123 is talking about? Doesn’t the single watchdog do this? Or are you talking about another Watchdog chip that can wake up over longer time gaps?

@Peekay123 What do you think is the ideal Watchdog setup for the Photon or Electron for a commercial product? I just need to make sure my product does not freeze up on a remotely located off grid install.

1 Like

@RWB,

I need to do some testing on this but I think it would be a second watchdog with an interval appropriate waking such as 8, 12 or 24 hours.

Thanks,

Chip

@RWB, a “wake on kill” is an external timed power-up from power-off (killed) mode. I have to do some research on what available and if the wake time can be programmed.

As for the watchdog, the IDEAL one is the STM32 internal WDT. However, it seems that using it is not ideal and I have to do some digging into this.

A possible alternative to a “pure” hardware watchdog is the use of an ATTiny85 connected over I2C or 1-wire to the Electron. The MCU could act as both a watchdog and a programmable wake-from-kill timer. It could also monitor a voltage or two to warn the Electron via a single interrupt line if a bad supply condition occurs. These 8-pin puppies are easy to work with and can be run very low power. An alternative is to use a low power PIC processor. Food for thought.