glowing eyes from snake by motion detection

Summary

Recently I was building a very long snake with glowing eyes. In reality that are red LEDs which are enabled by motion detection. That lovely soft toy is four meters long.

1. Idea generation

My daughter wished a lamp for the night. Ok, that’s easy, I tought. We need LEDs or diodes. But we also need a housing. So, the room where the lamp should stand is a room which is decorated in jungle theme. Maybe it could be plastic, has felt or could be of wood. But the lamp wouldn’t have a fixe place. That’s why we decided that the lamp should be an animal. It could lying at the ground or on a cabinet, maybe also in a bed. In a jungle live a lot of various animals but in a short time we decided to build a snake.  

2. collecting informations

At the beginning I needed a picture from a snake. I had to decide which material I should use for the head and the body. There were two possibilities. I could use a 3D printed head or felt. The snake should be a toy for a child so I decided to use felt because it is softer than plastic.

3. functional design

The soft toy should have a mobile power supply. That’s why it must constructed in the extra-low voltage segment. Maybe it could build with 3, 5 or 6 voltages.

4. schema

5. material list

1x – HC-SR501, PIR motion detector,
5x – 2 red and 3 green LEDs, LilyPad
1x – 6V battery holder for CR2032 with switch
2x – CR2032 battery
1x – perforated plate
different wires
PLA
3D model
a lot of felt and stitch

6. purchase

I live in germany and I ordered the components at the shops mentioned below.

  • pimoroni
  • conrad
  • reichelt

7. realization

To create a case I create a model with openscad (http://www.openscad.org/).

The housing was build for the motion detector and for the battery holder. The box contains the motion sensor. The holes were connected with the felt.

8. testing
You have to move your hand in the front of the snake and shake it. The nose from the snake should be able to recognize the movement and will turn on the light.

9. documentation
There is no coding necessary, only soldering is required.

1
Dislike post

comparison of IoT platforms

Nowadays there are a lot of iot platforms available. This platforms connect devices and give an opportunity  to manage all devices from one place. Imagine that I have many arduinos and raspberries at home. They all are connected to sensors and actors to help me at my homework for example.

Now I’d like to connect this microcontrollors to one platform which is installed in my own cloud at home to get a better overview of all devices. Furthermore I’d like to connect some platines to the world wide web. The sensor generated datas should collect and managed from the platform. It is possible to analyze this datas. Let’s do a comparison of existing platforms which I can use.

Here is a list of open source IoT platforms:

  • DeviceHive, https://www.devicehive.com/
  • kaa IoT platform, https://www.kaaproject.org/
  • thinger.io, https://thinger.io/
  • Thingsboard, https://thingsboard.io/
  • ThingsConnect, http://thingsconnect-iot.com/iot-platform/
  • ThingSpeak, https://thingspeak.com/
  • WSo2 Build, https://wso2.com/iot

Take a look at this page for a comparison table. 

I create criterias which are suitable for me.

data platform is integrated
connectivity with wifi, cellular solution,
market longevity
security, privacy
integration api
device management

IoT platform data platform connectivity market longevity security, privacy integration device management
DeviceHive
kaa IoT platform
thinger.io
Thingsboard
ThingsConnect
ThingSpeak
WSo2 Build

real-time clock DS3231 for arduino

I’d like to represent you a real-time clock. With this component you can get the actual time.

schema
The pins are connected with Arduino Uno R3:

RTC DS3231 Arduino Uno R3
VCC 5V
GRD ground
SCL A5
SDA A4

Bildergebnis für ds3232rtc example

configuration
To set up the time for the real-time clock, write two assignments in the setup-function.

setTime(23, 31, 30, 13, 2, 2018); //set the system time to 23h31m30s on 13Feb2018
RTC.set(now()); //set the RTC from the system time

The complete instructions for time-lib are to find on page:
https://github.com/JChristensen/DS3232RTC

include libraries in your code:
DS3232RTC-master
Time-master

coding in arduino SDK

/*
* TimeRTC.pde
* Example code illustrating Time library with Real Time Clock.
* This example is identical to the example provided with the Time Library,
* only the #include statement has been changed to include the DS3232RTC library.
*/

#include <DS3232RTC.h> //http://github.com/JChristensen/DS3232RTC
#include <Time.h> //http://www.arduino.cc/playground/Code/Time
#include <Wire.h> //http://arduino.cc/en/Reference/Wire (included with Arduino IDE)

void setup(void)
{
Serial.begin(9600);
setSyncProvider(RTC.get); // the function to get the time from the RTC
if(timeStatus() != timeSet)
Serial.println("Unable to sync with the RTC");
else
Serial.println("RTC has set the system time");
}

void loop(void)
{
digitalClockDisplay();
delay(1000);
}

void digitalClockDisplay(void)
{
// digital clock display of the time
Serial.print(hour());
printDigits(minute());
printDigits(second());
Serial.print(' ');
Serial.print(day());
Serial.print(' ');
Serial.print(month());
Serial.print(' ');
Serial.print(year());
Serial.println();
}

void printDigits(int digits)
{
// utility function for digital clock display: prints preceding colon and leading 0
Serial.print(':');
if(digits < 10)
Serial.print('0');
Serial.print(digits);
}

Instructions for structuring a project to realize your own electronic system

I’m interested in electronic systems. At home there are some use cases like measure the temperature or humidity. I’d like to show you a way to structure your project.

At the beginning there is an idea!
Draw a simple picture of your idea to get an overview of components which are needed.

Think about collecting all informations you need for your project. For example I collect all data sheets and informations from components. Another point is to get connections to partners. Maybe you need help from other peoples. I suggest you to visit different blogs.

Describe your functions of the product and also design it.  A skech is also helpful.

Create your schema. There are different tools at market. I decided to work with fritzing.

Make a list of materialThen you will looking for an supplier. 

Now is time for ordering your materials, electric or electronic components.

Realize your project.  Create your code and maybe you need a model for a 3D print, so do it now. I have a creality CR10. I create my model with openscad.

At the end you get a prototype of your product. It’s time to check your functions and your work. Define a test concept and make notices of your test results. Use this time for documentations.

That’s it. Have fun with your system and don’t forget to improve it.

 

Summary

1. Idea generation
2. collecting informations
3. functional design
4. technical schema
5. material list
6. purchase
7. realization
8. testing
9. documentation

 

RFID key tag

Identify your tag on id.

There are different useful use cases, for instance:

  • access control
  • tracking objects
  • identify objects

Bildergebnis für MFOne S50 key tag

This picture shows a MFOne-S50 key tag. The key has a number with eight signs like B260B673.

To get the card id use following code for Arduino.

/*******************************************
* function:get the id of RFID key
* RFID Uno r3
* VCC 3.3V
* RST 2
* GND GND
* MISO 3
* MOSI 4
* SCK 5
* NSS 6
* IRQ 7
****************************************/

#include"rfid1.h"
RFID1 rfid;//create a variable type of RFID1

uchar serNum[5]; // array to store your ID

void setup()
{
Serial.begin(9600); //initialize the serial
rfid.begin(7, 5, 4, 3, 6, 2); //rfid.begin(IRQ_PIN,SCK_PIN,MOSI_PIN,MISO_PIN,NSS_PIN,RST_PIN)
delay(100);//delay 1s
rfid.init(); //initialize the RFID
}
void loop()
{
uchar status;
uchar str[MAX_LEN];
// Search card, return card types
status = rfid.request(PICC_REQIDL, str);
if (status != MI_OK)
{
return;
}
// Show card type
rfid.showCardType(str);
//Prevent conflict, return the 4 bytes Serial number of the card
status = rfid.anticoll(str);

if (status == MI_OK)
{
Serial.print("The card's number is: ");
memcpy(serNum, str, 5);
rfid.showCardID(serNum);//show the card ID
Serial.println();
Serial.println();
}
delay(500);

rfid.halt(); //command the card into sleep mode
}

To use the card id for access control use this code segment to identify a person named Alisha or an object for example.

uchar* id = serNum;
if( id[0]==0xB2 && id[1]==0x60 && id[2]==0xB6 && id[3]==0x73 )
{
lcd.setCursor(0,1);
lcd.print(" Alisha ");
delay(2000);
lcd.clear();
}

 

Have fun with RFID’s in your projects.

Download libraries: RFID_kit_V1.0_for_Arduino.zip 
https://www.sunfounder.com/learn/category/RFID_kit_V1_for_Arduino.html

glowing table mat

I’ve build a blue glowing table mat. In the dark you would be able to find your glasses on the table.

<iframe width=“560″ height=“315″ src=“https://www.youtube.com/embed/pAyDdyFSJbg“ frameborder=“0″ allow=“accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture“ allowfullscreen></iframe>

electronic schematic:

electric components:
– CR2032 batterie holder
– resistors
– blue SMD led
– CR2032 battery

 

 

 

electronic stove

Recently I started to build an electric stove for kids.

For this project I needed a cabinet where I could build a ceramic glass hob on top of it. So I decided to construct my own furniture. To avoid accidents with glass I used Plexiglas.

The stove consists of two plates, which are divided into three circles. Every circle  could be activated by touching a sensor. One sensor for a plate. In the picture you will see three touch sensors. The little sensor on the right side will activate the stove. After a short time a tone is to hear. With the next touch the signal could be deactivated.