re-program Nanjg to simple voltage monitor switch, possible?

Thanks for the suggestion Werner… The star firmware I studied and modified had the sleep commands in it, so I tried to leave them in and functioning. So I think I have them setup and working…

I have not tested standby current, that would be an interesting stat. I must admit I’ve been working on this project for a few weeks without any success, so I feel like leaving it alone for a few days and just see how it works…

that will be fine, a normal operating tiny can consume 1.5mA or so, the standard idle sleep reduces that a lot to 0.3mA or so.

It’s maybe not so important anyway because you consume a lot of power and recharge it everyday, compared to a simple battery powered unit…but there are sleep modes which reduces the power to below 0.05mA or so…

I have a solar lithium cell charger from china on order and also a small solar panel to play with them, not sure what to do with them but maybe I will build kind of a weather station or so…
http://www.aliexpress.com/item/Solar-Panel-Module-DIY-5V-300mA-1-5W-for-Cell-Charger-Toy-69408/32420211770.html
http://www.ebay.de/itm/172002838790

I would really like to add some weather sensors to my system. Let me know what you find…

Hi…i want to know something related to your post that is the load supposed to be current controlled?If yes, then disable PWM register bit and set ATtiny13A PWM output (AMC7135 Vdd) to digital output 0/gnd. If no, then use digital output 1(disable) or 0(enable) to a logic level pFET (i.e. high side switch) instead of the AMC7135(s) for the load output.

pcb assembly

Hi LeolaLario, and welcome to the forum!

I am no electronics expert, but as I understand the AMC7135, they regulate current over 350 or 380ma each. If you draw less current than that, they work as a simple on-off switch, with no regulation. This is why you can stack a ton of chips onto a nanjg driver to draw more current, but you loose current regulation and pretty much are direct drive.

Someone please correct me if I’m wrong.

Why did I use the nanjg driver? Because it was what I had available, I’m sure you can use a FET based driver like you recommend.

that right, it is no current Regulation it’s more a current limitation.
If you would build such a thing with a plan and a lot time you should use a Fet. No pfet necessary an nFet would be enough(as long as you don’t need to switch the positive voltage)

I am playing around with the esp8266 boards and the internet of things, I have a wio link and nodemcu board(with the wio link firmware) and it is amazing what these can do out of the box. For example I hooked a dht22 temperature and humidity sensor to them and I can use the IFTTT app to write the sensor value in a google spreadsheet in the cloud with just a few clicks on the app. Really amazing what you can get for a handful of dollars these days…
The only disadvantage with all these cool electronics is: that it are nice solutions for problems I don’t have…

Those are good prices on the 1W and 1.5W mini solar panels, will have to pick up a couple.

What I am searching forever are solar charging circuits for two AAs. I have a few very old solar garden lamps and they work really nice, I put two eneloops and nice warm white LEDs in them and spraypainted the solar cells with clear spray paint, like new. The new ones only have the one chip solutions with the yx8018 and a inductance and one AAA, they work okay but the old ones are really bright and harvest enough energy even in winter… I f I would find such a circuit for cheap i would be overly glad.

I also have always an eye on the sunpower cells sold on ali, they absolutely rock but the low voltage of only 0.5V forces you to connect them in series and then the panel would be huge for small applications…

I did some reading today and turns out the router I am using (tp-link wr703) has a pretty use-able i2c bus, after some soldering. So I ordered a temperature and pressure sensor to try out:

Now if I can solder on those tiny wires without ruining the router…

My solution on the garden lights is to use microcontroller and a 5V mini panel (0.5W will go all night during summer) to charge a LifePo4 AA.

  1. Use WDT to enable adc to check panel voltage and when to turn on light at dusk. The adc is connected behind the reverse polarity diode.
  2. Use WDT and adc to check battery voltage during day. When battery hits 3.6V then turn off fet that is between panel and diode to keep from overcharging the battery.

Those Sunpower cells look really nice.

Netprince: A UART (2) and USB (to ttl UART) can also be had sometimes, not sure on your model. Drivers available for most common USB to Serial ones like the Prolific pl2303 and FTDI FT232R transceiver modules.

The problem with the lithium cells is that none of them should be charged below 0°C(32°F).
I am not totally sure how that works on life but I thought that they also die if you do it to them…maybe it works because of the small current used…

That’s a good question. I know the Westinghouse solar lanterns at Walmart use them with LifePo4 AA’s and 18500’s. Have never bought one, or tore one apart, to see what they use for electronics.

That tp-link wr703 is a nice router for the price, plenty of RAM and flash plus USB TP-Link TL-WR703N [Old OpenWrt Wiki] This is going to run OpenWrt?

A serial terminal would be nice, and help in debugging, by connecting a USB/RS232 ttl module to the RX/TX (TP_OUT and TP_IN) pins.

If soldering to the main IC pins to get the I2C communication to the AVR seems daunting (it’s a pain believe me) then same type of USB/RS232 ttl module would do for that too. The USB pins look easy to access. Not sure how USB would differentiate between two similar modules, could go one of each?
http://www.ebay.com/sch/i.html?\_odkw=pl2303+module&mfe=search&\_sop=15&clk_rvr_id=1031970540481&\_osacat=0&\_from=R40&\_trksid=p2045573.m570.l1313.TR1.TRC0.A0.H0.Xftdi+module.TRS0&\_nkw=ftdi+module&\_sacat=0

Yes, it is running openwrt. I am a long time openwrt user. Yes, the device has a serial mod. I used the audio jack method, and I have several of these for debugging:

http://www.mouser.com/ProductDetail/FTDI/TTL-232R-3V3-AJ/

Have you seen the gl-iNet routers, for about the same price? I generally like those devices better, and if I manage to destroy this wr703, I will switch to one of those. They have more onboard storage for things like openssl+openvpn. Also the gpio locations are designed for use by the end user so soldering should be super easy.

On another note… it has been completely overcast here for 3 days straight, so I have not been able to do more testing since the initial results…

My experience can be characterized as a long time to get OpenWrt even going :slight_smile: . Much more comfortable with the micro and hardware side. Bricked the WRT54GL multiple times. But did …eventually…get an led blink from the PIC protoboard. A solution waiting for a problem I guess, although a robot with a web cam was in the back of my mind at the time.

Nice FTDI cable you have there, had not seen that 3.5mm jack style before. In hindsight that would have been a nice substitution for the db9 connector I ended up with.

That gl-iNet router also looks good.

Another project gathering dust.

nickelflipper… That is some awesome hacking. That router sure brings back memories.

I managed to get my temperature/pressure sensor working, and after spending too much time I also have a small graph being recorded. I’m looking forward to when the sun comes back out and I can start getting some readings…

Finally got to around to posting some pictures...

The sunny buddy wired up with my usb boost board, and a basic battery protection circuit. This didn't work and was before I tried the nanjg driver.

Different angle.

Some cloudy day testing. I think the meter was wired backwards, but the panel was producing a little over 500ma at this point.

My setup for programming the new nanjg.

Wiring the tiny router with an i2c bus -- it wasn't pretty.

This is a later picture with the nanjg driver working, and i2c bus (the white cable) off to the right.

The final product installed and working.

Very cool project! Thanks for sharing the photos.

That looks like a web cam. Is there a way to set that up for single shot trigger, say like from a PIR motion sensor? Is there a pre-compiled binary that includes the webcam? Or is there a pkg that can be added from the openwrt gui?

I got in a couple of the 1.5W panels mentioned from in an earlier post. I am thinking out loud about a solar to tp4056, plus thermistor, to charge an 18650 battery bank. Then powering a microcontroller and mini wifi transceiver module, with say a 3.3V LDO regulator.

https://www.fasttech.com/p/1585501
https://www.fasttech.com/p/2203301

Thanks nickelflipper…

It is a webcam. The software is called mjpg-streamer. You can retreive a single shot or an mjpg stream.

OpenWRT is package based, so you would just need to ‘opkg update && opkg install mjpg_streamer kmod-usb-video’ (if I remember those correctly, do ‘opkg list’ to see the list)

I have not tried anything smaller than openwrt on a tiny router (ie arduino stuff). Would like to see what you build.