Sunday, 7 June 2026

AWS Tips

 


⭐ Design Secure Access to AWS Resources  

🔹 Root User Security 

  • The root user has full, unrestricted access to the AWS account.
  • Should be used only for initial setup tasks, such as:
    • Creating the first IAM admin user
    • Setting up billing
    • Enabling MFA
  • After initial setup:
    • Lock it away
    • Enable MFA immediately
    • Never use it for daily operations

🔹 IAM Users (Daily Operational Identities)

  • Represent individual people or applications needing AWS access.
  • Used for day‑to‑day operations, not administrative bootstrap tasks.
  • Each user should have:
    • Unique credentials
    • Permissions based on job role
    • MFA enabled

🔹 Key IAM Security Best Practices

1. Principle of Least Privilege

  • Grant only the permissions required for the task.
  • Avoid broad permissions like AdministratorAccess unless absolutely necessary.

2. Multi‑Factor Authentication (MFA)

  • Mandatory for:
    • Root user
    • All IAM users
  • Adds a second authentication factor (authenticator app, hardware key).
  • Protects against compromised passwords.

3. Strong Password Policies

  • Enforce:
    • Minimum length
    • Complexity (uppercase, lowercase, numbers, symbols)
    • Regular rotation
  • Prevents weak password vulnerabilities.

4. Regular Credential Rotation

  • Rotate IAM access keys frequently.
  • Never embed access keys in code.
  • Use IAM roles for EC2, Lambda, ECS, etc.

5. Monitor Activity

  • Use AWS CloudTrail to log all API calls.
  • Detect suspicious or unauthorized activity.
  • Enable CloudTrail in all regions.

⭐ Designing a Flexible Authorization Model (IAM Users, Groups, Roles, Policies)

🔹 IAM Users

  • Represent individual identities.
  • Can have policies attached directly, but:
    • Hard to manage at scale
    • Not recommended for large teams

🔹 IAM Groups

  • Collections of IAM users.
  • Simplify permission management:
    • Attach policies to groups
    • Users inherit group permissions
  • Best practice for teams with similar job functions.

🔹 IAM Roles

Roles provide temporary credentials via AWS STS.
Used by:

1. AWS Services

  • EC2, Lambda, ECS tasks, etc.
  • Preferred method for applications to access AWS resources.
  • Eliminates need for embedded credentials.

2. Federated Users

  • Users from corporate directories (AD, Okta, Azure AD).
  • Access AWS without creating IAM users.
  • Improves security and centralizes identity management.

3. Cross‑Account IAM Users

  • Users in Account A can access resources in Account B.
  • Achieved by:
    • Creating a role in the resource account
    • Adding a trust policy
    • Allowing the principal to assume the role

🔹 IAM Policies

Policies define permissions in JSON format.

Policy Components

  • Actions — what actions are allowed (e.g., s3:GetObject)
  • Resources — which resources the actions apply to
  • Effect — Allow or Deny

Types of IAM Policies

1. AWS Managed Policies

  • Predefined by AWS
  • Good starting point
  • Updated automatically by AWS

2. Customer Managed Policies

  • Created and managed by you
  • Recommended for specific business requirements
  • Reusable and version‑controlled

3. Inline Policies

  • Embedded directly in a user, group, or role
  • Deleted when the entity is deleted
  • Not reusable
  • Use only for one‑off, tightly‑scoped permissions

⭐ Example Scenario (Fully Detailed)

  1. Users

    • Each developer has an IAM user.
  2. Group

    • All developers added to a Developers IAM group.
  3. Policy

    • Create a customer‑managed policy named DevAccess with permissions to:
      • Deploy code to specific S3 buckets
      • Start/stop EC2 instances in a specific environment
      • Access CloudWatch logs
  4. Group Attachment

    • Attach DevAccess policy to the Developers group.
  5. Role

    • Create an IAM role EC2AppRole for EC2 instances to read configuration from an S3 bucket.
  6. Instance Profile

    • Associate EC2AppRole with an instance profile.
    • Attach the instance profile to EC2 instances.

 


⭐ S3 IMMUTABILITY — ULTRA‑CRISP EXAM TIPS


S3 Retrieval Time Table  

Storage ClassRetrieval TimeSimple Meaning
S3 StandardMillisecondsFast — real‑time access
S3 Standard‑IAMillisecondsFast but cheaper — for infrequent access
S3 Intelligent‑TieringMillisecondsAlways fast — auto‑moves data
S3 Glacier Instant RetrievalMillisecondsCold storage but still instant
S3 Glacier Flexible RetrievalMinutes to hoursSlow — for occasional restores
S3 Glacier Deep Archive12–48 hoursVery slow — long‑term archive

Thursday, 3 April 2025

A Journey Through My Childhood: Tales from Kommandamparai

Introduction


        Hey there! I'm Savitha, and while I now live in the UK with my endlessly curious son, Anish, my heart still belongs to the enchanting village of Kommandamparai where I grew up. Every night, without fail, Anish demands a bedtime story—not about dragons, not superheroes, but about the wacky, hilarious, and sometimes downright wild adventures of my childhood. His determination to hear these tales is so strong, I figured, why not write them down? After all, who can say no to a persistent little dreamer?

So let me take you back to where it all started, in a village tucked at the foot of the Western Ghats in Coimbatore, a place that felt like something out of a fairytale. Kommandamparai, the name itself is magic—it means "Kombu Adum Parai" or "dancing horns on the rocky hill" in Tamil. This cool name was inspired by hunters from long ago, who tied animal horns to trees, and when the wind blew, those horns would dance. Pretty cool, huh? Our village was surrounded by rivers on two sides, making it a paradise for childhood adventures and mischief.

Life on our farm was anything but ordinary. My parents, Appa (Mylswamy) and Amma (Velumani), worked tirelessly to make it thrive, and then there was me with my two younger sisters, Priya and Divya—we were the mischief crew. And let's not forget about our extended family—we had my loving grandmother, Aatha (Lakshmi), who was the heart of our home, my mischievous grandfather, Appuchi (Muthusamy), and Shakthi Mama, my mom’s cousin, who loved our home almost as much as his own.

The farm wasn’t just a farm; it was a mini-zoo. We had Mani and Vicky, our loyal dogs, who were never far from our side. Then there were our two cats, Puchcha and Sony, who were the most independent (and stubborn) animals you could meet. Our herd of cows often acted like they owned the place, and our chickens? Well, they had their own little army, always in motion, always up to something funny. As for our fields? They were filled with mangoes, coconuts, cotton, paddy, and veggies, which meant endless snacks and a lot of hard work.


Kommandamparai wasn’t just a village, it was a borderland, sitting between Tamil Nadu and Kerala. The roads were rough, especially during the monsoon season when they turned into muddy lakes. There were no fancy cars or buses—just bicycles, bullock carts, and our trusty two feet. Every trip out became an adventure, a test of whether you could navigate the giant mud puddles or if you’d get stuck up to your knees.

And guess what? Our farm became a stopover for travelers. Aatha, always the kind-hearted soul, never let anyone pass by without offering a hot drink and a meal. We were like a roadside inn—if you were hungry or tired, our farm was the place to rest.


While Appa and Amma worked hard in the fields, Aatha ruled the house with a combination of love, care, and an occasional dose of tough love. She was the storyteller, the protector, the one we could always count on. We followed her around, hanging onto every word, especially when she shared her stories of the old days, weaving tales that made everything feel just a little bit more magical.

My childhood in Kommandamparai was nothing short of enchanting. It was a place where every day was an adventure, where we played, worked, and laughed in equal measure, and where mischief was always just around the corner. And so, I’m ready to share those memories with you—from the hilarious to the heartwarming. So get ready, because these stories are just getting started!




Our Wacky Nicknames


In our family, the real names were more like a suggestion—no one ever bothered to call each other by them. Why? Because where’s the fun in being called by your proper name when you can have a whole arsenal of hilarious nicknames?

  • Savitha (that’s me) was called so many things I thought I might need a nickname for my nicknames! My sisters had a special fondness for calling me “Perusu”, a term that could only mean "big" (and not always in a flattering way). To my grandfather, I was “Periyasamy”—that sounded official. Amma had a particularly creative mood swing and would sometimes call me “Periya Kaluthai” (Big Donkey). Not to be outdone, Aatha always called me “Periya Thangam” (Big Gold)—which I’ll admit, was the nicest one. But when it came to Appa, it was simply “Savi”—straight to the point.
  • Priya, oh boy, she had her own bizarre nickname collection! To Amma, she was “Nadusu”, which was basically the equivalent of “the small, hyperactive one.” Appa and the villagers had a thing for calling her “Kunju”, a nickname that really spoke to her adorable little charm. Aatha and I used to call her “Kunja”, just to keep things spicy. And of course, to the uncles and aunts, she was always “Kunja”. But now? After all the chaos, she’s just “Pri”—a simple, dignified name… most of the time.
  • Divya, our ever-sweet little firecracker, went through even more transformations. She was known as “Chinna Thangam” (Little Gold) for obvious reasons (her cuteness was golden). We also lovingly called her “Chinna Kunju” or “Chirusu”—but when Amma got upset (which happened a lot), she was “Chinna Kaluthai” (Little Donkey). Ouch, Amma! Thankfully, now she’s just “Divi”—we’ve all learned to chill out with the nicknames… kind of.


Divi and the Hen’s Chicks: The Great Disappearance


        One sunny afternoon, everything seemed calm on the farm. Appa and Amma were busy working on the fields, Pri and I were at school, and Aatha was in the kitchen, likely concocting one of her legendary snacks. It was one of those days where nothing could possibly go wrong… or so we thought.

 

Enter Divi—our tiny, trouble-making tornado.

 

Without warning, our little explorer decided to disappear. She was here one second, and then—poof! Gone. Gone without a trace, leaving behind a mess of confusion and a trail of anxious whispers. The search began.

 

“Divi!”

“Where’s Divi?”

“Did anyone see Divi?”

 

Soon, the whole village was in on the hunt. People were calling her name from every corner, and even the dogs were barking in confusion. As the hours ticked by, worry settled in like a heavy cloud. But little did we know, the search was about to take an unexpected turn.

 

Just when the panic was at its peak, Supiyan Mama—our sharp-eared farm worker—heard something unusual. From deep within the barn, he heard soft, high-pitched sounds, like the gentle chirping of baby chicks.

 

Following the noise, Supiyan Mama lifted a basket and discovered something that made everyone’s hearts skip a beat. There, sitting contentedly in the middle of a group of fluffy chicks, was none other than Divi, looking like she had just discovered the world’s most magical playground.

 

She was sitting there, smiling and giggling, as though this was exactly where she belonged—surrounded by fuzzy little chicks and their fiercely protective mother, who had no idea what kind of chaos had just unfolded in her coop. Somehow, our little mischief-maker had managed to sneak inside without disturbing the whole chicken kingdom.

 

The relief was so massive that even the usual scolding turned into laughter. Instead of being mad, we were all just happy she was safe and sound (and maybe a little impressed by her stealthy abilities). As for Divi? She had earned a new title—the chick whisperer, and undoubtedly gained a few new “feathery friends” for life.\



Pri’s Brilliant Plan to Brush a Dog’s Teeth


        At the tender age of five, Pri had a vision—and it was nothing short of revolutionary. Our neighbor’s dog, Mani, clearly had some dental issues, and it was high time someone did something about it. Who better than Pri, the self-proclaimed pet dentist?

 

With absolutely no fear or second thoughts, she marched into the yard with her battle gear—a toothbrush in hand, ready to take on the challenge of Mani’s canine teeth. Mani, however, had other plans. He wasn’t impressed with her little “dental hygiene intervention” and decided to voice his opinion in the most effective way possible—by biting Pri’s hand!

 

As if on cue, Cinnu, our neighbor’s daughter, rushed to our house, practically screaming, “Pri’s been bitten by Mani!” (because what’s a good emergency without a little bit of dramatic flair?).

 

Amma’s brother, Kanna Mama, who somehow always managed to appear in the middle of every family crisis, rushed Pri to the hospital. The doctors, after assessing the situation, decided that Pri needed not one, not two, but eight painful injections in her belly.

 

And that, folks, was the day we all learned a very valuable lesson: Never, under any circumstances, try to brush a dog’s teeth—especially when that dog is Mani.

 

So, there you have it. Pri’s brilliant plan might not have gone exactly as she envisioned, but it certainly became one of our family’s most memorable (and painful) stories—and the ultimate proof that dogs have better dental hygiene than we thought.



A Family of Goats Named After Us


            Our farm had a tradition that was equal parts adorable and hilarious—and it all started thanks to Palaniappan Mama and Rukmani Athai, who were absolutely crazy about us. They decided that every newborn goat on the farm should get the ultimate honor: a name straight from our family tree.

And so, over the years, we had a goat army named Savitha, Priya, and Divya—each one with their own unique personality. The goats roamed the farm, blissfully chewing on everything in sight, hopping around like they owned the place, and acting like they were the real stars of the show.

But the true comedy came when Amma had to call us in. Picture this:
Amma standing at the farm’s edge, hands on hips, yelling across the yard:
"Savitha! Stop running!"

And who would freeze in place and stare back?

Not me—the actual human! It was the goat named Savitha.


It was impossible to stay mad at that silly creature. Every time Amma scolded one of us, it was like a goat showdown. Priya-the-human would be playing with Priya-the-goat, and when Amma called for "Priya!" we’d all turn to look, only to find Priya-the-goat was the one causing the mischief—eating a guava, no less!

And don’t even get me started on the time Amma was chasing Divya-the-human and Divya-the-goat around the yard, both of us looking equally guilty of being up to no good.


At this point, naming goats after us wasn’t just a tradition—it was a full-blown family comedy routine. What’s more fun than getting scolded by Amma, only to realize she’s yelling at a goat instead of one of us? The whole thing was like a slapstick routine that never ended.



The Great Temple Construction – Divine DIY!


    Scorching summer days in Kommandamparai meant only one thing—unstoppable mischief. If we weren’t roaming the farm like fearless explorers, chasing butterflies, or climbing trees like overgrown monkeys, you’d find us living our best lives in the river.


But swimming? Oh no, we were much more than that. We were elite fish catchers (who had a strict catch-and-release policy), self-proclaimed mermaids, and champion wave-makers. Our ultimate goal? Turn the calm river into a mini tsunami!

Unfortunately, not everyone appreciated our talents. The village ladies, who came to wash clothes and collect drinking water, saw us as nothing but a three-sister disaster.


At first, they yelled at us to stop splashing—which, of course, we ignored. Then they warned us to behave—which, naturally, we also ignored. But when all else failed, they pulled out their ultimate weapon:

“There are snakes in the water! Get out before you lose a leg!”

That was it. Pure terror. We screamed, flailed, and practically ran on water to escape. Only later did we realize… there were no snakes. It was all a big, fat lie to chase us out!


When You Get Kicked Out of the River… Build a Temple!

After yet another dramatic river eviction, we needed a new mission—something BIG, something legendary… and that’s when the idea struck:

We would build our very own temple!

Did we have bricks? No.
Did we have cement? Absolutely not.
Did we have the engineering skills of a squirrel? Yes.

Armed with nothing but sticks, hay, and a pile of old clothes, we got to work. We tied, balanced, stacked, and hoped for the best. Our temple was not exactly architecturally sound, but in our eyes, it was nothing short of a sacred masterpiece.

To make it official, we even decorated it with flowers and painted rocks—because what’s a temple without divine aesthetics?


But the best part? Aatha, our biggest fan and CEO of Encouraging Chaos, decided this deserved a proper celebration. She made sweets for our temple’s "grand opening," turning our little DIY project into a full-blown festival.

With sweets in hand, our temple officially opened for business! We held a ceremonial pooja (which mostly involved us giggling and pretending to chant), and just like that, we had created something truly magical.

To us, this was a historic religious event.
To the rest of the village? Just another day watching three kids turn nonsense into an adventure.



Divi’s Crazy Dream About Our Cat, Sony


    One night, Divi had a dream so bizarre and hilarious that it became legendary in our family.


In her dream, our beloved cat, Sony, had developed a sudden urge to get an education. With a serious expression, Sony walked up to Amma and meowed, "I want to go to school!" Amma, of course, found the whole thing ridiculous and refused to pay Sony’s school fees. But Sony wasn’t one to give up so easily!

Determined to fight for its right to education, Sony picked up a pen (yes, in its tiny paws!) and wrote a dramatic letter:


    "Dear Amma, if I can’t go to school, at least bury me in front of the school gate when I die, so I can be close to learning."


As if that wasn’t enough, the dream ended with Sony hanging dramatically from the roof of our house like a tragic hero, wailing like a Tamil movie villain.

At that moment, Divi woke up screaming! When she told us about her dream the next morning, we couldn’t stop laughing for days. Even Sony gave us a puzzled look, probably wondering why we were all rolling on the floor laughing. ðŸ˜†

 


Our Happiness Did Not Last for Long


        One bright morning, Pri and I sprang out of bed, bursting with excitement because today was going to be awesome! We had to catch the 6:00 AM bus, so naturally, we were running on pure adrenaline. The clock read a quarter to six, which meant it was go time—time to get ready fast. But wait... where on earth were our school bags? We checked every corner of the room, under the bed, in the closet, even the kitchen (because, you know, bags could magically end up there, right?). But nope, no school bags!


As we frantically searched, our little sister, Divi, was still snoozing peacefully in her bed. Pri and I exchanged wide-eyed glances, and a wicked plan hatched in our minds. No bags? No school! We were practically jumping for joy at the thought of a surprise day off, a day to do whatever we wanted!


But of course, this couldn’t go unnoticed by Amma and Appa, who were starting to get suspicious. "Where are your school bags?" Appa asked, raising an eyebrow. Amma, ever the detective, narrowed her eyes and muttered something about us hiding them to get out of school. Busted.

Just when we were reveling in our perfect little scheme, out walked Divi, all fresh-faced and smiling like she just woke up from a nap in Fairy Tale Land. She strolled up to us, totally calm, and in the most serene voice said, "I hid your bags last night. I had a dream that a thief was in the house, stealing things, and I saved your bags from him."


Pri and I froze. Our genius plan had been foiled—by none other than our little sister, Divi, the unintentional hero. With a big smile, Divi handed our school bags back, and like a pair of defeated soldiers, we trudged off to school, knowing we had just been outsmarted by a 5-year-old.

Guess we’ll have to save our “skip school” plans for another day!



Drunken Mama and the Lost Cows


    It wasn’t exactly a busy day on the farm, so only Ramasamy Mama and Senthil were around, helping out. Amma, in her usual no-nonsense way, sent Ramasamy Mama to take the cows out to graze, while Senthil was assigned to another task. By evening, around 6:30 or 7:00 PM, the cows would typically wander back home, but that day... nothing. No cows.

Amma, growing concerned, started calling out, "Ramasamy! Ramasamy! Where are the cows?" But there was no answer. At this point, panic started to settle in. Amma and my sisters, with worried faces and determined steps, set out on a search mission. They eventually found the cows—scattered across the fields, happily munching on the crops! Of course, the cows weren’t picky about what they ate, so the crops were getting demolished, and chasing the cows back home turned into a mini cattle-herding Olympics. After a lot of running, shouting, and mooing, the cows were finally back in their enclosure.


But where was Ramasamy Mama? Senthil was immediately dispatched to find him. After some time, Senthil returned, dragging a stumbling, wobbly Ramasamy behind him. Ramasamy Mama was completely drunk—so much so that he couldn’t even walk straight, let alone handle a herd of cows. Amma’s face turned redder than a tomato, and she exploded: "What on earth were you doing, Ramasamy? You're completely drunk, and the cows have ruined the crops!"


In a stupor, Ramasamy, unable to focus, stared at Divi, who had innocently wandered up, and in a shaky voice, slurred, "Akka, I swear I didn’t drink! Please believe me!"


Divi and Pri, who were always quick to find humor in any situation, burst into uncontrollable laughter. And honestly, who could blame them? Ramasamy, slurring, thinking Divi was Amma, pleading for his innocence—it was too much to handle. Even though Amma was absolutely fuming, her anger only grew when she saw us laughing at the situation.

With a huff and a few choice mutters under her breath, Amma stormed off, exasperated: "I can’t deal with this madness!" And, just like that, what started as a drama-filled evening turned into one of those stories we'd retell for years, with plenty of laughs and eye rolls from Amma every time Ramasamy Mama was mentioned.



Dravid and Ganguly Born on Our Farm


    Divi and Pri were cricket-obsessed. I mean, they practically lived and breathed the game! They would skip school without a second thought if it meant they could catch a match. Divi was absolutely in love with Dravid, and Pri was practically in awe of Ganguly. It wasn’t just the cricket that got their hearts racing—it was the entire vibe of the game. So, when two cows on our farm had baby calves on the same day, Divi and Pri got the bright idea to name them after their cricketing heroes! Dravid for Divi’s favorite, and Ganguly for Pri’s.

 

The girls treated the calves like their new best friends, feeding them, cuddling with them, and even letting them lick their hands like little puppies. The calves, of course, were totally on board with this new life of luxury, following them around and making adorable little mooing sounds.

 

One rainy day, Amma gave the girls the task of taking the cows out to graze. Well, what could possibly go wrong with that? After a bit of running around, Divi and Pri came back looking like drowned rats, completely drenched from head to toe, and shivering from the cold. They had barely managed to get the cows back to their stalls before they started complaining about how cold and miserable it was.

 

Pri, being the responsible one (or at least trying to be), decided to bring Ganguly inside for some warmth. But, of course, Dravid had other plans. He refused to come inside. There was no way Divi was letting Dravid stay out in the cold, so she started dragging him through the rain, all the while muttering, "Come on, Dravid, stop being stubborn!"

 

Finally, after what felt like an eternity, Divi managed to get Dravid inside, and with a big sigh of relief, she said, "Ah, Pri, Dravid is so warm! It feels so good on such a cold, rainy day!"

 

But then, just as she was getting cozy, something clicked in Divi’s brain. The "warmth" wasn’t exactly coming from Dravid's body—it was coming from something else entirely. With a horrified realization, Divi looked down and said, "Wait a minute... Dravid is warm because he just peed on me!"

 

We all burst out into fits of laughter, and even Divi couldn’t help but join in. Poor Dravid! He had been more of a "live heater" than a calf that day. From then on, whenever anyone mentioned Dravid, we couldn’t help but picture him as a walking, peeing radiator.



Marutha Saved Amma


    One sunny day, Amma and Marutha, who worked for us, went down to the riverbank to wash clothes—back in the days before washing machines took over the world! Amma would always wait for Appa to turn on the water for the crops, and in the meantime, she and Marutha would get to work with their laundry ritual by the river.


But on this particular day, something seemed off. As they were scrubbing away, Marutha suddenly stopped, squinting at the horizon. There was this strange noise, like the river was murmuring… or maybe even warning them. Marutha listened harder, and then it hit him. The sound wasn’t just any noise—it was the sound of floodwaters rushing toward them! A dam nearby had opened, and the river was about to become a roaring beast!


Marutha’s heart skipped a beat. With lightning speed, he grabbed Amma and screamed, “Amma, RUN! The river’s flooding!”


Like an action movie hero, Marutha yanked Amma away from the water just in time. The river surged behind them, threatening to sweep everything in its path, but thanks to Marutha’s quick thinking, they were both safe. It was a close call, and we couldn’t help but breathe a collective sigh of relief.

Marutha may not be with us today, but we’ll never forget his bravery. Rest in peace, Marutha—you’ll always be our hero.



Atha Was a Big Trouble for Sleep


    Atha, nearing 80, had a quirky habit of waking us up in the middle of the night, thinking it was already morning. Imagine being pulled from a cozy sleep only to hear, “Wake up, kids, the rooster is crowing!” We'd groggily stumble out of bed and follow her like sleepwalking zombies, ready for our hot water morning bath—a warm, steamy affair that felt like a mini spa experience in the bathroom.

One such night, Atha woke us up with her usual enthusiasm, "Come on, come on, the rooster is crowing!" She was certain it was time to start the day. So, still half asleep, we’d shuffle to the bathroom, where the warm water awaited us, and after a quick soak, we’d drag ourselves back to bed, only for Amma to gently say, "It’s not time yet! Go back to sleep!"


Now, Pri was not a fan of early mornings. In fact, she was the master of avoiding anything that involved waking up before the sun. So one day, Pri hatched a brilliant plan. “Atha, I’ll take a bath before bed,” she said with a sly smile. 


“You don’t need to wake me up early.” Atha, thrilled to not have to wake anyone up, agreed. Pri happily stayed in bed, while the rest of us still trudged to the bathroom at 3 AM (or so it felt!).

But me? Well, I was too soft-hearted to refuse Atha’s gentle pleas. Every time she’d tug at my arm and say, “Come on, dear, it’s time for your bath,” I’d get up without question, no matter how comfy my bed seemed. Guess I was the true sucker for early mornings!


Athai Got Hit by My Motorcycle


        I'll never forget the thrill of getting our first bike! I was practically bouncing with excitement, but there was just one tiny problem—I didn’t know how to ride it. No worries, though! With the help of my trusty gang of friends, I figured out the basics, even though it probably looked like a disaster in motion. Pri had it easier. Shakthi Mama stepped in as her personal bike instructor, and before we knew it, Pri was doing stunts and riding with both hands off the handlebars like a pro!

 

Naturally, my competitive spirit kicked in, and I thought, "If Pri can be the bike queen, I can be the motorcycle queen!" So, I decided to learn how to ride the TVS 50 motorcycle. Despite Amma’s warnings—"Don’t even think about it!"—I couldn’t resist the temptation.

 

One day, I took the motorcycle out for a quick errand: buying cardamom for Amma. Feeling like I was on top of the world, I cruised through the village, trying my best to look like a pro. And then... I saw Chinnathai Athai and a couple of other ladies walking down the road, each carrying a bundle of grass. My heart skipped a beat—I tried to brake, but the motorcycle had other plans! It slammed right into Athai, sending her tumbling into a patch of bushes like a toppled tree!

 

I froze, my mind going blank. Athai was absolutely fine—thankfully—but I was in full panic mode, trying to figure out how to apologize without dying of embarrassment.

 

By the time I got home, word of my little adventure had already spread like wildfire. Amma was not impressed. I got a full-on lecture (and an earful I could still hear for days) about responsibility, but the best part? I had to march straight to Chinnathai Athai’s house and apologize. I was so mortified, I decided then and there that I would not be riding that motorcycle around the village again anytime soon. 

Friday, 5 May 2023

Arduino tutorial



 Machine to program the way you wanted to do

Four Ds of robots

Dirty – they live in the drainage system. Its called snake robots.


 


Luxury

Education

Entertainment



 What make them smart

Sensors

AI

Micro controls

Brain inside the watch

NI and ML programs are there in the phone

Light  works on switch on/off . smart light – sensor – on when there is someone in the house. Motion control smart lights.

There is audrino microcontrols

For doing it

We can use the led to do it

Main voltage we can connect

Relay =

 

 

Audriono only 5 volts

We use at home  240 volts

Using relay we can Multiply it to 240 volts signal .

Relay we give small signal and house voltage then it can work for the outside house



 

 Day one  finish here

 




autonomous robot

 

Fire sensor,

Smoke sensor

Robot to think

Body part to action

Foundation of any robot

They have to understand this 3 concept

 GOD gives this organ to us and we are god to robots and we can use this


 







40 to 60 sensors are there 


Development board

Digital

Anolog

 

Power

Usb

Introduce lights

2 main things

How to use the board

Programming basic


there is a logic and sequence


Empty brain without program

Making it intelligent to use program

 



Long = positive

Short = negative

Physical, mental and learn ur science  and maths

Concepts

Electrons  flow is current

Electrons flows there is push needed , push is given by voltage which is the potential

Current need to flow its needs a push which need a voltage

To glow the light we need a current, when there is flow of electrons only then it will on, but this needs a potential difference.

We always need a positive and negative terminals

Positive, negative, neutral. Potential difference, only then the electric flows in circuit

Led = uni direction device

If its not working it means that they haven’t

 

GND = low potential

Negative connect to  gnd

GND is automatically set to low

Prev release

Download 1.8.13

 

void setup() {

// put your setup code here, to run once:

//input and output device  declare

//what pin it is used - 13 pin we have connected a device. this device is a output device, so u have to give signal. input device, ardinuo will take the signal.

//temp sensor, input device, which pin it should get the input

//led = we can give only on/off. led is a output device.

// commandable device, it can get the cammand and execute

//cmd device = output device

//sensors are input device

//motors, leds = output device, actutators are o/p device

//light sensor = input device

//dont need to mention ground

 

pinMode(13,OUTPUT);

 

 

 

}

 

void loop() {

  // put your main code here, to run repeatedly:

  //all execution will be written here.

  //2 mode - digital, analog both can used for  any device

  //digital = contains 2 state, high state = on, low state = off

  digitalWrite(13,HIGH);

  //analog contains main operations

 

}

 

Input range Analog signal

0-1023

Output range analog singal = 0,255

0-      On

255 – off state




Project 1:

LED Blink

void setup() {

// put your setup code here, to run once:

//input and output device  declare

//what pin it is used - 13 pin we have connected a device. this device is a output device, so u have to give signal. input device, ardinuo will take the signal.

//temp sensor, input device, which pin it should get the input

//led = we can give only on/off. led is a output device.

// commandable device, it can get the cammand and execute

//cmd device = output device

//sensors are input device

//motors, leds = output device, actutators are o/p device

//light sensor = input device

//dont need to mention ground

 

pinMode(13,OUTPUT);

 

 

 

}

 

void loop() {

  // put your main code here, to run repeatedly:

  //all execution will be written here.

  //2 mode - digital, analog both can used for  any device

  //digital = contains 2 state, high state = on, low state = off

  digitalWrite(13,HIGH);

  delay(1000);//1000ms for 1 sec

  digitalWrite(13,LOW);

  delay(1000);//1000ms for 1 sec

  //analog contains main operations

 

}

Project 2:

Blinking challenges

LED speed control

How to make it blink fast

 

Project 3:

Multiple Device

Traffic control

Red,green,orange led

 

Jumper wires

Men end

Female end

Male to male

Female to female

Male to female

Avoid 0 and 1 pins it is used for serial communication

 

Project 4:

2 leds

Alternative leds

1 led

2 leds

Alternative leds blinking

Simultaneously blinking on both leds

Final project

Happy Birthday

Wave pin works for both digital and analog. PWM pulse width modulation



SET negative pins to grn

void setup() {

  // put your setup code here, to run once:

  pinMode(11,OUTPUT);

  pinMode(10,OUTPUT);

}

 

void loop() {

  // put your main code here, to run repeatedly:

  analogWrite(11,250);

  analogWrite(10,250);

  delay(1500);

   analogWrite(11,50);

  analogWrite(10,50);

    delay(1500);

 

}

 

Make  digital pin to ground

void setup() {

  // put your setup code here, to run once:

  pinMode(11,OUTPUT);

  pinMode(10,OUTPUT);

  pinMode(13,OUTPUT);

  pinMode(8,OUTPUT);

}

 

void loop() {

  // put your main code here, to run repeatedly:

  analogWrite(11,250);

  analogWrite(10,250);

  analogWrite(13,0);

  analogWrite(8,0);

 

  delay(1500);

 

  analogWrite(11,50);

  analogWrite(10,50);

  analogWrite(8,0);

  analogWrite(13,0);

 

  delay(1500);

 

}

 

Combined digital and analog

void setup() {

  // put your setup code here, to run once:

  pinMode(11,OUTPUT);

  pinMode(10,OUTPUT);

  pinMode(13,OUTPUT);

  pinMode(8,OUTPUT);

}

 

void loop() {

  // put your main code here, to run repeatedly:

  digitalWrite(11,HIGH);

  analogWrite(10,250);

  analogWrite(13,LOW);

  analogWrite(8,0);

 

  delay(1500);

 

  analogWrite(11,HIGH);

  analogWrite(10,50);

  analogWrite(8,0);

  analogWrite(13,LOW);

 

  delay(1500);

 

}

 

RGB = 16m colors


 

https://www.w3schools.com/colors/colors_picker.asp

 



 

rgb(102, 204, 255)

 

two modes


common cathode – long leg - grn

common anode – long leg to 5v

 

void setup() {

  // put your setup code here, to run once:

  pinMode(11,OUTPUT);//red

  pinMode(10,OUTPUT);//Green

  pinMode(9,OUTPUT);//blue

 

 

}

 

void loop() {

  // put your main code here, to run repeatedly:

  // rgb(0, 204, 0) from html color picker - green

  analogWrite(11,0);

  analogWrite(10,204);

  analogWrite(9,0);

 

  delay(1500);

    // rgb(51, 102, 204)  from html color picker - blue

  analogWrite(11,51);

  analogWrite(10,102);

  analogWrite(9,204);

 

  delay(1500);

 

}

 

Sensor



Turn on or turn off -> digital

Ac temperature reduce – analog

 

DIGITAL INPUTS & ANALOG INPUTS


 infra red sensor it detects objects

it generates ir rays. It transmits the rays and it reflects back

0 and 1

0 -> didn’t receive the rays

1-> bounce back to the sensor

 

There is a screw we can adjust to get the distance of the object

Sometimes it will not sense

Interface

Vcc  - positive power – 5volts

Grn - -ve power

//embedded c

 

//bulgar alarm

//car reverse camera

//remote car and put a reverse camera

void setup() {

  // put your setup code here, to run once:

  //ir sensor , gnd connect to arduino grd, vcc to 5v, output to 9 digital

  pinMode(9,INPUT); //sensor out put should always be in 9

  //buzzer

  //small leg to grd, long leg to 11 

  pinMode(11,OUTPUT);//buzzer output

 

  Serial.begin(9600); //serail monitor it starts, it used for outpu the logs in the monitor.for all sensor we need to use it

 

}

 

void loop() {

  // put your main code here, to run repeatedly:

  //variable declaration

  int irSensor = 0; // fresh begining

  irSensor = digitalRead(9); //extract the value

  Serial.println("Sensor value:"); // to differntiate the the above sennor

  Serial.println(irSensor); // values need to be passed.

  //sometimes the 0 will be make the buzzer sound or else 1 will make the bazzer sound

  if(irSensor == LOW)

  {

    digitalWrite(11,HIGH);

    

  }

  else

  {

    digitalWrite(11,LOW);

  }

}

 

//to get the power always use 9v batter

 

 

Sensor -> ultra sonic - > 2 eyes sensor

Object detection

Ultra sonic ways is used to detects the objects

Bats uses ultra sonic ways

One eye is transamittor

Receiveor receives the ways

 1 & 0 is the output

 

Digital mode receives 0 an  1 mode

 

 

Bread board

Rows and column first and last row is called rows, when we give 5v to a row the whole row Is 5v

Columns is in the middle part and when we give 5v to column the entire column will get 5v

+ - positive

-ve Is ground

 

Motors

Two Types

1.       DC

a.       Continues spin. Example fan, juice, ginder,

b.      Clock wise and other one is anti clock wise

c.       ++ - anti clock

d.      -- -> clock

e.       Test the spin using just motor and fan with 9v battery

f.        Cars mortors – go reverse  change motor polarity

g.       Obstacle avoid car – if there is a obstacle then it reverse and then turn different directions

h.      How to do it automatically? There is a switching device to change from direct to reverse direction

i.        3 to 6 v or it make need 9 v

2.       Server

a.       Goes to a particular angle

3.       Stepper

a.       clock

it takes electric input and gives mechanical output

 

Arduino can give for small devices (on/off) program signal – its weak signal

It cannot give power to motor

So for that we need a bridge circuit or motor driver

This is used between motor and Arduino

Motor driver – gets the Arduino weak signal and change it to super power and amplify to motor (change weak to strong signal)

IC -> chip l293d

Two usages

è power amplify

è change the direction of motor (to change the bidirectionly switching the direction of motor spin

è connects 2 motors  (use both side of the ic) or can connect only one motor

è one motor we select any side, both sides are identical

è there are 16 pins

è if we connect one motor then use one side 8 pins

è ex: we give weak signal input1/output1 and then output2/ input2

è one motor got 2 terminal so we have 2 o/p and 2 i/p

Enable:

è Give 5v  to make it active on that direction

è Give -ve to GRN

VS :

è  keeps the IC alive -> to give 5v

è Give -ve to GRN

Input 1 & input 2:

è Arduino signal

Output 1 & output 2 :

è Motor

 

 

Top and bottom pin give 5v

Middle two ground

Motor gots 2 terminal


Servo Motor


#include <Servo.h>


Servo wipper;


void setup() {

  wipper.attach(10); 

  

}


void loop() {

  // put your main code here, to run repeatedly:

  wipper.write(180);

  delay(1000);

  wipper.write(0);

  delay(1000);

}

Tools

Snap4arduino

Mbot

Critile



Bread board

Rows and column first and last row is called rows, when we give 5v to a row the whole row Is 5v

Columns is in the middle part and when we give 5v to column the entire column will get 5v

+ - positive

-ve Is ground

 

Motors

Two Types

1.       DC

a.       Continues spin. Example fan, juice, ginder,

b.      Clock wise and other one is anti clock wise

c.       ++ - anti clock

d.      -- -> clock

e.       Test the spin using just motor and fan with 9v battery

f.        Cars mortors – go reverse  change motor polarity

g.       Obstacle avoid car – if there is a obstacle then it reverse and then turn different directions

h.      How to do it automatically? There is a switching device to change from direct to reverse direction

i.        3 to 6 v or it make need 9 v

2.       Server

a.       Goes to a particular angle

3.       Stepper

a.       clock

it takes electric input and gives mechanical output

 

Arduino can give for small devices (on/off) program signal – its weak signal

It cannot give power to motor

So for that we need a bridge circuit or motor driver

This is used between motor and Arduino

Motor driver – gets the Arduino weak signal and change it to super power and amplify to motor (change weak to strong signal)

IC -> chip l293d

Two usages

è power amplify

è change the direction of motor (to change the bidirectionly switching the direction of motor spin

è connects 2 motors  (use both side of the ic) or can connect only one motor

è one motor we select any side, both sides are identical

è there are 16 pins

è if we connect one motor then use one side 8 pins

è ex: we give weak signal input1/output1 and then output2/ input2

è one motor got 2 terminal so we have 2 o/p and 2 i/p

Enable:

è Give 5v  to make it active on that direction

è Give -ve to GRN

VS :

è  keeps the IC alive -> to give 5v

è Give -ve to GRN

Input 1 & input 2:

è Arduino signal

Output 1 & output 2 :

è Motor

 

 

Top and bottom pin give 5v

Middle two ground

Motor gots 2 terminal

 

 

 

Water level sensor (this only works in water)

è Liquid level detection

è Fuel indicator

è Oil indicator

è Flood indication system

è Can be used for Dam water level

è L293d

è Water motor – contains dc motor,

è Fan

è Motor when its on, the fan with rotate

è Centricpetal, centrifugal

o   Centripetal force is the force REQUIRED for circular motion. 

o   Centrifugal force is the force that makes something flee from the center.

o   Dc motor – centrifugal force

o   Pumping one place to another place

o   Water comes from reservoir to house

è Project

Check the water level ina  container

Low- on red light

Medium-orange

Green-full

If its red then turn on the water pump

And when the light is green then stop the water pump

Or use the delay of 2 secs then stop the water pump

 

Equipment

§  Red, green , orange (3) leds

§  Bump

§  L293d

§  Water sensor

 

 

https://www.elprocus.com/h-bridge-motor-control-circuit-using-l293d-ic/

 

 

 

 

 

 

5v

5v

arduino

Arduino – pin 5

motor

motor

gnd

gnd

gnd

gnd

motor

motor

arduino

Arduino – pin 6

5v

5v

 

 

 

 

 

 

 

 

Arduino

 

RGB – Cathod – long leg – 5v

RGB – pwd 11,10,9

Water sensor

Gnd

Positive

Input – A0 – Arduino

 

 

Home work

 

Soil monitor sensors

Take measurements of soil

 

Motors – servo motors

Takes input and give mechanical motors

Dc motors – spins for motors (0-360) where we need to spin

Precise movement and move to particular angle that action we need a special motors (0 to 180 degree). It used to for angle movement.

Example: toll gate open from  0 to 80 degrees then it come back to 0 degrees

What happens if use dc motor