You are here

Feed aggregator

PAM8403_Amplifier

FEED blog.jeronimus.net - 6 hours 55 min ago
At Aliexpress i ordered 5pcs/lot PAM8403 Super mini digital amplifier board 2 * 3W Class D digital amplifier board efficient 2.5 to 5V USB power supply for 0,87 euro.
That is about 18 euro cents for a stereo amplifier module! This module has no potentiometer to regulate the output volume.
There are also other PAM8403 modules available, some with potentiometer(s).
There are also PAM8403 modules with potentiometer but they are much more expensive ( 0,57 euro )
On one i soldered Dupont connectors for easy access to us it on a breadboard or other temporary experiments. On another i soldered wires to two cheap mini speakers and also some Dupont connectors.


Interesting very cheap amplifier !

My First Lora Gateway

FEED blog.jeronimus.net - Wed, 2017-06-21 08:15
RFM95 back LoRa breakout
As i like doing some projects with IoT i also wanted to experiment with LoRa.
Some time ago i ordered a cheap LoRa shield for my Arduino. Unfortunate i did not get it working. I could not find out if it was something with the code, the jumper settings, a hardware error or perhaps my shield could not reach a LoRa gateway in Almere.
Perhaps in another LoRa post in my blog you will read more about this shield.
RFM95 front LoRa breakout
When asking advice someone was so friendly to send me documentation to make a simple one channel test LoRa gateway with an RFM95 and a Wemos D1 mini.

On Aliexpress i found two RFM95 breakout boards for 13 Euro so i decided to order them. I have done several experiments and projects with different ESP8266 boards but until now i never used the Wemos version.
Between the  RFM95 and the  Wemos D1 mini (ESP8266) you need to make the some connections.
Wemos D1 miniAccording to a descriptions i connected this:RFM95 pinESP8266 pin3.3V3.3VGNDGNDMISOD6 GPIO12/MISOMOSID7 GPIO13/MOSISCKD5 GPIO14/CLKNSSD8 GPIO15/CSRESET*ncDIO0D1, GPIO5
The Wemos D1 mini came with 2 sets of male pins, 2 sets of female pins and 2 sets of female with long male pins. I decided to build the circuit on a small prototype PCB board. (It is also possible to order a Wemos PCB for the RFM95 or connect them direct.)
I decided to solder the female with long male pins on the Wemos D1 mini. On the PCB i soldered the two sets of female pins so i could separate the ESP8266 from the circuit if needed. As the Wemos can be put in two ways in the connector of the PCB i marked the side of the Antenna.
The Lora RFM95 is not breadboard friendly. I soldered it direct on the prototype PCB next to female pins for the Wifi ESP8266 Wemos module. Each RFM95 pin (except the Antenna pin) is connected to a Dupont male pin. To the Antenna pin i soldered a 8,2 cm wire to use this as a first test antenna. (Perhaps after some testing i change this to an SMA connector as in the documentation.)
After this is soldered the wires between the RFM95 and the Wemos connector on the PCB as in the table above. (Most of these connections are made on the copper side of the PCB so you can not see them on the pictures in this blog article!) I added a button between D4 and ground to have a simple input button to test the ESP8266The Wemos D1 mini already has a Reset button.
Next to the GND and 5V of the Wemos i added male pins to have easy access to GND and 5V and there is also a third pin connected to the 3V3. I only have tested my module by powering via USB
I tried to connect the Wemos to my computer using USB. At first it did not work as i used an USB power cable instead of an USB data cable. (I think i need to label my USB cables!).
After finding the right cable i tried to upload the Blinck sketch first to test the connection and the Wemos module.I got the system message "Error board is unknown / (Package ESP8266 )" and solved this problem (
http://arduino-esp8266.readthedocs.io/en/latest/faq/a04-board-generic-is-unknown.html )
In the directory ' Users\<MyName>\Arduino15\packages\esp8266\hardware\esp8266 '  i needed to manual clean up old software. So i removed there everything and Blinck worked.

Now the 1ch Wemos gateway software. When installing this on my computer "Time" was already installed on my computer. As i did not know if this was the right version i decided to rename the old version.
Stupid as this did not work. When starting the Arduino software to upload it to my Wemos i got an error message that there where two versions of "Time" with a link to my renamed version.
So i moved my old "Time" version to another directory and this problem was solved.
Now i got the error message "Documents\Arduino\ESP-sc-gway30\ESP-sc-gway30.ino:67:92: fatal error: gBase64.h: No such file or directory"
Googled and installed another "base64" but this did not solve my problem.
Finally i found the latest 1ch gateway software ( Version 4. ) . This package included gbase64 and after adapting the configuration parameters it worked.
The error message "The management functions only work over _THINGPORT and not over _TTNPORT" also went away by adapting the parameters.
In the end i got a working 1 channel test LoRa gateway. The IP address of the Wemos ESP8266 gives a simple webpage to check and configure some parameters,Some things i want to do with this device:
- testing this gateway with another LoRa device (my Arduino LoRa shield?),
- putting this device in an enclosure
- adding connector for another antenna
- adding one or more sensors (temperature) to this LoRa gateway
- adding a better power supply

Cables USB / Power cable

FEED blog.jeronimus.net - Sat, 2017-06-17 08:15
In my waste i found an old USB power connector cable.
The connection cables (2 cables) where very short but still could soldered.
You can find more and more devices using an USB powered cable. I expected the USB connector could be used to make a power cable (e.g. to connect to my regulated power supply from a previous post.
I searched on the internet to find out the connections. On https://www.usb3.com/usb3-info.html is this picture:
( This, and more info can also be found on wikipedia  )
With my multi-meter i checked the connections to find out which of the two wires is the power + and which is the ground - wire.
I soldered two wires (Red to power + and black to ground - ) to the connector and used heat shrink tube to insulate the wire. Each wire is insulated separate and after this heat shrink is for botch wires.
On the other side of the cable i added two banana plugs.
After checking the connections and checking for possible shortcuts with this my multimeter the USB power adapter cable was ready.

To use it with a (B3603) regulated power supply set the voltage to +5V and a (protective) limited max current.I am very happy with this USB adapter. Perhaps when i will make a new lab power supply i will  include a fixed 5V output with USB connector.

USB Logic Analyzer

FEED blog.jeronimus.net - Mon, 2017-06-12 08:15
On Aliexpress i ordered a cheap USB Logic Analyze 24M 8CH, MCU ARM FPGA DSP debug tool
( Current price 4,22 euro (June 2017) , In March 2017 i payed 4,43 ).

Plugging it in my computer i noticed two leds (red PWR and green CH1 ) and my computer detected an unknown USB device.
I had downloaded the latest version Logic+Setup+1.2.14.exe This program did not work for me! I fired up the program in Windows Vista and nothing seems to happen. (Perhaps to the old Windows Vista version).
On internet i found this article
https://grenville.wordpress.com/2015/01/04/a-clone-of-the-saleae-logic-8-channel-analyser/
with a link to Logic+Setup+1.1.30.exe
I this version  mentioned in this article worked!. It started a windows installer and after a few minutes i had
 a nice program usable with my logic analyzer.

On my device is printed CH1 to CH8 The software interface is mentioning Channel 0 to 7. CH1 is Channel 0, CH2 is Channel 1 and so on.
In the software the channels have a color coding. It can help if you use testcables matching this color scheme. (I ordered separate 10PCS test hook clips from the same seller. )

A simple testing run gave a straight line, also with the time set to 10 second and 1MS/s
During another test run i used a 1.5 volt battery and touched between GND and CH1
This gave my first interesting signal(s) to look at !After this i tested my analyzer with some other signals (e.g. Signals on arduino led cube)
Later i discovered that, with the USB logic analyzer disconnected the software capture does a simulated capture and also gives an interesting ("test") signal.
The software does not only visualize the signal but has also interesting features to measure, analyze and decode signals.

Conclusion i finally have added an interesting device to my toolbox that i should have added earlier ! 

Presenter / Laser pointer IOT DIY (6)

FEED blog.jeronimus.net - Fri, 2017-06-09 08:30
A i needed to repair my ESP8266 Wifi IOT laser presenter .
The battery's did not fit inside the case i used in my first version. I glued the battery pack for 3 AA batteries on the back of this box. Now, after a few months the glue became to old and dry (or i had used the laser presenter to much) and the battery pack separated from the box. I do not remember exactly the glue i used in this first version. (Some plastic glue?)
I glued it again with hot glue. Hope this time it will last longer !!


Power supply with B3603

FEED blog.jeronimus.net - Wed, 2017-06-07 08:00
An old 24V DC 1.5 A (laptop) power supply is changed to a bench power supply unit (PSU) with a cheap MingHe B3603 DC-DC buck regulator from Aliexpress.
https://www.aliexpress.com/item/B3603-NC-DC-power-supply-adjustable-step-down-module-voltage-ammeter-36V3A108W-charger/32725763543.html ( Ordered may 2017 ; Euro 6,17 +shipping Euro 1,66 = total Euro 7,82 )
The MingHe B3603 is a constant voltage, constant current step down (or buck) power supply. with a four digit display, 3 leds and 4 push buttons.
It accepts inputs from 6 to 40 Vdc and provides outputs from 0 to 36 (40) Vdc and can give 0-2 A without cooling and 3 A with cooling. It is a buck step down regulator. The input voltage need over output voltage more than 1.5 V (i will not exceed the input voltage)

My old laptop power supply is 24 Volt, so it should work to 24-1,5 = 22,5 Volt.
The connector to the laptop on the old power supply i use for providing the 24V was cut off (some years ago). On the mains side is a 3 pin power input. After providing my 220V main i measured the output and marked the + wire with red tape.

In my version of the MingHe B3603 i did not find the bad soldering as mentioned on https://www.eevblog.com/forum/reviews/b3603-dcdc-buck-converter-mini-review-and-how-the-set-key-could-be-fatal/The ground wire from the mains input on the old laptop power supply is direct connected to the - (ground minus) output. (It is always good to do first some measurements and testing!) I do not want one of the power output lines direct connected to the power earth. This can give strange loopbacks in your circuits. Therefore i decided not to connect the ground of the input power!
As enclosure i built a wooden box open at front ant back..Some plastic from a plastic box was used to create a front panel by adding some holes.
First i remove the 4 screws at corners of the PCB from the B3603 module.
At the inside of the box i hot glued some screws to attach the B3603 module PCB. (I did not like additional unneeded screws on the outside.) I placed the B3603 module with some nuts on the screws.
The output of the B3603 was connected to a pair of banana plug terminals on the front panel.
A power switch was added to disconnect the power supply from main power .


The four buttons under the display are ( from left to right)  [SET]  [DOWN] [UP]  [OKE]The three leds at the right side of the display are (from top to bottom)CV LED – Green - Constant Voltage mode. CC LED – Yellow - Constant Current mode. OUT LED  – Red - On when supplying power.
Some power output calculations of my configuration
1,5 A * 24 Volt = 36 Watt (Input power)
36 Watt equals:
2 A at 18 Volt
3 A at 12 Volt (3 A is the limit of the B3603 regulator !! )
6 A at 6 Volt (3 A is the limit of the B3603 regulator !! )
7,2 A at 5Volt (3 A is the limit of the B3603 regulator !! ) 
How to operate the B3603 module can be found in the manual (see link below) and on several webpages and youtube channels.
An abstract can be found in the remaining of this blog article.
FOUR DIGIT DISPLAY
  • Dot at 00.00  Voltage  in Volt  ( Limit set point / real time output)
  • Dot at 0.000 Current in Ampere ( Limit set point / real time output)
  • First character in display C    Amp Hours (accumulated since being turned on.)
  • First character in display P Power in Watts real time
  • SA .. & LO .. Save and load to storage (only if Function 1 enabled).
  • ---- Confirms saving setting
  • Navigation to various setup menus and memory menus..
CV LED –  Constant Voltage mode.   Output voltage is at set value set, current is varying.CC LED – Constant Current mode.    Current limit has been reached and voltage is varying.OUT LED  – When lit, the power supply On and supplying power.  When off,  its output is off.
SET BUTTON
  • If OUT LED is on, pressing the set button will turn the B3603 off.
  • If OUT LED is off,  pressing the set button will cause the display to cycle between the voltage and current set points.
  • Warning: Long pressing set can output high voltage, it gives calibration menu
OK BUTTON
  • If the OUT LED is off, pressing the OK button will turn the power supply on.
  • If the OUT LED is on and display is showing a fixed value,  a quick press will cycle to the next value.
  • If the OUT LED is on,  pressing the OK button for more than a second will cause the display to enter a mode where it automatically cycles between the various power supply values or will cause the display to enter a mode where is displays a fixed value.
  • Power up the module while pressing this button = Feature select menu ( F0,F1,F2)
UP ARROW
  • A quick single press, will increase the value by one digit.
  • Holding the button down will cause the value to increase rapidly.
The set points can be changed with the power output on or off.DOWN ARROW
  • A quick single press, will decrease the value by one digit.
  • Holding the button down will cause the value to decrease rapidly.
Set points can be decreased with the power output on or off.
Calibration menu.Read the calibration manual first! Long pressing the ‘Set Button’. gives the calibration Menu.  This also outputs 30 volt (if > 30 volt applied to input, or otherwise your input voltage) that can damage an attached circuit.To calibrate you need an input power of 31-36 Volt and a load bigger than 1.2 A. User Selectable FeaturesAccess the Functions Menu by applying power with the ‘OK Button’ pressed.  With the ‘OK Button’ still pressed after power is applied the display will cycle between three values that represent the three user configurable options.The values are ‘–0-‘,  ‘–1-‘,  and ‘–2-‘.Function 0 – Choose whether or not the output is enabled when power is supplied to the step down converter.Function 1 – Whether or not to display power and amp hours. ( and memory mode on)Function 2 – Whether or not to cycle between values as a power up option.Releasing the ‘OK Button’ on of these values will toggle the user selectable state.
Storage locationsThe module also has 10 storage locations ( 0-9) to store preset voltage/current values.Function 1 on needs to be turned on to use storage.When pressing set LO-0 or SA-0 options to load or save to storage are enabled in the menu. With ARROW UP (or DOWN) you can select a storage location and do it by pressing OK.  
Links

DSO 150 digital oscilloscope

FEED blog.jeronimus.net - Sat, 2017-05-27 08:30
DSO 150 finished !The weight of my last portable oscilloscope was more than 10 kg. Now i bought and build this digital handheld oscilloscope DIY Kit.
It is not complete fair to compare my at least 20 year older "portable one" to this device as they have some different options. But this less than 20 euro device that can be used for simple projects is really portable and my older "portable" scope weighs more than 50 times.
End march 2017 i payed € 18,83 , no shipping fee. Current price (may2017) at same Aliexpress shop € 20,48 and € 3,79 shipping fee to the Netherlands. If the total price exceeds 22 Euro this can result in additional taxes and handling fee. Another shop now asks € 18,90 without shipping costs.
This mini digital oscilloscope can be ordered in different versions.- Complete DIY Kit- Kit with SMD components already soldered- Full assembled product.When searching for "Digital Oscilloscope" on AliExpress you can find different versions.I selected this one (DSO 150 / JYE Teck )  as it has a nice case / enclosure, the SMD components are already soldered and the price including shipping  is less than €22,00.The construction was easy with the two double sided pages manual  The photo's in the instruction are a bit confusing as they not exactly show the components that are already on the PCB when following the text chronology. Some people recorded assembly instructions and did put it on youtube.
The design is interesting:
- You need to test the circuit first with only the SMD components installed (the way it arrived). After the test you need to remove one SMD resistor! With the SMD resistor installed you do not need the power switch to turn the device on. So it was still necessary to do some work with a small SMD component. - After adding some components you need to measure voltages at some points.- The device consist of two main PCBs , an analog and a digital part (and a small PCB for the rotary encoder). They can be mechanically connected two different ways (with the same electronic connections). One way the PCBs are close connected to fit in the box and another way where you can easy access components to calibrate the instrument with a 1kHz square wave signal. (Pin next to the BNC connector. This pin is also available it the box is closed.).The most difficult part for me was the calibration; you need to know how to operate this oscilloscope. When i assembled this device i was in the beginning of the learning curve.On the website of the manufacturer important info about this device (schematic, manual, tips ) can be found including this important note: "It is assumed that users have adaquate soldering skills and troubleshooting skills to assemble the DSO Shell kits. Buyers are advised that due to skills of user is involved in assembly it is not guaranteed every kit will end up being a working device.But we will make as much efforts as we can to approach that goal."Until now i only tested this oscilloscope with the internal 1kHz signal and with my
Sine, Square and Triangle function signal generator .
Disadvantages i have found until now are:- There is no real battery holder for my 9 volt battery.- The device only has a timebase and one channel. It is not an oscilloscope with X and Y input.

Sine, Square and Triangle function signal generator

FEED blog.jeronimus.net - Fri, 2017-05-26 17:42


A few days ago i did built this cheap function signal generator.
For less than 2 euro  this DIY kit provides a Sine, Square and Triangle signal. (You can find this kit for different prices on AliExpress.  I payed € 1,69 , when writing this blogpost i noticed the price has droped to € 1,61 at the same seller. )Search for it with keywords ICL8038 Monolithic Function Signal Generator Module DIY Kit Sine Square Triangle )The kit is designed for a frequency range
of 50-5KHz, two bands with a switch S.RP1 is the frequency adjustment,
RP2 on the PCB is the duty cycle adjustment and
RP3 on the PCB is a sine wave distortion adjustment.
According to the description the circuit uses 12V single power supply.
After testing it with 12 Volt i tried other input voltages. I also worked on 9 Volt so it can be easy battery powered. The Square signal is stronger than the two other signals




Led Lamp DIY Kit

FEED blog.jeronimus.net - Sat, 2017-05-06 12:55
Finally i assembled my 38 LEDs Lamp DIY Kit that was ordered some time ago on Aliexpress.
The product was according to description and leds are not included. Therefore i had to wait until the leds arrived. And that postbag contained also other intersing products....
I assembled this first "self made led bulb" with only white leds and yes it works. Did not test power consumption or other things. As mentioned in another blog it is a bit dangerous de to the direct mains connection and the insulation inside needs to be improved. I hope some time i will find time to order some more of these kits and  play with other leds.

ESP01 Break-in board

FEED blog.jeronimus.net - Mon, 2017-04-10 08:00
I created several projects with EPS8266 wifi modules.
The small cheap ESP01 module has only a few IO pins so i did not used it until now.
In one of my recent Aliexpress China orders i also added a small cheap ESP01S module to my shopping list. I also ordered some boards to easy test and use of this module: ESP01 has 2x4 pins close to each other. Not easy to use on a breadboard therefore i also added to my shopping list.
(Right to left. [First is the ESP01 module itself] ) 
  • ESP01 - Breadboard interface. 
  • ESP01 - TTL interface
  •  ESP01 - USB interface
My plan was to use the ESP01 - USB interface board to program an test the ESP8266 module.Then the disappointment : to program the small ESP01 module you need to pull GPIO0 to ground. My cheap interface USB module has no jumper or switch to do that!
A reset button would also be nice.
And perhaps easy access to all the pins to experiment.
If i would use the TTL interface wired this to a USB TTL / RS232 (FTDI) interface cable i would have the same problem.
An option would be start from zero, using a breadboard interface, and make my own interface.
 (Later i found there are some ESP01 USB modules with programming switch. I did not find one with programming switch and reset button!)
ESP01 with USB Module 
But what is the use of these cheap "ready to use" interfaces. For programming, testing and debugging I decided to make my "ESP01 Break-in board". A board to put between the ESP01 and the boards with the 2*4 connector.
(I decided to call it "Break in board". It is not a "Break out board" to use and get access to chip pins but a "Break in" to put between the existing connections to add features.)
It needed (minimal) a programming switch, a reset button and access to the pins.
Later on i decided to add also some additional features. (See photo, final specs/feature list below.) This are additional features but not really needed.
I used a small double Side Prototype PCB Bread board Tinned Universal 20x80 mm FR4 28*6 holes.
ESP01 "Break in board"
 with EPS and USB
connected. (All holes are plated through). I added pins to fit in a 2*4 pin connector (on bottom) and additional 2 times 4 pins to get easy access to all pins and a female 2*4 connector for the ESP01 module (on the top). On my (current) laptop free USB connectors are at the left side. I wired my "Break-in board" with this in mind. (USB connector pointing to the right when using this board).
Mark on the PCB with an arrow the direction of the ESP01 module.
A push button is used for the reset, (Bottom of the PCB) wired to ground and reset.
While uploading a program i do not want to continuously press a button. I decided to use a small slide switch (Top).
In stock i had a three position switch. If you have a small two position slide switch you use that. The three position switch i used has 6 pins: (and two shield pins)
Left no pins are connected
Middle pin 1 and 4 are connected ' / pin 3 and 5 connected "
Right pin 1 and 4 are connected '
Pin 2 and 6 have no use (n.c.), i did bend them away and soldered the switch on the PCB. I decided to use the middle position as programming position and wired pin 2 and 5 ' to ground and GPIO0.
3 position switchAt this point my basic minimal "ESP01 Break-in board" was ready.
ESP01 "Break in" board. (top view) On my board i also added some other things i had in stock:

  • 6 female pins connected to to ground (and next to it a) 
  • 25 Points Mini Solderless Prototype Tie-point Breadboard 
  • A micro switch (three pins Common, Normal open, Normal closed ) with connections to pins to easy wire them for experiments. (on bottom next to reset pushbutton).
  • Passive electromagnetic impedance 16 ohm AC buzzer/2KHz 3V 5V universal buzzer (- connected to ground, other side to a pin and 100 ohm resistor with a second pin. -
On my slide switch at pin 1 and pin 4 ' contacts available are (Left open, Middle and Right closed), i wired them to two pins on the PCB.
The condensator on the ESP01 - USB interface board comes very close to PCB. Some insulation tape was added. As a final touch i used cable ties to join some cable bundles.

ESP01 "Break in" board (bottom view)RESULT: "ESP01 Break-in board":
Switch for programming the ESP01,
Reset button,
Easy access to all pins of the ESP01.
Some additional switches.
A mini buzzer (One side connected to ground. Connect the other side e.g. with a Dupont cable to GPIO2)
Mini solderless prototype board for additional components/experiments.
ESP01 "Break in" with ESP01 and USB (bottom view)

Funduino Joystick shield

FEED blog.jeronimus.net - Sat, 2017-04-08 08:30
Funduino Joystick shieldFrom Aliexpress i got a Arduino Gamepads JoyStick KeypadShield PS2  (I recently found it at another seller for 2,33 Euro ) 

Using Google i found out there are some different versions.My shield  (V1.A ) uses the following connections

D2 Key A UP
D3 Key B RIGHT
D4 Key C DOWN
D5 Key D LEFT

D6 Key E Start
D7 Key F Select

D8 Analog button
A0 AnalogX Joystick
A1 AnalogY Joystick

There are some headers to get to the other Arduino pins.

Some headers are pre arranged for special interfaces (On my board I2C, Bluetooth, Nokia5110 display, nRF24L01)
A slide switch to select between 3V3 and 5V mode.
A red power led
TestScript/*
JoystickArduinoBasicExample

A basic sketch to demonstrate reading values from the joystick shield

How to use:
* Connect joystick shield to your Arduino
* Upload this sketch to your Arduino
* Open the Arduino IDE Serial Monitor (set to 9600 baud)
* Waggle joystick, push buttons

Requires:
* Arduino
* Joystick Shield

April 2017 by JJ adapted version of a version
written for SparkFun Arduino Inventor's Kit CIRC-JOY
Based on original example by Ryan Owens
*/

// Store the Arduino pin associated with each input

const byte PIN_BUTTON_UP = 2;
const byte PIN_BUTTON_RIGHT = 3;
const byte PIN_BUTTON_DOWN = 4;
const byte PIN_BUTTON_LEFT = 5;

const byte PIN_BUTTON_START = 6;
const byte PIN_BUTTON_SELECT = 7;

const byte PIN_BUTTON_JOY = 8; // Select button is triggered when joystick is pressed
const byte PIN_ANALOG_X = 0;
const byte PIN_ANALOG_Y = 1;

void setup() {
Serial.begin(9600);
// Specify each pin connected to a pushbutton as an input.
// Also enable the Arduino's internal "pull-up" resistors
// for each pushbutton we want to read--this means the shield
// doesn't need to have resistors on it.
// Note that when a pull-up resistor is used on a pin the
// meaning of the values read are reversed compared to their
// usual meanings:

// * HIGH = the button is not pressed
// * LOW = the button is pressed

pinMode(PIN_BUTTON_RIGHT, INPUT);
digitalWrite(PIN_BUTTON_RIGHT, HIGH);

pinMode(PIN_BUTTON_LEFT, INPUT);
digitalWrite(PIN_BUTTON_LEFT, HIGH);

pinMode(PIN_BUTTON_UP, INPUT);
digitalWrite(PIN_BUTTON_UP, HIGH);

pinMode(PIN_BUTTON_DOWN, INPUT);
digitalWrite(PIN_BUTTON_DOWN, HIGH);

pinMode(PIN_BUTTON_START, INPUT);
digitalWrite(PIN_BUTTON_START, HIGH);

pinMode(PIN_BUTTON_SELECT, INPUT);
digitalWrite(PIN_BUTTON_SELECT, HIGH);

pinMode(PIN_BUTTON_JOY, INPUT);
digitalWrite(PIN_BUTTON_JOY, HIGH);
}

void loop() {
// Print the current values of the inputs (joystick and
// buttons) to the console.
Serial.print("l:");
Serial.print(digitalRead(PIN_BUTTON_LEFT));
Serial.print(" ");
Serial.print("r:");
Serial.print(digitalRead(PIN_BUTTON_RIGHT));
Serial.print(" ");

Serial.print("u:");
Serial.print(digitalRead(PIN_BUTTON_UP));
Serial.print(" ");

Serial.print("d:");
Serial.print(digitalRead(PIN_BUTTON_DOWN));
Serial.print(" / ");

Serial.print("g:");
Serial.print(digitalRead(PIN_BUTTON_START));
Serial.print(" ");

Serial.print("s:");
Serial.print(digitalRead(PIN_BUTTON_SELECT));
Serial.print(" / ");

Serial.print("j:");
Serial.print(digitalRead(PIN_BUTTON_JOY));
Serial.print(" ");

Serial.print("x:");
Serial.print(analogRead(PIN_ANALOG_X));
Serial.print(" ");
Serial.print("y:");
Serial.print(analogRead(PIN_ANALOG_Y));
Serial.print(" ");

Serial.println();
}
LinksVideo reviewhttps://www.youtube.com/watch?v=wJXgECta8oc

Links to other version of this board

Arduino_LCD_TFT_SDcard_shield_breakout

FEED blog.jeronimus.net - Fri, 2017-04-07 08:00
Using a Arduino TFT LCD shield in your project has some disadvantages.
1) The LCD TFT and SDcard occupy most of the IO pins on an Arduino Uno.
2) The IO pins are not easy accessible to connect other hardware.
This blogpost describes how i solved this second issue.
When using the shield with the LCD TFT the SDcard fee IO pins are :


  • A5 Analog5
  • D0 RX
  • D1 TX

  • D0 and D1 are also used for serial communication over USB but can be used if the Arduino is used standalone.For interfacing i also wanted access to GND, +5V and 3V3.I used some colored cables with a female Dupont connectors on one side. Male connectors can easy give short circuit if not in use, so i used female.
    You can easy create them from cutting a long Dupont Cables in two parts.
    I put them trough heat shrink tube and soldered them on my LCD TFT shield.
    You can use any color scheme, but Black for GND  and Red for the Power can give less confusion in your projects. I used this colors:3V3Orange+5VRedGNDBlackA5 Analog5BrownD0 RXGreenD1 TXYellowAfter soldering and arranging the cables i heated heat shrink tube.
    The female Dupont connectors are available to interface your project.
    As there are some differences between the shields i do not provide a script to display the analog signal on the TFT LCD for testing. Better use the Arduino program below that sends the Analog signal A5 to the serial (USB) port.

    /* 2016 Analog A5 JanJeronimus
    Get Analog 5 value every second
    Writes time [ uptime millis() ]  , 
     analog gas sensor value to the serial port
    */

    const int PinA5 = A5 ; //Connect Arduino analog A5 pin to sensor

    int val = 0;     // variable to store the Digital read value

    void setup()
    {
    Serial.begin(9600); //Initialize serial port - 9600 bps
    }

    void loop()
    {
    Serial.print( millis() ) ;
    Serial.print( " ,  " ) ;
    Serial.println( analogRead(PinA5) );
    delay(1000); // Print value every 1 sec.
    }

    On codebender :





    Arduino Multi Function Shield

    FEED blog.jeronimus.net - Thu, 2017-04-06 08:00
    IntroThe Multi Function Shield is a nice shield with some components to so some experiments with your Arduino. On the shield are two jumpers. It is always the question in what position do you need to put the jumpers. The answer will be in this post.
    Before using this shield I added some isolation tape at the bottom as is am not happy with some pins of 7 segment displays close to the metal USB connector. On http://arduinolearning.com/code/multi-function-shield-examples.php i found some easy experiments to start. (using 4 leds, button1, button2, pot1 and the 7 segment display)
    Code ExamplesBlinking LED?123456789101112131415int led = 13;void setup(){// initialize the digital pin as an output.pinMode(led, OUTPUT);}void loop(){digitalWrite(led, HIGH);delay(1000);digitalWrite(led, LOW);delay(1000);}All LEDS blinking?123456789101112131415161718192021222324252627int led1 = 13;int led2 = 12;int led3 = 11;int led4 = 10;void setup(){// initialize the digital pin as an output.pinMode(led1, OUTPUT);pinMode(led2, OUTPUT);pinMode(led3, OUTPUT);pinMode(led4, OUTPUT);}void loop(){digitalWrite(led1, HIGH);digitalWrite(led2, HIGH);digitalWrite(led3, HIGH);digitalWrite(led4, HIGH);delay(1000);digitalWrite(led1, LOW);digitalWrite(led2, LOW);digitalWrite(led3, LOW);digitalWrite(led4, LOW);delay(1000);}Switches example?123456789101112131415161718192021222324252627282930313233const byte LED[] = {13,12,11,10};#define BUTTON1 A1#define BUTTON2 A2void setup(){// initialize the digital pin as an output./* Set each pin to outputs */pinMode(LED[0], OUTPUT);pinMode(LED[1], OUTPUT);pinMode(LED[2], OUTPUT);pinMode(LED[3], OUTPUT);}void loop(){if(!digitalRead(BUTTON1)){digitalWrite(LED[0], HIGH);digitalWrite(LED[1], HIGH);digitalWrite(LED[2], HIGH);digitalWrite(LED[3], HIGH);}if(!digitalRead(BUTTON2)){digitalWrite(LED[0], LOW);digitalWrite(LED[1], LOW);digitalWrite(LED[2], LOW);digitalWrite(LED[3], LOW);}}I discovered that you need add jumper J2 to use the buttons!
    Potentiometer 1?12345678910111213141516#define Pot1 0void setup(){Serial.begin(9600);}/* Main Program */void loop(){Serial.print(“Potentiometer reading: “);Serial.println(analogRead(Pot1));/* Wait 0.5 seconds before reading again */delay(500);}Pot and led?1234567891011121314151617181920212223242526272829303132333435363738394041const byte LED[] = {13,12,11,10};#define Pot1 0void setup(){Serial.begin(9600);// initialize the digital pin as an output./* Set each pin to outputs */pinMode(LED[0], OUTPUT);pinMode(LED[1], OUTPUT);pinMode(LED[2], OUTPUT);pinMode(LED[3], OUTPUT);}/* Main Program */void loop(){int PotValue;//Serial.print("Potentiometer reading: ");PotValue = analogRead(Pot1);/* Wait 0.5 seconds before reading again */if(PotValue < 400){digitalWrite(LED[0], LOW);digitalWrite(LED[1], LOW);digitalWrite(LED[2], LOW);digitalWrite(LED[3], LOW);Serial.print("Potentiometer: ");Serial.println(PotValue);}else{digitalWrite(LED[0], HIGH);digitalWrite(LED[1], HIGH);digitalWrite(LED[2], HIGH);digitalWrite(LED[3], HIGH);Serial.print("Potentiometer: ");Serial.println(PotValue);}delay(500);}segment display?12345678910111213141516171819202122232425262728293031323334353637/* Define shift register pins used for seven segment display */#define LATCH_DIO 4#define CLK_DIO 7#define DATA_DIO 8/* Segment byte maps for numbers 0 to 9 */const byte SEGMENT_MAP[] = {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0X80,0X90};/* Byte maps to select digit 1 to 4 */const byte SEGMENT_SELECT[] = {0xF1,0xF2,0xF4,0xF8};void setup (){/* Set DIO pins to outputs */pinMode(LATCH_DIO,OUTPUT);pinMode(CLK_DIO,OUTPUT);pinMode(DATA_DIO,OUTPUT);}/* Main program */void loop(){/* Update the display with the current counter value */WriteNumberToSegment(0 , 0);WriteNumberToSegment(1 , 1);WriteNumberToSegment(2 , 2);WriteNumberToSegment(3 , 3);}/* Write a decimal number between 0 and 9 to one of the 4 digits of the display */void WriteNumberToSegment(byte Segment, byte Value){digitalWrite(LATCH_DIO,LOW);shiftOut(DATA_DIO, CLK_DIO, MSBFIRST, SEGMENT_MAP[Value]);shiftOut(DATA_DIO, CLK_DIO, MSBFIRST, SEGMENT_SELECT[Segment] );digitalWrite(LATCH_DIO,HIGH);}Read pot and display value on display?12345678910111213141516171819202122232425262728293031323334353637383940414243/* Define shift register pins used for seven segment display */#define LATCH_DIO 4#define CLK_DIO 7#define DATA_DIO 8#define Pot1 0/* Segment byte maps for numbers 0 to 9 */const byte SEGMENT_MAP[] = {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0X80,0X90};/* Byte maps to select digit 1 to 4 */const byte SEGMENT_SELECT[] = {0xF1,0xF2,0xF4,0xF8};void setup (){Serial.begin(9600);/* Set DIO pins to outputs */pinMode(LATCH_DIO,OUTPUT);pinMode(CLK_DIO,OUTPUT);pinMode(DATA_DIO,OUTPUT);}/* Main program */void loop(){int PotValue;PotValue = analogRead(Pot1);Serial.print(“Potentiometer: “);Serial.println(PotValue);/* Update the display with the current counter value */WriteNumberToSegment(0 , PotValue / 1000);WriteNumberToSegment(1 , (PotValue / 100) % 10);WriteNumberToSegment(2 , (PotValue / 10) % 10);WriteNumberToSegment(3 , PotValue % 10);}/* Write a decimal number between 0 and 9 to one of the 4 digits of the display */void WriteNumberToSegment(byte Segment, byte Value){digitalWrite(LATCH_DIO,LOW);shiftOut(DATA_DIO, CLK_DIO, MSBFIRST, SEGMENT_MAP[Value]);shiftOut(DATA_DIO, CLK_DIO, MSBFIRST, SEGMENT_SELECT[Segment] );digitalWrite(LATCH_DIO,HIGH);}When i tried this program i noticed that the most significant digit looks more bright than others !
    Schematic diagramOn http://www.baaqii.com/promanage/manual/A1010.zip i found a zip file with a schematic diagram and about 28 lessons / experiments (in Chinese!).In the schematic diagram

    you can see the jumpers:

    J1 is used for a 10 k pull up resistor to pin 2 of U5  (to connect a DS1820 temperature sensor [not included with the shield]) (Arduino Pin A4 ?)  {Location C4 in the picture} 

    J2 is needed if you want to use the switches S1 S2 and S3 (connected to A1 A2 and A3 of the Arduino. {Location C1 in picture}

    A SFH506-38 IR receiver (Pin D2) {Location C3 in picture} is also not included with this shield and can be connected to U4

    I expect the 7 pin header {Location B/C1 in picture} with the Chinese characters is the header 7 pin header marked on the shield with "APC220 Bluetooth Voice Recognition Module". (Pin D0 and D1 ?)

    Pin D5 D6 D9 and A5 are accessible by 4 3 pin header connectors next to +5V and GND

    D3 is connected to the Buzzer using a transistor! {Location D3 in picture}

     The 4 * 7segement displays are connected using two MC74HC595AD shift registers
    D4 7segment Latch
    D7 7segment CLK
    D8 7segment Data

    D10 Led4 {Location A2 in picture}
    D11 Led3
    D12 Led2
    D13 Led1

    A0 Pot1 (potentiometer) {Location B/C1 in picture}

    A1 Button1 {Location C/D1 in picture}
    A2 Button2
    A3 Button3
    Other referencesSome other info on the internet about this shield:

    https://www.mpja.com/download/hackatronics-arduino-multi-function-shield.pdf
    Document with several examples using a nice library

    http://www.cohesivecomputing.co.uk/hackatronics/arduino-multi-function-shield/
    Tutorial with  real world examples (Metronome bonus can be found on Youtube)(I tried the Metronome, it worked. The sound was not as loud as i expected from the Youtube movie.)
     

    ½ Euro Barking Dog project

    FEED blog.jeronimus.net - Sun, 2017-04-02 15:48
    On Aliexpress i bought some cheap Dog Bark Chip modules (H-38). ( Price ~ 0,15 euro if you buy 10 pieces). On the sellers page(s) you can also find this illustration about how to connect.

    I connected a AA battery storage case plastic box holder (2 x AA 1.5V battery) to power this module with 3 Volt. Besides power, a small speaker and a trigger (push button) you need a 360K resistor. (I used 470K as i could not find 360K in my stock and it also worked.) A small speaker can also be found on Aliexpress (~ 0,25 Euro).
    The complete circuit without battery will cost less than a half euro.

    Share this on

    Twitter icon
    Facebook icon
    Google icon
    StumbleUpon icon
    Del.icio.us icon
    Digg icon
    LinkedIn icon
    MySpace icon
    Newsvine icon
    Pinterest icon
    Reddit icon
    Technorati icon
    Yahoo! icon
    e-mail icon
    Subscribe to Jeronimus.Net aggregator