• Scam Alert. Members are reminded to NOT send money to buy anything. Don't buy things remote and have it shipped - go get it yourself, pay in person, and take your equipment with you. Scammers have burned people on this forum. Urgency, secrecy, excuses, selling for friend, newish members, FUD, are RED FLAGS. A video conference call is not adequate assurance. Face to face interactions are required. Please report suspicions to the forum admins. Stay Safe - anyone can get scammed.

Arduino - First Light

Hi, Jack. Here's the tiny "arduino" I built a few years ago, a wildlife tracker. AVR Microcontroller and and accelerometer at the bottom end, discrete VHF transmitter in the middle (not popuated on this debug unit), and a break-away 6 pin header for programming at the top. Fully populated and with a battery could keep the weight under 2 grams for a two year battery life and 2-4 KM range. The worst part was dealing with the real-time clock installed on the back-side of the board. But with it the device can reliably wake up after months of hibernation and correctly choose to broadcast during night or day as need be - different species are tracked at different times of day.
BNofKUcn2IMH0pd1OQG22kMjQ_5v4MHUxw67WHOJj8uCtyKAa1fU7_rL5Tuf9hJVtN5kVAuiUFutRRXK6Fa8NmxlBh6EW0AQyq6EtdOKn_zAmJqrjPmdrX0kVdjz6W3wwShVCVxVrcLSTcwcefM1_nEp1woDopfpyYXnwCRDOxZsc4x5hupe2bGUmGvOoR7HZI-sOYwiYC-zqFlARY7TlUrc0gXVxRFXFgtm1x3RpMFMh4b9NOhIKjdJcwOhHXZRM7FwvDQQvhCz1i97RsAwfaRkGUfeVAaiU7SgOGigweFuoetxwSdDLGjQmnZQmmYMgELqwcKpTjoVOtqTnWpeEGBzARAL2e14OpfRWigRKYraoPtXbpsomv78tNTJALI2G7-36k5ovhnJHgX8BwbdQXvXuI1-iR0IMoFXw93s87VIRGCe1So7WI42IEO3sj2whjTUK_vjj46eIRUhgl_Nj3amgIMcWtvZOI-OQRH7Ojm0rrws6Ts6Rk9zo6ElMNtAf31YS5HZW0giPZ3jk8hlVsEYa0klWDb0cGRlcryDtEiUcCUNhO88wWWGNEJnJrliTdspWndjj2zbEhIp8V0l0omUpIZDTlaSzJSigloWIo61WGR-XoyWxxNnGey4Xdyh6RgJxC8ClGmKrJkYUN_VbzxQl7H5DIY3IMxNmJc80UrsIPOZdsI4WwddkV3gTVKNKXtndivuVG8384bvLv-uo7uot8J_QmF4Z0fpMqLur80q8Ak4NDBdXmx9FWDOuL3wYLI-fHvnW1tqZ_CE9AQDnaoTEhzL_SMqwM583NYxV4SPOQR2M-eLRSHsicildgYGBTksUtErRA1T3GxMohuVPrAHmrOOUEHxlOdw5l2eLlC9nPHQuUV8TLYZFXOXHluQcRFQ_o2TkmqCsDxTFVYKDHvpo2bsd8RC8AYU3s5XjaHRtqDsb7_ifr4KHOuCyHXloPVEaMrMHhs=w768-h1024-no
 
Hi, Jack. Here's the tiny "arduino" I built a few years ago, a wildlife tracker. AVR Microcontroller and and accelerometer at the bottom end, discrete VHF transmitter in the middle (not popuated on this debug unit), and a break-away 6 pin header for programming at the top. Fully populated and with a battery could keep the weight under 2 grams for a two year battery life and 2-4 KM range. The worst part was dealing with the real-time clock installed on the back-side of the board. But with it the device can reliably wake up after months of hibernation and correctly choose to broadcast during night or day as need be - different species are tracked at different times of day.

What a cool project! I love it!

Do you actually attach it to wiidlife or does it monitor a trail?

Who is Jack?
 
What a cool project! I love it!

Do you actually attach it to wiidlife or does it monitor a trail?

Who is Jack?
I didn't personally attach them, but yes, they are a commercial product. You can get up to about 5% of an animal's weight before causing changes in behavior, so getting the weight down opens up many more species. I did a smaller one that comes in at 0.22 grams, but that one can only fit a couple of capacitors and a pair of transistors to ping-pong the radio. Much shorter battery life but you can put them on small bats and larger hummingbirds.

Jack, of course, is who I greet when I "Hi, Jack" a thread.

A bit back to the programming topic - the original software I wrote for this thing tried to avoid using a separate clock, and used a fairly complicated event loop to manage a countdown timer and wakeups to reset the timer. Drifted like nobody's business. It was much smarter to add an external clock chip with alarm features to use. Very small, very cheap. Just used up too much real estate on the board and caused the design to go to 4 layers instead of just two sided. Added almost 30 cents to the bill of materials and another step in manufacturing :-(. But in exchange, tripled battery life and greatly increased software reliability.
 
I didn't personally attach them, but yes, they are a commercial product. You can get up to about 5% of an animal's weight before causing changes in behavior, so getting the weight down opens up many more species. I did a smaller one that comes in at 0.22 grams, but that one can only fit a couple of capacitors and a pair of transistors to ping-pong the radio. Much shorter battery life but you can put them on small bats and larger hummingbirds.

Jack, of course, is who I greet when I "Hi, Jack" a thread.

A bit back to the programming topic - the original software I wrote for this thing tried to avoid using a separate clock, and used a fairly complicated event loop to manage a countdown timer and wakeups to reset the timer. Drifted like nobody's business. It was much smarter to add an external clock chip with alarm features to use. Very small, very cheap. Just used up too much real estate on the board and caused the design to go to 4 layers instead of just two sided. Added almost 30 cents to the bill of materials and another step in manufacturing :-(. But in exchange, tripled battery life and greatly increased software reliability.

Very Cool! And definitely a nice device. There are a few critters around here I'd like to track.....

I get the Hi Jack now. But since it's my thread and since it's very appropriate to the subject and since I like it, it's not really a Hi-Jack at all.

I'm not about to try something like that just yet....
 
I went exploring last night till well into the early hours.
A couple of Teensy 2.1 on carriers to run the two RGB 32x32 panels running cool demo software.
Two Teensy 3.2 with one WIZ820&SD card adapter and two OCTO28 WS2811 RGB LED strip adapter
Two Teensy 3.5
One Teensy 3.6
One Adafruit HUZZAH ESP8266 module
Four Lua ModeMCU V3 WiFi Module ESP8266
Four NodeMCU-ESP32 modules
A single ESP8266 module
One Sparkfun Redboard (Arduino pin compatible) with CAN module and OBD-II connector cable.
On order I have 2 Arduino Leonardo clones and 15 arduino based SD card loggers.


Since I haven't touched any of these (except the Sparkfun) since I upgraded to this HP laptop I hadn't installed any of the Arduino libraries. So I went through the process of installing the Teensy, EPS8266 and ESP32 libraries. Then programmed one of each of the sets to blink the on board LED rapidly at 500ms ON, 250mS OFF.
Except for the NodeMCU-ESP32 which was programmed to report on the serial port the WiFi and CPU information.

To get there I also had to download the CP210 USB serial port driver and the CH340 USB serial port driver.

All of the above are programmable via USB and the Arduino IDE 1.8.13.
I think I have a couple of other EPS8266 type modules in other boxes but by then it was 2:30AM.

Now to decide if I want to upgrade my Foundry Furnace to one of the Lua ModeMCU V3 WiFi Module ESP8266 modules. This would give me WiFi access to the furnace operation and if I go ahead with the upgrade I'd finally add the air flow sensor and UV flame detector.
 
Oh and now if I plug a Micro B USB into the NodeMCU-ESP32 and look at Serial port COM7 I get this once every 3 seconds.

ESP32 Chip model = ESP32-D0WDQ6 Rev 1
This chip has 2 cores
Chip ID: 13961200

The sample code to do this is really simple:
C-like:
/* The true ESP32 chip ID is essentially its MAC address.
This sketch provides an alternate chip ID that matches
the output of the ESP.getChipId() function on ESP8266
(i.e. a 32-bit integer matching the last 3 bytes of
the MAC address. This is less unique than the
MAC address chip ID, but is helpful when you need
an identifier that can be no more than a 32-bit integer
(like for switch...case).

created 2020-06-07 by cweinhofer
with help from Cicicok */
   
uint32_t chipId = 0;

void setup() {
    Serial.begin(115200);
}

void loop() {
    for(int i=0; i<17; i=i+8) {
      chipId |= ((ESP.getEfuseMac() >> (40 - i)) & 0xff) << i;
    }

    Serial.printf("ESP32 Chip model = %s Rev %d\n", ESP.getChipModel(), ESP.getChipRevision());
    Serial.printf("This chip has %d cores\n", ESP.getChipCores());
  Serial.print("Chip ID: "); Serial.println(chipId);
 
    delay(3000);

}

Arduino's are incredibly easy to program with a huge set of libraries.
For example I then opened up the simple get time program, entered in my WiFi name and Password, built and downloaded it. It goes out to the ntp server.

Monday, October 10 2022 18:54:15
Monday, October 10 2022 18:54:16
Monday, October 10 2022 18:54:17
Monday, October 10 2022 18:54:18
Monday, October 10 2022 18:54:19
Monday, October 10 2022 18:54:20
 
Last edited:
All of the above are programmable via USB and the Arduino IDE 1.8.13.
I think I have a couple of other EPS8266 type modules in other boxes but by then it was 2:30AM.

You do know that the public release of the Arduino IDE 2.0.0 is out.......

I feel for you on your moonlit adventures...... I can only do that when I can't sleep otherwise. Anymore lately, I fall asleep thinking about staying awake......
 
Arduino's are incredibly easy to program with a huge set of libraries.
Just so the neophytes don't get confused: an ESP32 is an ESP32, not an Arduino :-) Arduino is a programming environment with IDE, libraries etc. There is also CMSIS for ARM, FreeRTOS and others. Arduino is also a set of pcbs with controllers, nmostly Atmel stuff but also ARM chips.

The word Arduino is so overloaded it is almost meaningless, much like happened with Xerox.
 
You do know that the public release of the Arduino IDE 2.0.0 is out.......

I feel for you on your moonlit adventures...... I can only do that when I can't sleep otherwise. Anymore lately, I fall asleep thinking about staying awake......
Just switch to Platformio and Visual Studio Code. Even runs on Mac's and Linux.
 
Just so the neophytes don't get confused: an ESP32 is an ESP32, not an Arduino :) Arduino is a programming environment with IDE, libraries etc. There is also CMSIS for ARM, FreeRTOS and others. Arduino is also a set of pcbs with controllers, nmostly Atmel stuff but also ARM chips.

The word Arduino is so overloaded it is almost meaningless, much like happened with Xerox.
Actually I disagree. Arduino now means a processor module that is programmed with software through the Arduino Interactive Development Environment (IDE). In that environment you can select which Arduino, Teensy, Feather, ESP8266, ESP32 and now even the RPi PICO. In each case once the processor is selected the development environment remains the same but hidden under the covers for simplicity is which target compiler code generator is used.

I'd say 99.9% of the computer science or computer engineering graduates nowadays haven't got a clue how compiler parsers work or peep hole optimizers etc. The Arduino IDE and companion compilers just simplifies the job of running a standardized environment that is a tiny bit OOP and a tiny bit C.

As long as you can assign the pins for a specific SPI or I2C port the code to write out to a display like this doesn't really change.

SmallDisplay.jpg
 
As I continue down the rabbit hole of upgrading my Foundry Furnace controller I first need to be able to program it. The dongle I have, a Kanda ISPGOLD, is only supported on WIN-98 which I still have on a laptop. I've been able to talk to the prototype so I know I can program but it's a pain to transfer software with the floppy from the WIN-XP system.

For the ATMEL side of things I also bought (Aliexpress I think) a USBTinyISP for a project a year or so ago.
https://www.aliexpress.com/item/32954431712.html which allows me to install the Ardunio Bootloader into a processor. With the AVRDUDE program I should be able to program the foundry processor AT90S8515 with a WIN-10 system.

However, that's a pretty small micro nowadays with only 8K memory. If I want to add the extra features I'll run out of room. Perhaps one of the reasons way back that I didn't add the UV detection. Don't remember.

So at this point it may well be better to start with an Arduino or one of the Teensy or ESP32 units and work to re-manufacturing the foundry system to have a window for the UV detection. Only 23 years later.
 

Attachments

  • IPSGOLD_Kit.jpg
    IPSGOLD_Kit.jpg
    220.1 KB · Views: 2
Hey @whydontu - do you know if I can power that 2 and 3 line LCD display that you used from the Arduino Nano via the USB port on it, or does that have to be done with its own supply?

Alternatively, can I power the display to feed power back to the Nano?

Basically, I don't want to use two power supplies.

It would be nice if everything can be powered by the USB port on the Nano because then I could bring the whole unit to the computer for programming and testing. In case it matters, my Nano is a Canadian Solder Nano Clone with a USB-C port on it.
 
Hey @whydontu - do you know if I can power that 2 and 3 line LCD display that you used from the Arduino Nano via the USB port on it, or does that have to be done with its own supply?

Alternatively, can I power the display to feed power back to the Nano?

Basically, I don't want to use two power supplies.

It would be nice if everything can be powered by the USB port on the Nano because then I could bring the whole unit to the computer for programming and testing. In case it matters, my Nano is a Canadian Solder Nano Clone with a USB-C port on it.

i can answer this, yes you can, small oled's and 2 line lcds will run off the 5v regulated pin on the board

the on board 5v regulator gets pretty toasty however, i wouldn't plan on using that as the permanent solution
 
Hey @whydontu - do you know if I can power that 2 and 3 line LCD display that you used from the Arduino Nano via the USB port on it, or does that have to be done with its own supply?

Alternatively, can I power the display to feed power back to the Nano?

Basically, I don't want to use two power supplies.

It would be nice if everything can be powered by the USB port on the Nano because then I could bring the whole unit to the computer for programming and testing. In case it matters, my Nano is a Canadian Solder Nano Clone with a USB-C port on it.
Yes, the LCD displays pull power from the 5v rail of the Nano.

USB socket provides a 5v rail for everything.

The LCD only pulls 2mA, at max the backlight pulls 40mA. At max backlight the LCD is completely illegible, for most of my applications I have the backlight turned down quite low, maybe only 5 to 10mA


 
i can answer this, yes you can, small oled's and 2 line lcds will run off the 5v regulated pin on the board

the on board 5v regulator gets pretty toasty however, i wouldn't plan on using that as the permanent solution

Thanks. That's perfect. I really don't want two supplies during development.

That's interesting that the Regulator gets toasty. That makes sense if running off of a wall wart, but I would have thought that a PC usb output would be 5V so there shouldn't be any drop across the Regulator and it should not get hot no matter what the current draw is. But maybe USB-C is more than 5V.
 
Yes, the LCD displays pull power from the 5v rail of the Nano.

USB socket provides a 5v rail for everything.

The LCD only pulls 2mA, at max the backlight pulls 40mA. At max backlight the LCD is completely illegible, for most of my applications I have the backlight turned down quite low, maybe only 5 to 10mA



Thanks @whydontu, you also read my mind by providing the links to the documentation. And yes, I'll be using the serial data adapter. In fact, I already soldered it to the back of the LCD.

Btw, what project boxes do you like? I plan to sit it on top of the gearbox on my lathe until I get a DRO for it. Then it will move to my surface grinder.
 
Thanks. That's perfect. I really don't want two supplies during development.

That's interesting that the Regulator gets toasty. That makes sense if running off of a wall wart, but I would have thought that a PC usb output would be 5V so there shouldn't be any drop across the Regulator and it should not get hot no matter what the current draw is. But maybe USB-C is more than 5V.

not sure why, maybe the couple random usb wall plugs i have are not in spec
 
not sure why, maybe the couple random usb wall plugs i have are not in spec

Oh, it makes sense if you are using a wall plug (wall wart). They are almost always higher than 5V. In fact, some are MUCH higher. Especially the so called Fast Chargers.

I was talking about using the computer port that is used for programming.
 
Oh, it makes sense if you are using a wall plug (wall wart). They are almost always higher than 5V. In fact, some are MUCH higher. Especially the so called Fast Chargers.

I was talking about using the computer port that is used for programming.

yea ive never noticed it off the pc...although i wouldn't be surprised if they were out of spec as well, this computer likes to corrupt flash drives.....its quite annoying
 
yea ive never noticed it off the pc...although i wouldn't be surprised if they were out of spec as well, this computer likes to corrupt flash drives.....its quite annoying

Most of the flash drive corruptions I've seen are caused by failing to correctly stop (eject) the flash drive.

Most people just plug them in, use them, and then pull them out. However, that's a bad practice. If any data is buffered and hasnt been written to the device yet, it's a sure fire corrupted drive.

You have to click on the shortcut in the tray and eject the device before pulling it out. It will display a message that its safe to remove the device when its ready. Sometimes you have to do it twice. If I don't get the safe to remove message, I shut my pc down and then remove it.
 
Back
Top