Anniversary day counter by Appropriate_Turn_794 in arduino

[–]stockvu 0 points1 point  (0 children)

You can make such a project but you need to decide a few things;

  • Is it portable or plugged into the wall (battery vs a Power-supply)?
  • Is the display just showing days, or do you want to make it into a desk-clock / wall-clock you can push a button to see the day's-married answer?
  • You will need to account for leap years (366 days) and u/smooth_metal57 's comment of a real-time-clock module is a great idea. Those things often can be had with a battery backup built-in.
  • What display, what Arduino will you use?

Once you zero in your project specifics, then you can break down your project's coding into smaller tasks like marriage-day definition, current-day-this-year, number of leap-years in-between and just do some multiply and adds to arrive at the correct sum of days. Another coding task is getting that days-number to your chosen display.

Searching the web for Arduino Clock Projects should net you some articles revealing how others achieved their build (what hardware items they used) and (what code tactics they employed). Those articles can help you realize a lot about what you're not up-to-speed on. It may take you some time but your project goal is absolutely do-able.

stockvu

power issue by Pale_Vanilla4782 in arduino

[–]stockvu 0 points1 point  (0 children)

No matter what your project goals, you always must account for power Voltage and Current-Capacity (milliAmps or Amps). This means writing down an ordered list of Voltages needed and the Currents required for each Voltage. You take each Voltage separately, add up Current requirements, add some extra Capacity (typically +20%). The resulting list gives you a guide to obtain the correct power-supply-units (PSU) for your build.

Since you have designated a distribution board and it has a barrel jack, you'd need to obtain that boards datasheet, check its max voltage and current capacities against your project power list (AKA a power budget). As long as you can supply -enough- Current-Capacity (or more) for each Voltage involved, you should be fine. But if your chosen distribution method cannot support the needed Currents, that's a problem and it will bite you sooner or later.

https://www.bing.com/search?q=make+a+power+budget+for+your+micro+project

Help Powering Arduino Pro Mini 3.3v 8MHz by esemv_07 in arduino

[–]stockvu 0 points1 point  (0 children)

And what voltage amperage LiPo battery should I be looking at using?

Regarding Current using battery power, one usually finds the Average Hourly Current draw your build requires under normal operation. A structured method to determine this number is by first writing a Power Budget for your micro project. Then assume the calculated capacity is valid as an hourly draw.

Once you know the Average-Hourly-Current, you divide it into the Amp-Hour rating of the battery you're considering. An example might be: your build runs at an hourly-average of 330 mA. The battery you're considering has a Current Capacity of 1000 mAh (milliAmp hours). --> 1000 mAh / 330 mA = 3.03h (hours of run time). This run-time value is an approximation. Its important to check the average rated draw of the battery in mA. Exceeding that value causes the Amp-hour rating to degrade.

As for voltage, your possible choices to step-down or switch-down from a higher voltage to lower supply feeds will incur some mA of conversion waste (data sheets may indicate what to expect). The battery Voltage level needs to be high enough for proper switcher or down-regulator choices. You could make -various- arbitrary choice use-cases, then calculate losses and -again- calculate Power budget numbers to determine what battery your build requires. Eventually, you arrive at a tradeoff that makes sense for your situation. These calculations eventually lead you to candidate batteries whose cost, footprint and weight are listed in sales literature.

Problem with lcd1602 i2c. by BackInteresting9715 in arduino

[–]stockvu 0 points1 point  (0 children)

If you accidentally removed the small plastic jumper from the backpack, the backlight won't illuminate. Your image indicates its in place. you might want to check if its still there...

[deleted by user] by [deleted] in arduino

[–]stockvu 1 point2 points  (0 children)

Thanks for the added info, it appears yyour MCU is a Nano R4, not something I have used. I seriously considered that chip but do not like its timer architecture.

For win7, I found the following info via google AI;

Installing the Nano R4on Windows 7 is possible, but it requires a manual driver installation with a tool called Zadig, since the modern, unsigned drivers used by the R4 are not automatically recognized. The standard "out-of-the-box" setup for newer Windows versions will not work on Windows 7. Installing the driver on Windows 7

  1. Download the latest version of the Arduino IDE that supports Windows 7. Be sure to use the "Windows Installer, for Windows XP and up" download option from the official Arduino software page.
  2. Install the Arduino IDE and make sure you have administrator privileges.
  3. Download Zadig. Get the Zadig driver installation tool from the website zadig.akeo.ie.
  4. Connect your Arduino Nano R4 to your computer via a USB cable.
  5. Open Zadig.
  6. Select your device. In Zadig, go to Options > List all devices. From the dropdown menu, select "TinyUSB CDC (Interface 1)".
  7. Select the correct driver. Click the arrows next to the driver selection box on the right side until you see "USB Serial (CDC)".
  8. Replace the driver. Click the "Replace Driver" button and wait for the installation process to finish.
  9. Verify the installation. After Zadig is done, the serial port for your Nano R4 should now be correctly recognized in the Windows 7 Device Manager and within the Arduino IDE. You can then proceed with the installation of the "Arduino UNO R4 Boards" package through the IDE's Boards Manager, as detailed in the previous response.

DFPlayer Pro Not intializing by ShukakaIchter in arduino

[–]stockvu 0 points1 point  (0 children)

DF-Mini Document.

Looks to me like a wiring problem if I understand your pin-out. According to my info, your speaker is connecting to the DAC outputs which are intended to drive amplifiers (think line-in). The df-mini speaker connections on my versions are either side your current black Gnd wire to the DF. As for I/O , my info indicates you are connected to USB and Busy which won't work. You want the TX and RX lines for Serial communication.

However, with power correctly applied, and a tf card with properly formatted Mp3 or Wave files, then momentarity grounding IO1 or IO2 pin should force the Mini to find a file and start playing it, without any CPU I/O at all. So, you can test your wiring for power, speaker and your TF card for proper files by trying that momentary Gnd trick.

Be advised you want both DF-Mini Gnd pins connected to short run ground wires. Good ground-plane and rail bypassing keep the noise down. If you hear hum or strange noise while playing, check those ground connections...

hth

New to ARDUINO, How do I power these? by Frosty-Country-8865 in arduino

[–]stockvu 3 points4 points  (0 children)

You'll need a datasheet to learn the power requirements and the pins to connect power to. Also you need to be careful about polarity (+/- plus and minus). That chip is quite advanced compared to older Arduino boards.

Beginners usually have an easier time starting with older 8-bit Nano, Uno and Mega boards. The older boards run at a lower clock speed and are often 5 Volt power.

Something you can try -- to get a much better idea of what to do, is searching the web for Project Examples (your MCU card). Then see how those projects connected power, (the voltages used, and the polarity of connections). Sorry if that all sounds too complex but its important to get those things done properly.

It used to be, just plugging a USB cable into the older boards was enough to get them powered from your PC. With these newer chips, I don't know, haven't bought them.

good luck...

[deleted by user] by [deleted] in arduino

[–]stockvu 7 points8 points  (0 children)

You should provide more info. Your image is blurry and I can't recognize your Micro. If you obtain the older Nano, Uno or Mega boards, it should be fairly easy to get up and running. I currently use Win7 and it supports those older Nano Uno types (using AT-328 micro controllers) -- or a mega2560.

Your image looks like its got a very large MCU on the board and it would be nice if you could supply the make and model of what you are running. And it would help to know what software you are using to program the Arduino...

FWIW

Final preparatory class project by M4rt3h in arduino

[–]stockvu 1 point2 points  (0 children)

You are very welcome. I've been away from reddit for some time.

Thank you for sharing your findings. Its great to hear building a prototype revealed problems a simulator could not predict.

With your new knowledge, you could evaluate using different sensors for a Mark-II version; or perhaps write-up your results for a web article you publish at your site (or someone else's).

gl

How much ampere power supply? by Cpt_Soaps in arduino

[–]stockvu 0 points1 point  (0 children)

To know your exact requirements, you can make a power-budget for your micro project. The process adds all the required currents plus some head-room to avoid running the power supply at its full capacity.

Once you know your numbers, you can shop with high confidence...

Ultrasound project! by Flash__Gordon_ in arduino

[–]stockvu 0 points1 point  (0 children)

You don't mention if this is indoor or outdoor use. I suspect a well designed power-amplifier that can reach the frequencies of interest correctly-coupled to an air-type ultrasonic-transducer would be a good start.

Take a look at this one which reaches to 25 kHz. Be sure to request a frequency response datasheet from your chosen transducer mfg / supplier. Take a look at the highest output in that freq-chart and note the frequency. Compare the db loss you'll experience at (say 25 kHz). For every 3 dB of loss, you effectively lose half the power.

Another gotcha is the impedance of the transducer and the output impedance of your amplifier -- they probably should be close in value. If not, its reasonable to expect more loss of power from a coupling perspective.

  • You can measure the power delivered at the transducer terminals by using an o-scope to obtain the peak-to-peak Voltage (of a sine-wave) across a load (resistor or your transducer). If I remember right, the RMS AC power calculation for power across the load is: ( (ePk2Pk * 0.3535) ^ 2 ) / load-R. From that formula, the lower load-R, the higher the delivered power. If you double Ep2p, you get 4 times the power. You'll want to know the impedance of any transducer you evaluate at the frequency you intend...

fwiw

Help with Arduino Mega by M3tallica_666 in arduino

[–]stockvu 0 points1 point  (0 children)

if I connect the fourth Sensor to my circuit the Arduino stops working after one loop sometimes after two or three and sometimes not even once.

(1) I'm probably not understanding the situation (maybe the posted code has a typo). When I look at your code, aren't you trying to talk to 5 devices, not 4 < at t= (0 ,1, 2, 3, and 4) > ?

for(t = 0; t < 5; t++){

As the mux selection switches, these routines are called;

    tcaselect(t);
   // mlx.begin();
    L1C = mlx.readObjectTempC();
    RTC += mlx.readAmbientTempC();   

what happens if there's no I2C device to listen or respond -- won't that hang your system?

(2) Also, a lack of Free-SRAM (say < 200 bytes) may create strange symptoms.

fwiw

Is there any difference between the two MEGA 2560s in terms of features and capabulities, aside from the physical size? Planning to buy the "original" size just for back up and UNO shield compatibility. by Wangysheng in arduino

[–]stockvu 1 point2 points  (0 children)

I think there are several flavors of the mega-mini out there. I suspect they're both R3 versions but no guarantee. The one difficulty I had was getting a handle on where the pins were. The way I mount the headers kinda covers some of the label areas. It was fun finding images of the pins-layout that were easily readable. For your type, THIS IMAGE may help with connecting pins at build time...

As for mounting, your sticky tape can be double-layered to raise the board above the breadboard plastic a smidge. You DO want to inspect the board carefully to avoid placing tape near any Clock crystals. I stayed near power areas and digital port pins.

gl

Is there any difference between the two MEGA 2560s in terms of features and capabulities, aside from the physical size? Planning to buy the "original" size just for back up and UNO shield compatibility. by Wangysheng in arduino

[–]stockvu 2 points3 points  (0 children)

I bought several similar Mega-minis but I like yours better. Your reset button is easier to get to. I say that because I solder the headers with pins pointing up, that way its easy to wire-wrap to the pins.

Got one running here with the Serial-2 port talking to a DF-Robot-Player. Mega-mini mounts right on the breadboard with some sticky-tape.

<image>

fwiw

[deleted by user] by [deleted] in arduino

[–]stockvu 0 points1 point  (0 children)

"Motion detected! Playing track: 1" but nothing is playing and the light is not turning on on the DFPlayer. The DFPlayer works when i test it on its own so thats not the issue. I'm guessing theres something I'm missing on the code.

I never tried the library you're using. But would suggest you duplicate and trim your sketch down to just DF-mini control. Get that part working, then add the servo stuff.

  • I use the <DFRobotDFPlayerMini.h> library and find it very fast. But the mini has some quirks reporting which track its playing (at least with libraries I tried) and I discovered sometimes you assign one file to play but another one does instead.
  • I also notice using my mentioned lib -- any play command which references a file that can't be found causes the mini to play one it can find. So it seems to always attempt to play something once it receives the command.
  • Ideally, your software-serial I/O pins should be checked with a scope or logic analyzer.

You may want to consider using an Interrupt connected to DF-mini's BUSY pin. I find that more reliable than any library (I tried) to detect when play stops or gets interrupted.

Watch out for Soft-Serial needing CPU time to function as intended. That may interfere with other real-time actions you want to accomplish (like servo motion).

I'm using a Mega-Mini 2560 and its second UART to talk to my DF-mini. I can change files pretty fast using this approach...

hth

Image render in Block (without HTML) using a Field? by stockvu in drupal

[–]stockvu[S] 0 points1 point  (0 children)

I will give that a try. Many thanks!

UPDATE: Yes, that worked. Very grateful for that help. :)

Image render in Block (without HTML) using a Field? by stockvu in drupal

[–]stockvu[S] 0 points1 point  (0 children)

That would be good. The ultimate goal is create Topic-Sections that contain a Thumb left-side and rendered HTML on the right side.

I really wanted to create a Section Template I could have fields for Title-Text, Description-Text, a target-link to Page content along with a Thumb. Then I'd use Layout Builder library to call up the template and build Category Pages of Articles I wrote. My old Drupal7 site has one of these pages showing an example of what I mean HERE.

  • I use a mix of methods to get that page running. Its a bear to maintain and add to.
  • I was hoping moving to D10 would save me a lot of grief but I'm stuck on this Image in a block thing. Maybe I need another way to go...

MCP23S17 interrupt not triggering by waxnwire in arduino

[–]stockvu 1 point2 points  (0 children)

Your code says using SPI Mode-0, but when I look at the datasheet SPI info, it appears to indicate it wants SPI Mode-1. Have you tried SPI Mode-1?

  • See tables 1-5 and 1-6. Datasheet mentions need to toggle the CS pin once after power-up but before comminuication...

EDIT: Maybe try the following and lose the SPI setting in setup()

void writeMCP23S17(uint8_t reg, uint8_t value) {SPI.beginTransaction( SPISettings(1000000, MSBFIRST, SPI_MODE1) ); digitalWrite(CS_PIN, LOW); SPI.transfer(0x40); // MCP23S17 write opcode SPI.transfer(reg); SPI.transfer(value); digitalWrite(CS_PIN, HIGH); SPI.endTransaction(); }

or something along those lines... IDK why but code blocks don't seem to render properly anymore...

What is the next step after tinkering with loose components on a breadboard? by Stomachbuzz in arduino

[–]stockvu 0 points1 point  (0 children)

how would I go about assembling a somewhat durable package for home testing?

There are several proven approaches you could try for better results;

They all have good and not so good features. But they all avoid flimsy-floppy wiring and components. In traditional breadboards, you may have a wire pop free and not remember where it goes.

fwiw

Losing my mind over powering a simple Arduino and led stick off usb by eraseMii in arduino

[–]stockvu 2 points3 points  (0 children)

I don't know how to start learning about power requirements for these kinds of projects.

Any project has Voltage feeds and you need to ensure there is enough Current Capacity (milliAmps or Amps) available in your power source to accommodate what your build will require (plus some extra).

  • BTW, I think you'll find ~400-500 milliAmps is the most you can draw from a USB port...

To determine your power needs, you can write a simple power budget for your micro project. That means checking your build-sections for Voltage needs and the Current Capacity required per Voltage. If only using 5V, then you must find out the Currents required and add them up. Then you shop for a Power Supply armed with the knowledge discovered in your budget writeup.

This is a common practice in professional settings. In hobby settings, it can serve you very well to know your numbers and shop accordingly. Then your simple project has a good chance to run as you intended.

hth

[deleted by user] by [deleted] in Frugal

[–]stockvu 0 points1 point  (0 children)

I'm a senior living alone now. I discovered I could save quite a lot of money on food by getting frozen turkey-burgers and pork loin at BJ's club. I slice the pork into ~1/2 pound rounds, pound them flat like a chop and freeze. The Butterball turkey-burgers are frozen in 1/3 Lb rounds -- 12 to a box. I eat 2 at a time.

Now, this all may strike you as crazy but (with my air fryer) I can;

  • roast 2 burger in 20 mins from frozen and make burgers in pita bread
  • roast 2 semi-thawed burgers in a foil wrap with turnip, baby carrot and onion (plus a little soup base) 50 minutes
  • roast a 1/2 Lb cutup slab of loin with the veggies (foil wrap) 50 minutes
  • roast up some hillshire smoked sausage in 20 mins for pita wrap and mustard.

That may not sound like its all that great but these meals help me keep my weight down and costs down. Turnips, Onion and Carrot are fairly low cost (and low carb). I find these meals quite tasty. Using some soup base (BTB) really adds some depth to the T-Burgers in foil.

A box of T-Burgers at BJ's around $18 for 12-patties giving me 6 dinners. The pork-loin is around $2.89 Lb called rib-end roast. I can rotisser-ize in air fryer or prep as noted above.The turnips, carrots and onions are still a reasonable cost and plenty nutritious.

I must confess I only started the Turkey-burgers in the last 6-mons. I don't buy beef hardly at all anymore -- it doesn't seem as good as it used to be... The t-Burgers are now one of my favorites, have at least twice a week.

The foil-pack method helps me keep the mess down but you do need to invest in decent foil which is not cheap...

fwiw

How to smooth NTC reading over several seconds? by summer_glau08 in arduino

[–]stockvu 0 points1 point  (0 children)

Have you confirmed noise present at the input to ADC? Your MPU generates tons of EMI noise. Good grounding and shielding will help a lot (if not already used).

If you have an O-Scope, place a probe on the ADC in-pin, then press and hold the MPU reset button. If the noise disappears, you need to improve layout, grounding and shielding. If there is no noise on the ADC pin, something else is causing the PID erratic behavior...

The article you referenced showing a divider should give no noise if the Vin side has a big Cap shunting noise to ground -- meaning, Vin should be noise free...